ruby-saml 1.10.1 → 1.10.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of ruby-saml might be problematic. Click here for more details.
- checksums.yaml +7 -7
- data/changelog.md +10 -0
- data/lib/onelogin/ruby-saml/idp_metadata_parser.rb +9 -1
- data/lib/onelogin/ruby-saml/settings.rb +1 -0
- data/lib/onelogin/ruby-saml/version.rb +1 -1
- data/ruby-saml.gemspec +1 -1
- data/test/idp_metadata_parser_test.rb +8 -1
- data/test/settings_test.rb +2 -1
- metadata +132 -108
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
---
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
SHA512:
|
6
|
-
|
7
|
-
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d41dad289f19495a49ad8be046bfc6c37fdcddb5
|
4
|
+
data.tar.gz: 461bc5c8000ea0124e59cc5782b997c445591e75
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 677d7efd58ec482570901bec9ec0c1ef1e234715f2df3ba8983e9202c6af7d50a7dc9b58e4adf2bcb6ac88ba90190866bd16624308f6ce14205f3047587dc38e
|
7
|
+
data.tar.gz: 084285a2d56ae772430587a3e748e017c1a50cb6090ed1d4990545c0c5e46a8ecf8c20d5de04b284897e81a35f7da33a2e437686fc181a5ea7085af1121244fd
|
data/changelog.md
CHANGED
@@ -1,4 +1,14 @@
|
|
1
1
|
# RubySaml Changelog
|
2
|
+
|
3
|
+
### 1.10.2 (Apr 29, 2019)
|
4
|
+
|
5
|
+
* Add valid until, accessor
|
6
|
+
* Fix Rubygem metadata that requested nokogiri <= 1.5.11
|
7
|
+
|
8
|
+
### 1.10.1 (Apr 08, 2019)
|
9
|
+
|
10
|
+
* Fix ruby 1.8.7 incompatibilities
|
11
|
+
|
2
12
|
### 1.10.0 (Mar 21, 2019)
|
3
13
|
* Add Subject support on AuthNRequest to allow SPs provide info to the IdP about the user to be authenticated
|
4
14
|
* Improves IdpMetadataParser to allow parse multiple IDPSSODescriptors
|
@@ -207,7 +207,8 @@ module OneLogin
|
|
207
207
|
:idp_attribute_names => attribute_names,
|
208
208
|
:idp_cert => nil,
|
209
209
|
:idp_cert_fingerprint => nil,
|
210
|
-
:idp_cert_multi => nil
|
210
|
+
:idp_cert_multi => nil,
|
211
|
+
:valid_until => valid_until
|
211
212
|
}.tap do |response_hash|
|
212
213
|
merge_certificates_into(response_hash) unless certificates.nil?
|
213
214
|
end
|
@@ -224,6 +225,13 @@ module OneLogin
|
|
224
225
|
Utils.element_text(node)
|
225
226
|
end
|
226
227
|
|
228
|
+
# @return [String|nil] 'validUntil' attribute of metadata
|
229
|
+
#
|
230
|
+
def valid_until
|
231
|
+
root = @idpsso_descriptor.root
|
232
|
+
root.attributes['validUntil'] if root && root.attributes
|
233
|
+
end
|
234
|
+
|
227
235
|
# @param binding_priority [Array]
|
228
236
|
# @return [String|nil] SingleSignOnService binding if exists
|
229
237
|
#
|
data/ruby-saml.gemspec
CHANGED
@@ -41,7 +41,7 @@ Gem::Specification.new do |s|
|
|
41
41
|
elsif RUBY_VERSION < '2.1'
|
42
42
|
s.add_runtime_dependency('nokogiri', '>= 1.5.10', '<= 1.6.8.1')
|
43
43
|
else
|
44
|
-
s.add_runtime_dependency('nokogiri', '>= 1.
|
44
|
+
s.add_runtime_dependency('nokogiri', '>= 1.5.10')
|
45
45
|
end
|
46
46
|
|
47
47
|
s.add_development_dependency('minitest', '~> 5.5')
|
@@ -29,6 +29,7 @@ class IdpMetadataParserTest < Minitest::Test
|
|
29
29
|
assert_equal "https://hello.example.com/access/saml/logout", settings.idp_slo_target_url
|
30
30
|
assert_equal "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", settings.name_identifier_format
|
31
31
|
assert_equal ["AuthToken", "SSOStartPage"], settings.idp_attribute_names
|
32
|
+
assert_equal '2014-04-17T18:02:33.910Z', settings.valid_until
|
32
33
|
end
|
33
34
|
|
34
35
|
it "extract certificate from md:KeyDescriptor[@use='signing']" do
|
@@ -76,7 +77,7 @@ class IdpMetadataParserTest < Minitest::Test
|
|
76
77
|
|
77
78
|
options[:sso_binding] = ['invalid_binding', 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect']
|
78
79
|
settings = idp_metadata_parser.parse(idp_metadata, options)
|
79
|
-
assert_equal "https://idp.example.com/idp/profile/SAML2/Redirect/SSO", settings.idp_sso_target_url
|
80
|
+
assert_equal "https://idp.example.com/idp/profile/SAML2/Redirect/SSO", settings.idp_sso_target_url
|
80
81
|
end
|
81
82
|
|
82
83
|
it "uses settings options as hash for overrides" do
|
@@ -121,6 +122,7 @@ class IdpMetadataParserTest < Minitest::Test
|
|
121
122
|
assert_equal "https://hello.example.com/access/saml/logout", metadata[:idp_slo_target_url]
|
122
123
|
assert_equal "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", metadata[:name_identifier_format]
|
123
124
|
assert_equal ["AuthToken", "SSOStartPage"], metadata[:idp_attribute_names]
|
125
|
+
assert_equal '2014-04-17T18:02:33.910Z', metadata[:valid_until]
|
124
126
|
end
|
125
127
|
|
126
128
|
it "extract certificate from md:KeyDescriptor[@use='signing']" do
|
@@ -242,6 +244,7 @@ class IdpMetadataParserTest < Minitest::Test
|
|
242
244
|
assert_equal "https://hello.example.com/access/saml/logout", settings.idp_slo_target_url
|
243
245
|
assert_equal "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", settings.name_identifier_format
|
244
246
|
assert_equal ["AuthToken", "SSOStartPage"], settings.idp_attribute_names
|
247
|
+
assert_equal '2014-04-17T18:02:33.910Z', settings.valid_until
|
245
248
|
assert_equal OpenSSL::SSL::VERIFY_PEER, @http.verify_mode
|
246
249
|
end
|
247
250
|
|
@@ -275,6 +278,7 @@ class IdpMetadataParserTest < Minitest::Test
|
|
275
278
|
assert_equal "https://hello.example.com/access/saml/logout", parsed_metadata[:idp_slo_target_url]
|
276
279
|
assert_equal "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", parsed_metadata[:name_identifier_format]
|
277
280
|
assert_equal ["AuthToken", "SSOStartPage"], parsed_metadata[:idp_attribute_names]
|
281
|
+
assert_equal '2014-04-17T18:02:33.910Z', parsed_metadata[:valid_until]
|
278
282
|
assert_equal OpenSSL::SSL::VERIFY_PEER, @http.verify_mode
|
279
283
|
end
|
280
284
|
|
@@ -341,14 +345,17 @@ class IdpMetadataParserTest < Minitest::Test
|
|
341
345
|
assert_equal "F1:3C:6B:80:90:5A:03:0E:6C:91:3E:5D:15:FA:DD:B0:16:45:48:72", @settings.idp_cert_fingerprint
|
342
346
|
assert_equal "https://hello.example.com/access/saml/logout", @settings.idp_slo_target_url
|
343
347
|
assert_equal ["AuthToken", "SSOStartPage"], @settings.idp_attribute_names
|
348
|
+
assert_equal '2014-04-17T18:02:33.910Z', @settings.valid_until
|
344
349
|
end
|
345
350
|
|
346
351
|
it "should handle multiple descriptors at once" do
|
347
352
|
settings = @idp_metadata_parser.parse_to_array(@idp_metadata)
|
348
353
|
assert_equal "https://foo.example.com/access/saml/idp.xml", settings.first[:idp_entity_id]
|
349
354
|
assert_equal "F1:3C:6B:80:90:5A:03:0E:6C:91:3E:5D:15:FA:DD:B0:16:45:48:72", settings.first[:idp_cert_fingerprint]
|
355
|
+
assert_equal '2014-04-17T18:02:33.910Z', settings.first[:valid_until]
|
350
356
|
assert_equal "https://bar.example.com/access/saml/idp.xml", settings.last[:idp_entity_id]
|
351
357
|
assert_equal "08:EB:6E:60:A2:14:4E:89:EC:FA:05:74:9D:72:BF:5D:BE:54:F0:1A", settings.last[:idp_cert_fingerprint]
|
358
|
+
assert_equal '2014-04-17T18:02:33.910Z', settings.last[:valid_until]
|
352
359
|
end
|
353
360
|
end
|
354
361
|
|
data/test/settings_test.rb
CHANGED
@@ -11,7 +11,7 @@ class SettingsTest < Minitest::Test
|
|
11
11
|
|
12
12
|
it "should provide getters and settings" do
|
13
13
|
accessors = [
|
14
|
-
:idp_entity_id, :idp_sso_target_url, :idp_slo_target_url,
|
14
|
+
:idp_entity_id, :idp_sso_target_url, :idp_slo_target_url, :valid_until,
|
15
15
|
:idp_cert, :idp_cert_fingerprint, :idp_cert_fingerprint_algorithm, :idp_cert_multi,
|
16
16
|
:idp_attribute_names, :issuer, :assertion_consumer_service_url, :assertion_consumer_service_binding,
|
17
17
|
:single_logout_service_url, :single_logout_service_binding,
|
@@ -40,6 +40,7 @@ class SettingsTest < Minitest::Test
|
|
40
40
|
:idp_sso_target_url => "http://sso.muda.no/sso",
|
41
41
|
:idp_slo_target_url => "http://sso.muda.no/slo",
|
42
42
|
:idp_cert_fingerprint => "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00",
|
43
|
+
:valid_until => '2029-04-16T03:35:08.277Z',
|
43
44
|
:name_identifier_format => "urn:oasis:names:tc:SAML:2.0:nameid-format:transient",
|
44
45
|
:attributes_index => 30,
|
45
46
|
:passive => true,
|
metadata
CHANGED
@@ -1,128 +1,152 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-saml
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.10.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.10.2
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
6
|
+
authors:
|
7
7
|
- OneLogin LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
- !ruby/object:Gem::Dependency
|
15
|
-
name: uuid
|
16
|
-
prerelease: false
|
17
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
18
|
-
requirements:
|
19
|
-
- &id007
|
20
|
-
- ">="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: "0"
|
23
|
-
type: :runtime
|
24
|
-
version_requirements: *id001
|
25
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2019-04-29 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
26
14
|
name: nokogiri
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
version: 1.5.11
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.5.10
|
33
20
|
type: :runtime
|
34
|
-
version_requirements: *id002
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: minitest
|
37
21
|
prerelease: false
|
38
|
-
|
39
|
-
requirements:
|
40
|
-
- -
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.5.10
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: minitest
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '5.5'
|
43
34
|
type: :development
|
44
|
-
version_requirements: *id003
|
45
|
-
- !ruby/object:Gem::Dependency
|
46
|
-
name: mocha
|
47
35
|
prerelease: false
|
48
|
-
|
49
|
-
requirements:
|
50
|
-
- - ~>
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
version:
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '5.5'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: mocha
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.14'
|
53
48
|
type: :development
|
54
|
-
version_requirements: *id004
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rake
|
57
49
|
prerelease: false
|
58
|
-
|
59
|
-
requirements:
|
60
|
-
- - ~>
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version:
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.14'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10'
|
63
62
|
type: :development
|
64
|
-
version_requirements: *id005
|
65
|
-
- !ruby/object:Gem::Dependency
|
66
|
-
name: shoulda
|
67
63
|
prerelease: false
|
68
|
-
|
69
|
-
requirements:
|
70
|
-
- - ~>
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
version:
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: shoulda
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '2.11'
|
73
76
|
type: :development
|
74
|
-
version_requirements: *id006
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: simplecov
|
77
77
|
prerelease: false
|
78
|
-
|
79
|
-
requirements:
|
80
|
-
-
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '2.11'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: simplecov
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
81
90
|
type: :development
|
82
|
-
version_requirements: *id008
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: systemu
|
85
91
|
prerelease: false
|
86
|
-
|
87
|
-
requirements:
|
88
|
-
- -
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
version:
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: systemu
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '2'
|
91
104
|
type: :development
|
92
|
-
version_requirements: *id009
|
93
|
-
- !ruby/object:Gem::Dependency
|
94
|
-
name: timecop
|
95
105
|
prerelease: false
|
96
|
-
|
97
|
-
requirements:
|
98
|
-
- -
|
99
|
-
- !ruby/object:Gem::Version
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '2'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: timecop
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "<="
|
116
|
+
- !ruby/object:Gem::Version
|
100
117
|
version: 0.6.0
|
101
118
|
type: :development
|
102
|
-
version_requirements: *id010
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name: ruby-debug
|
105
119
|
prerelease: false
|
106
|
-
|
107
|
-
requirements:
|
108
|
-
- -
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "<="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 0.6.0
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: pry-byebug
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
111
132
|
type: :development
|
112
|
-
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
113
139
|
description: SAML toolkit for Ruby on Rails
|
114
140
|
email: support@onelogin.com
|
115
141
|
executables: []
|
116
|
-
|
117
142
|
extensions: []
|
118
|
-
|
119
|
-
extra_rdoc_files:
|
143
|
+
extra_rdoc_files:
|
120
144
|
- LICENSE
|
121
145
|
- README.md
|
122
|
-
files:
|
123
|
-
- .document
|
124
|
-
- .gitignore
|
125
|
-
- .travis.yml
|
146
|
+
files:
|
147
|
+
- ".document"
|
148
|
+
- ".gitignore"
|
149
|
+
- ".travis.yml"
|
126
150
|
- Gemfile
|
127
151
|
- LICENSE
|
128
152
|
- README.md
|
@@ -301,31 +325,31 @@ files:
|
|
301
325
|
- test/utils_test.rb
|
302
326
|
- test/xml_security_test.rb
|
303
327
|
homepage: http://github.com/onelogin/ruby-saml
|
304
|
-
licenses:
|
328
|
+
licenses:
|
305
329
|
- MIT
|
306
330
|
metadata: {}
|
307
|
-
|
308
331
|
post_install_message:
|
309
|
-
rdoc_options:
|
310
|
-
- --charset=UTF-8
|
311
|
-
require_paths:
|
332
|
+
rdoc_options:
|
333
|
+
- "--charset=UTF-8"
|
334
|
+
require_paths:
|
312
335
|
- lib
|
313
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
314
|
-
requirements:
|
336
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
337
|
+
requirements:
|
315
338
|
- - ">="
|
316
|
-
- !ruby/object:Gem::Version
|
339
|
+
- !ruby/object:Gem::Version
|
317
340
|
version: 1.8.7
|
318
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
319
|
-
requirements:
|
320
|
-
-
|
341
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
342
|
+
requirements:
|
343
|
+
- - ">="
|
344
|
+
- !ruby/object:Gem::Version
|
345
|
+
version: '0'
|
321
346
|
requirements: []
|
322
|
-
|
323
347
|
rubyforge_project: http://www.rubygems.org/gems/ruby-saml
|
324
|
-
rubygems_version: 2.
|
348
|
+
rubygems_version: 2.4.8
|
325
349
|
signing_key:
|
326
350
|
specification_version: 4
|
327
351
|
summary: SAML Ruby Tookit
|
328
|
-
test_files:
|
352
|
+
test_files:
|
329
353
|
- test/certificates/certificate.der
|
330
354
|
- test/certificates/certificate1
|
331
355
|
- test/certificates/certificate_without_head_foot
|