maestrano 0.12.2 → 0.12.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a9d1c9fb5b475f043c192002780684ae88c23799
4
- data.tar.gz: 25f9dc01f76554186b8aa430a072bd5c9a0fedee
3
+ metadata.gz: 027c20721a82e2ffaaa608c140e1145f2474e408
4
+ data.tar.gz: 058be80ac7c4ddceb3a4f786799a0b93120f5a4d
5
5
  SHA512:
6
- metadata.gz: a2213e1418b92942ce9f45104625494fe2027983c1f991f96980b3a1c9c4163018aa4fafb35e6e793eab4d1bcf91a4721c03b0b4ad05c533aeb6a65bae46dec7
7
- data.tar.gz: ee7352efceccc3086502997a674caee54db92656164ae7dace4c98cb0ba7f9561be5feeac8c7780d7db807791a14c14920011ed8513f6a3ef3bfa254a5c7e122
6
+ metadata.gz: 0d650626a4b6959204cffc47955472eb820f23d6bff56b195152b3e7f3f6f50ba627ee95202790070854b9aea7fb883241c657558f71ed80f7f704197523115d
7
+ data.tar.gz: 0dc742db8608cce95ee687eeb7050f8a65ba2f2873ed96caa10ecfd473d22df52a781a15331016e719fbc0377544b673b81549650e75373d87e7a351583dbe84
data/DEVELOPER.md CHANGED
@@ -20,5 +20,5 @@ curl -u maestrano https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials;
20
20
 
21
21
  Then push the gem
22
22
  ```bash
23
- gem push maestrano-0.12.0.gem -k maestrano
23
+ gem push maestrano-0.12.3.gem -k maestrano
24
24
  ```
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- maestrano (0.12.1)
4
+ maestrano (0.12.2)
5
5
  httparty (~> 0.13)
6
6
  json (~> 1.8)
7
7
  mime-types (~> 1.25)
@@ -12,7 +12,7 @@ PATH
12
12
  GEM
13
13
  remote: http://rubygems.org/
14
14
  specs:
15
- domain_name (0.5.25)
15
+ domain_name (0.5.20160128)
16
16
  unf (>= 0.0.5, < 1.0.0)
17
17
  http-cookie (1.0.2)
18
18
  domain_name (~> 0.5)
@@ -29,7 +29,7 @@ GEM
29
29
  metaclass (~> 0.0.1)
30
30
  multi_xml (0.5.5)
31
31
  netrc (0.11.0)
32
- nokogiri (1.6.7.1)
32
+ nokogiri (1.6.7.2)
33
33
  mini_portile2 (~> 2.0.0.rc2)
34
34
  rake (10.5.0)
35
35
  rest-client (1.8.0)
@@ -42,7 +42,7 @@ GEM
42
42
  timecop (0.6.0)
43
43
  unf (0.1.4)
44
44
  unf_ext
45
- unf_ext (0.0.7.1)
45
+ unf_ext (0.0.7.2)
46
46
  uuid (2.3.8)
47
47
  macaddr (~> 1.0)
48
48
 
data/README.md CHANGED
@@ -144,6 +144,13 @@ Maestrano.configure do |config|
144
144
  # used in a controller before filter to check user session - always return true
145
145
  #
146
146
  # config.sso.slo_enabled = true
147
+
148
+ # ==> x509 SSL Certificate
149
+ # During the SSO handshake, the SSL certificate is validated and must match the IDP provider.
150
+ # For multi-tenant integration, the certificates may change per environment.
151
+ #
152
+ # config.sso.x509_fingerprint = '2f:57:71:e4:40:19:57:37:a6:2c:f0:c5:82:52:2f:2e:41:b7:9d:7e'
153
+ # config.sso.x509_certificate = "-----BEGIN CERTIFICATE-----\nCERTIFICATE CONTENT==\n-----END CERTIFICATE-----"
147
154
 
148
155
  # ==> SSO User creation mode
149
156
  # !IMPORTANT
data/lib/maestrano/sso.rb CHANGED
@@ -9,8 +9,9 @@ module Maestrano
9
9
  settings.assertion_consumer_service_url = self.consume_url
10
10
  settings.issuer = Maestrano[preset].param('api.id')
11
11
  settings.idp_sso_target_url = self.idp_url
12
- settings.idp_cert_fingerprint = Maestrano[preset].param('sso_x509_fingerprint')
13
- settings.name_identifier_format = Maestrano[preset].param('sso_name_id_format')
12
+ settings.idp_cert = Maestrano[preset].param('sso.x509_certificate')
13
+ settings.idp_cert_fingerprint = Maestrano[preset].param('sso.x509_fingerprint')
14
+ settings.name_identifier_format = Maestrano[preset].param('sso.name_id_format')
14
15
  settings
15
16
  end
16
17
 
@@ -1,3 +1,3 @@
1
1
  module Maestrano
2
- VERSION = '0.12.2'
2
+ VERSION = '0.12.3'
3
3
  end
@@ -183,7 +183,8 @@ module Maestrano
183
183
  'sso.consume_path' => '/mno/sso/consume',
184
184
  'sso.creation_mode' => 'real',
185
185
  'sso.idm' => 'http://idp.myotherapp.com',
186
- 'sso.x509_fingerprint' => signature_fingerprint_1
186
+ 'sso.x509_fingerprint' => signature_fingerprint_1,
187
+ 'sso.x509_certificate' => signature_1
187
188
  }
188
189
 
189
190
  Maestrano.configure do |config|
@@ -210,6 +211,7 @@ module Maestrano
210
211
  config.sso.creation_mode = @preset_config['sso.creation_mode']
211
212
 
212
213
  config.sso.x509_fingerprint = @preset_config['sso.x509_fingerprint']
214
+ config.sso.x509_certificate = @preset_config['sso.x509_certificate']
213
215
  end
214
216
  end
215
217
 
@@ -229,6 +231,7 @@ module Maestrano
229
231
  should "support dynamic namespace resolution on signature elements" do
230
232
  Maestrano[@preset].configure do |config|
231
233
  config.sso.x509_fingerprint = "28:74:9B:E8:1F:E8:10:9C:A8:7C:A9:C3:E3:C5:01:6C:92:1C:B4:BA"
234
+ config.sso.x509_certificate = nil
232
235
  end
233
236
 
234
237
  response = Maestrano::Saml::Response[@preset].new(fixture("no_signature_ns.xml"))
@@ -43,8 +43,9 @@ module Maestrano
43
43
  assert settings.assertion_consumer_service_url == Maestrano::SSO.consume_url
44
44
  assert settings.issuer == Maestrano.param('api.id')
45
45
  assert settings.idp_sso_target_url == Maestrano::SSO.idp_url
46
- assert settings.idp_cert_fingerprint == Maestrano.param('sso_x509_fingerprint')
47
- assert settings.name_identifier_format == Maestrano.param('sso_name_id_format')
46
+ assert settings.idp_cert == Maestrano.param('sso.x509_certificate')
47
+ assert settings.idp_cert_fingerprint == Maestrano.param('sso.x509_fingerprint')
48
+ assert settings.name_identifier_format == Maestrano.param('sso.name_id_format')
48
49
  end
49
50
 
50
51
  should "build the right saml request" do
@@ -202,8 +203,9 @@ module Maestrano
202
203
  assert settings.assertion_consumer_service_url == Maestrano::SSO[@preset].consume_url
203
204
  assert settings.issuer == Maestrano[@preset].param('api.id')
204
205
  assert settings.idp_sso_target_url == Maestrano::SSO[@preset].idp_url
205
- assert settings.idp_cert_fingerprint == Maestrano[@preset].param('sso_x509_fingerprint')
206
- assert settings.name_identifier_format == Maestrano[@preset].param('sso_name_id_format')
206
+ assert settings.idp_cert == Maestrano.param('sso.x509_certificate')
207
+ assert settings.idp_cert_fingerprint == Maestrano[@preset].param('sso.x509_fingerprint')
208
+ assert settings.name_identifier_format == Maestrano[@preset].param('sso.name_id_format')
207
209
  end
208
210
 
209
211
  should "build the right saml request" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maestrano
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.2
4
+ version: 0.12.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arnaud Lachaume
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-21 00:00:00.000000000 Z
11
+ date: 2016-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client