saml-kit 1.0.31 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +17 -2
- data/Gemfile.lock +14 -12
- data/lib/saml/kit/authentication_request.rb +5 -0
- data/lib/saml/kit/bindings.rb +4 -4
- data/lib/saml/kit/builders/authentication_request.rb +3 -4
- data/lib/saml/kit/deprecated/metadata.rb +2 -0
- data/lib/saml/kit/namespaces.rb +25 -25
- data/lib/saml/kit/organization.rb +2 -0
- data/lib/saml/kit/signature.rb +1 -1
- data/lib/saml/kit/version.rb +1 -1
- data/saml-kit.gemspec +2 -2
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 39ae4610f337b0423a14f71aa9d03ea254ee6f453d3680970039b19cc6c3d0c1
|
4
|
+
data.tar.gz: 175432ff893cb775e91128bbef17f1cf111a062152d7ae1b59015ded4af2933e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fed3dfc0ca5ac7e5ed4991799df62ad44096419568fe87d3239049b2e64b56529285aca87e53f026c4a7dca2265fecffe8491189e8676d3861ff69577709633
|
7
|
+
data.tar.gz: a107ff7beab021f235dd6940a99cbd5897a07094d836104075c142f7d256e3d605e0a4bc85613c4aa0f88df768679466bfc2f861e99063045d655317bd0c8796
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
Version 1.0
|
1
|
+
Version 1.1.0
|
2
|
+
|
2
3
|
# Changelog
|
3
4
|
All notable changes to this project will be documented in this file.
|
4
5
|
|
@@ -8,6 +9,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
8
9
|
## [Unreleased]
|
9
10
|
- nil
|
10
11
|
|
12
|
+
## [1.1.0] - 2019-04-30
|
13
|
+
### Added
|
14
|
+
- Add support for ForceAuthn attribute on AuthnRequest
|
15
|
+
|
16
|
+
### Removed
|
17
|
+
- Drop support for ruby 2.2
|
18
|
+
- Drop support for ruby 2.3
|
19
|
+
|
20
|
+
### Changed
|
21
|
+
- Rescue from invalid signature validation
|
22
|
+
- Change minimum ruby version to 2.4
|
23
|
+
- Change minimum bundler to 2.0
|
24
|
+
|
11
25
|
## [1.0.31] - 2019-04-17
|
12
26
|
### Changed
|
13
27
|
- Rescue from all decryption errors
|
@@ -69,7 +83,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
69
83
|
### Removed
|
70
84
|
- Removed optional SessionNotOnOrAfter attribute from AuthnStatement.
|
71
85
|
|
72
|
-
[Unreleased]: https://github.com/saml-kit/saml-kit/compare/v1.0
|
86
|
+
[Unreleased]: https://github.com/saml-kit/saml-kit/compare/v1.1.0...HEAD
|
87
|
+
[1.1.0]: https://github.com/saml-kit/saml-kit/compare/v1.0.31...v1.1.0
|
73
88
|
[1.0.31]: https://github.com/saml-kit/saml-kit/compare/v1.0.30...v1.0.31
|
74
89
|
[1.0.30]: https://github.com/saml-kit/saml-kit/compare/v1.0.29...v1.0.30
|
75
90
|
[1.0.29]: https://github.com/saml-kit/saml-kit/compare/v1.0.28...v1.0.29
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
saml-kit (1.0
|
4
|
+
saml-kit (1.1.0)
|
5
5
|
activemodel (>= 4.2.0)
|
6
6
|
net-hippie (~> 0.1)
|
7
7
|
xml-kit (>= 0.3.0, < 1.0.0)
|
@@ -19,8 +19,9 @@ GEM
|
|
19
19
|
addressable (2.6.0)
|
20
20
|
public_suffix (>= 2.0.2, < 4.0)
|
21
21
|
ast (2.4.0)
|
22
|
-
benchmark-
|
23
|
-
benchmark-
|
22
|
+
benchmark-malloc (0.1.0)
|
23
|
+
benchmark-perf (0.5.0)
|
24
|
+
benchmark-trend (0.3.0)
|
24
25
|
builder (3.2.3)
|
25
26
|
bundler-audit (0.6.1)
|
26
27
|
bundler (>= 1.2.0, < 3)
|
@@ -31,15 +32,15 @@ GEM
|
|
31
32
|
diff-lcs (1.3)
|
32
33
|
docile (1.3.1)
|
33
34
|
ffaker (2.11.0)
|
34
|
-
hashdiff (0.3.
|
35
|
-
i18n (1.
|
35
|
+
hashdiff (0.3.9)
|
36
|
+
i18n (1.6.0)
|
36
37
|
concurrent-ruby (~> 1.0)
|
37
38
|
jaro_winkler (1.5.2)
|
38
39
|
json (2.2.0)
|
39
40
|
mini_portile2 (2.4.0)
|
40
41
|
minitest (5.11.3)
|
41
42
|
net-hippie (0.2.5)
|
42
|
-
nokogiri (1.
|
43
|
+
nokogiri (1.10.3)
|
43
44
|
mini_portile2 (~> 2.4.0)
|
44
45
|
parallel (1.17.0)
|
45
46
|
parser (2.6.2.1)
|
@@ -52,13 +53,14 @@ GEM
|
|
52
53
|
rspec-core (~> 3.8.0)
|
53
54
|
rspec-expectations (~> 3.8.0)
|
54
55
|
rspec-mocks (~> 3.8.0)
|
55
|
-
rspec-benchmark (0.
|
56
|
-
benchmark-
|
57
|
-
benchmark-
|
56
|
+
rspec-benchmark (0.5.0)
|
57
|
+
benchmark-malloc (~> 0.1.0)
|
58
|
+
benchmark-perf (~> 0.5.0)
|
59
|
+
benchmark-trend (~> 0.3.0)
|
58
60
|
rspec (>= 3.0.0, < 4.0.0)
|
59
61
|
rspec-core (3.8.0)
|
60
62
|
rspec-support (~> 3.8.0)
|
61
|
-
rspec-expectations (3.8.
|
63
|
+
rspec-expectations (3.8.3)
|
62
64
|
diff-lcs (>= 1.2.0, < 2.0)
|
63
65
|
rspec-support (~> 3.8.0)
|
64
66
|
rspec-mocks (3.8.0)
|
@@ -106,7 +108,7 @@ PLATFORMS
|
|
106
108
|
ruby
|
107
109
|
|
108
110
|
DEPENDENCIES
|
109
|
-
bundler (~>
|
111
|
+
bundler (~> 2.0)
|
110
112
|
bundler-audit (~> 0.6)
|
111
113
|
ffaker (~> 2.7)
|
112
114
|
rake (~> 10.0)
|
@@ -120,4 +122,4 @@ DEPENDENCIES
|
|
120
122
|
webmock (~> 3.1)
|
121
123
|
|
122
124
|
BUNDLED WITH
|
123
|
-
|
125
|
+
2.0.1
|
@@ -47,6 +47,11 @@ module Saml
|
|
47
47
|
at_xpath('./*/@AssertionConsumerServiceURL').try(:value)
|
48
48
|
end
|
49
49
|
|
50
|
+
# Returns the ForceAuthn attribute as a boolean.
|
51
|
+
def force_authn
|
52
|
+
at_xpath('./*/@ForceAuthn').try(:value) == 'true'
|
53
|
+
end
|
54
|
+
|
50
55
|
def name_id_format
|
51
56
|
name_id_policy
|
52
57
|
end
|
data/lib/saml/kit/bindings.rb
CHANGED
@@ -11,10 +11,10 @@ module Saml
|
|
11
11
|
# the different SAML bindings that are
|
12
12
|
# supported by this gem.
|
13
13
|
module Bindings
|
14
|
-
BINDINGS_2_0 = 'urn:oasis:names:tc:SAML:2.0:bindings'
|
15
|
-
HTTP_ARTIFACT = "#{BINDINGS_2_0}:HTTP-Artifact"
|
16
|
-
HTTP_POST = "#{BINDINGS_2_0}:HTTP-POST"
|
17
|
-
HTTP_REDIRECT = "#{BINDINGS_2_0}:HTTP-Redirect"
|
14
|
+
BINDINGS_2_0 = 'urn:oasis:names:tc:SAML:2.0:bindings'
|
15
|
+
HTTP_ARTIFACT = "#{BINDINGS_2_0}:HTTP-Artifact"
|
16
|
+
HTTP_POST = "#{BINDINGS_2_0}:HTTP-POST"
|
17
|
+
HTTP_REDIRECT = "#{BINDINGS_2_0}:HTTP-Redirect"
|
18
18
|
ALL = {
|
19
19
|
http_post: HTTP_POST,
|
20
20
|
http_redirect: HTTP_REDIRECT,
|
@@ -10,6 +10,7 @@ module Saml
|
|
10
10
|
attr_accessor :id, :now, :issuer, :assertion_consumer_service_url
|
11
11
|
attr_accessor :name_id_format, :destination
|
12
12
|
attr_accessor :version
|
13
|
+
attr_accessor :force_authn
|
13
14
|
attr_reader :configuration
|
14
15
|
|
15
16
|
def initialize(configuration: Saml::Kit.configuration)
|
@@ -36,10 +37,8 @@ module Saml
|
|
36
37
|
IssueInstant: now.utc.iso8601,
|
37
38
|
Destination: destination,
|
38
39
|
}
|
39
|
-
|
40
|
-
|
41
|
-
assertion_consumer_service_url
|
42
|
-
end
|
40
|
+
options[:ForceAuthn] = force_authn unless force_authn.nil?
|
41
|
+
options[:AssertionConsumerServiceURL] = assertion_consumer_service_url if assertion_consumer_service_url.present?
|
43
42
|
options
|
44
43
|
end
|
45
44
|
end
|
data/lib/saml/kit/namespaces.rb
CHANGED
@@ -3,33 +3,33 @@
|
|
3
3
|
module Saml
|
4
4
|
module Kit
|
5
5
|
module Namespaces
|
6
|
-
SAML_2_0 = 'urn:oasis:names:tc:SAML:2.0'
|
7
|
-
SAML_1_1 = 'urn:oasis:names:tc:SAML:1.1'
|
8
|
-
ATTR_NAME_FORMAT = "#{SAML_2_0}:attrname-format"
|
9
|
-
NAME_ID_FORMAT_1_1 = "#{SAML_1_1}:nameid-format"
|
10
|
-
NAME_ID_FORMAT_2_0 = "#{SAML_2_0}:nameid-format"
|
11
|
-
STATUS = "#{SAML_2_0}:status"
|
6
|
+
SAML_2_0 = 'urn:oasis:names:tc:SAML:2.0'
|
7
|
+
SAML_1_1 = 'urn:oasis:names:tc:SAML:1.1'
|
8
|
+
ATTR_NAME_FORMAT = "#{SAML_2_0}:attrname-format"
|
9
|
+
NAME_ID_FORMAT_1_1 = "#{SAML_1_1}:nameid-format"
|
10
|
+
NAME_ID_FORMAT_2_0 = "#{SAML_2_0}:nameid-format"
|
11
|
+
STATUS = "#{SAML_2_0}:status"
|
12
12
|
|
13
|
-
ASSERTION = "#{SAML_2_0}:assertion"
|
14
|
-
ATTR_SPLAT = "#{ATTR_NAME_FORMAT}:*"
|
15
|
-
BASIC = "#{ATTR_NAME_FORMAT}:basic"
|
16
|
-
BEARER = "#{SAML_2_0}:cm:bearer"
|
17
|
-
EMAIL_ADDRESS = "#{NAME_ID_FORMAT_1_1}:emailAddress"
|
18
|
-
INVALID_NAME_ID_POLICY = "#{STATUS}:InvalidNameIDPolicy"
|
19
|
-
METADATA = "#{SAML_2_0}:metadata"
|
20
|
-
PASSWORD = "#{SAML_2_0}:ac:classes:Password"
|
13
|
+
ASSERTION = "#{SAML_2_0}:assertion"
|
14
|
+
ATTR_SPLAT = "#{ATTR_NAME_FORMAT}:*"
|
15
|
+
BASIC = "#{ATTR_NAME_FORMAT}:basic"
|
16
|
+
BEARER = "#{SAML_2_0}:cm:bearer"
|
17
|
+
EMAIL_ADDRESS = "#{NAME_ID_FORMAT_1_1}:emailAddress"
|
18
|
+
INVALID_NAME_ID_POLICY = "#{STATUS}:InvalidNameIDPolicy"
|
19
|
+
METADATA = "#{SAML_2_0}:metadata"
|
20
|
+
PASSWORD = "#{SAML_2_0}:ac:classes:Password"
|
21
21
|
PASSWORD_PROTECTED =
|
22
|
-
"#{SAML_2_0}:ac:classes:PasswordProtectedTransport"
|
23
|
-
PERSISTENT = "#{NAME_ID_FORMAT_2_0}:persistent"
|
24
|
-
PROTOCOL = "#{SAML_2_0}:protocol"
|
25
|
-
REQUESTER_ERROR = "#{STATUS}:Requester"
|
26
|
-
RESPONDER_ERROR = "#{STATUS}:Responder"
|
27
|
-
SUCCESS = "#{STATUS}:Success"
|
28
|
-
TRANSIENT = "#{NAME_ID_FORMAT_2_0}:transient"
|
29
|
-
UNSPECIFIED = "#{SAML_2_0}:consent:unspecified"
|
30
|
-
UNSPECIFIED_NAMEID = "#{NAME_ID_FORMAT_1_1}:unspecified"
|
31
|
-
URI = "#{ATTR_NAME_FORMAT}:uri"
|
32
|
-
VERSION_MISMATCH_ERROR = "#{STATUS}:VersionMismatch"
|
22
|
+
"#{SAML_2_0}:ac:classes:PasswordProtectedTransport"
|
23
|
+
PERSISTENT = "#{NAME_ID_FORMAT_2_0}:persistent"
|
24
|
+
PROTOCOL = "#{SAML_2_0}:protocol"
|
25
|
+
REQUESTER_ERROR = "#{STATUS}:Requester"
|
26
|
+
RESPONDER_ERROR = "#{STATUS}:Responder"
|
27
|
+
SUCCESS = "#{STATUS}:Success"
|
28
|
+
TRANSIENT = "#{NAME_ID_FORMAT_2_0}:transient"
|
29
|
+
UNSPECIFIED = "#{SAML_2_0}:consent:unspecified"
|
30
|
+
UNSPECIFIED_NAMEID = "#{NAME_ID_FORMAT_1_1}:unspecified"
|
31
|
+
URI = "#{ATTR_NAME_FORMAT}:uri"
|
32
|
+
VERSION_MISMATCH_ERROR = "#{STATUS}:VersionMismatch"
|
33
33
|
end
|
34
34
|
end
|
35
35
|
end
|
data/lib/saml/kit/signature.rb
CHANGED
data/lib/saml/kit/version.rb
CHANGED
data/saml-kit.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.description = 'A simple toolkit for working with SAML.'
|
15
15
|
spec.homepage = 'https://github.com/saml-kit/saml-kit'
|
16
16
|
spec.license = 'MIT'
|
17
|
-
spec.required_ruby_version = '
|
17
|
+
spec.required_ruby_version = '~> 2.4'
|
18
18
|
|
19
19
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
20
20
|
(
|
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.add_dependency 'activemodel', '>= 4.2.0'
|
32
32
|
spec.add_dependency 'net-hippie', '~> 0.1'
|
33
33
|
spec.add_dependency 'xml-kit', '>= 0.3.0', '< 1.0.0'
|
34
|
-
spec.add_development_dependency 'bundler', '~>
|
34
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
35
35
|
spec.add_development_dependency 'bundler-audit', '~> 0.6'
|
36
36
|
spec.add_development_dependency 'ffaker', '~> 2.7'
|
37
37
|
spec.add_development_dependency 'rake', '~> 10.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: saml-kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mo khan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -64,14 +64,14 @@ dependencies:
|
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
67
|
+
version: '2.0'
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
74
|
+
version: '2.0'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: bundler-audit
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -334,17 +334,16 @@ require_paths:
|
|
334
334
|
- lib
|
335
335
|
required_ruby_version: !ruby/object:Gem::Requirement
|
336
336
|
requirements:
|
337
|
-
- - "
|
337
|
+
- - "~>"
|
338
338
|
- !ruby/object:Gem::Version
|
339
|
-
version: 2.
|
339
|
+
version: '2.4'
|
340
340
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
341
341
|
requirements:
|
342
342
|
- - ">="
|
343
343
|
- !ruby/object:Gem::Version
|
344
344
|
version: '0'
|
345
345
|
requirements: []
|
346
|
-
|
347
|
-
rubygems_version: 2.4.5.1
|
346
|
+
rubygems_version: 3.0.3
|
348
347
|
signing_key:
|
349
348
|
specification_version: 4
|
350
349
|
summary: A simple toolkit for working with SAML.
|