saml-kit 1.4.0 → 1.4.1
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 +4 -4
- data/CHANGELOG.md +7 -2
- data/Gemfile.lock +53 -27
- data/lib/saml/kit/bindings/http_redirect.rb +12 -1
- data/lib/saml/kit/bindings/url_builder.rb +1 -1
- data/lib/saml/kit/version.rb +1 -1
- data/saml-kit.gemspec +1 -1
- metadata +4 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ce0f7fc307eddfbefa35cbf90a0efba6d38782e51c20e7aa16144e774d6a97d8
|
|
4
|
+
data.tar.gz: fd22e8f11f3b57d8dd7a305367362874eb5073d0b5ee1ffb0ae490a5a5a8fe43
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 58984c2369ed1dc697d634cdde413d3f780de83759bcefd5b7354d1bbbf7ec4cc477ef6821d67915a00bc6b92c8477c2e4dfa991d83727fb1525bcfeb4b114c5
|
|
7
|
+
data.tar.gz: c7c3b3bb94cff25d9d9bb17b2d0e66600763cd302053f0182a261cba4a704af561e6f85167dd330ef2f4deef5c7e06e8eda19858749889c9f8859f24d03798c1
|
data/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Version 1.4.
|
|
1
|
+
Version 1.4.1
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
All notable changes to this project will be documented in this file.
|
|
@@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [1.4.1] - 2026-08-14
|
|
12
|
+
### Changed
|
|
13
|
+
- fix: decode encoded signature
|
|
14
|
+
|
|
11
15
|
## [1.4.0] - 2025-03-26
|
|
12
16
|
### Added
|
|
13
17
|
- Add support for converting `Assertion` xml to `Saml::Document`
|
|
@@ -106,7 +110,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
106
110
|
### Removed
|
|
107
111
|
- Removed optional SessionNotOnOrAfter attribute from AuthnStatement.
|
|
108
112
|
|
|
109
|
-
[Unreleased]: https://github.com/xlgmokha/saml-kit/compare/v1.4.
|
|
113
|
+
[Unreleased]: https://github.com/xlgmokha/saml-kit/compare/v1.4.1...HEAD
|
|
114
|
+
[1.4.1]: https://github.com/xlgmokha/saml-kit/compare/v1.4.0...v1.4.1
|
|
110
115
|
[1.4.0]: https://github.com/xlgmokha/saml-kit/compare/v1.3.0...v1.4.0
|
|
111
116
|
[1.3.0]: https://github.com/xlgmokha/saml-kit/compare/v1.2.0...v1.3.0
|
|
112
117
|
[1.2.0]: https://github.com/xlgmokha/saml-kit/compare/v1.1.0...v1.2.0
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
saml-kit (1.4.
|
|
4
|
+
saml-kit (1.4.1)
|
|
5
5
|
activemodel (>= 5.1)
|
|
6
6
|
base64 (~> 0.1)
|
|
7
7
|
cgi (~> 0.1)
|
|
@@ -16,66 +16,84 @@ PATH
|
|
|
16
16
|
GEM
|
|
17
17
|
remote: https://rubygems.org/
|
|
18
18
|
specs:
|
|
19
|
-
activemodel (
|
|
20
|
-
activesupport (=
|
|
21
|
-
activesupport (
|
|
19
|
+
activemodel (8.1.3.1)
|
|
20
|
+
activesupport (= 8.1.3.1)
|
|
21
|
+
activesupport (8.1.3.1)
|
|
22
22
|
base64
|
|
23
|
-
benchmark (>= 0.3)
|
|
24
23
|
bigdecimal
|
|
25
24
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
26
25
|
connection_pool (>= 2.2.5)
|
|
27
26
|
drb
|
|
28
27
|
i18n (>= 1.6, < 2)
|
|
28
|
+
json
|
|
29
29
|
logger (>= 1.4.2)
|
|
30
30
|
minitest (>= 5.1)
|
|
31
31
|
securerandom (>= 0.3)
|
|
32
32
|
tzinfo (~> 2.0, >= 2.0.5)
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
uri (>= 0.13.1)
|
|
34
|
+
addressable (2.9.0)
|
|
35
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
35
36
|
ast (2.4.3)
|
|
36
|
-
base64 (0.
|
|
37
|
-
benchmark (0.4.0)
|
|
37
|
+
base64 (0.3.0)
|
|
38
38
|
benchmark-malloc (0.2.0)
|
|
39
39
|
benchmark-perf (0.6.0)
|
|
40
40
|
benchmark-trend (0.4.0)
|
|
41
|
-
bigdecimal (
|
|
41
|
+
bigdecimal (4.1.2)
|
|
42
42
|
builder (3.3.0)
|
|
43
43
|
bundler-audit (0.9.2)
|
|
44
44
|
bundler (>= 1.2.0, < 3)
|
|
45
45
|
thor (~> 1.0)
|
|
46
|
-
cgi (0.
|
|
47
|
-
concurrent-ruby (1.3.
|
|
48
|
-
connection_pool (
|
|
46
|
+
cgi (0.5.2)
|
|
47
|
+
concurrent-ruby (1.3.8)
|
|
48
|
+
connection_pool (3.0.2)
|
|
49
49
|
crack (1.0.0)
|
|
50
50
|
bigdecimal
|
|
51
51
|
rexml
|
|
52
52
|
date (3.4.1)
|
|
53
53
|
diff-lcs (1.6.1)
|
|
54
54
|
docile (1.4.1)
|
|
55
|
-
drb (2.2.
|
|
56
|
-
erb (4.0.4)
|
|
55
|
+
drb (2.2.3)
|
|
56
|
+
erb (4.0.4.1)
|
|
57
57
|
cgi (>= 0.3.3)
|
|
58
58
|
ffaker (2.24.0)
|
|
59
59
|
forwardable (1.3.3)
|
|
60
60
|
hashdiff (1.1.2)
|
|
61
|
-
i18n (1.
|
|
61
|
+
i18n (1.15.2)
|
|
62
62
|
concurrent-ruby (~> 1.0)
|
|
63
63
|
io-console (0.8.0)
|
|
64
64
|
irb (1.15.1)
|
|
65
65
|
pp (>= 0.6.0)
|
|
66
66
|
rdoc (>= 4.0.0)
|
|
67
67
|
reline (>= 0.4.2)
|
|
68
|
-
json (2.
|
|
68
|
+
json (2.21.2)
|
|
69
69
|
language_server-protocol (3.17.0.4)
|
|
70
70
|
lint_roller (1.1.0)
|
|
71
|
-
logger (1.
|
|
72
|
-
mini_portile2 (2.8.
|
|
73
|
-
minitest (
|
|
71
|
+
logger (1.7.0)
|
|
72
|
+
mini_portile2 (2.8.9)
|
|
73
|
+
minitest (6.0.6)
|
|
74
|
+
drb (~> 2.0)
|
|
75
|
+
prism (~> 1.5)
|
|
74
76
|
net-hippie (1.2.0)
|
|
75
77
|
logger (~> 1.0)
|
|
76
|
-
nokogiri (1.
|
|
78
|
+
nokogiri (1.19.4)
|
|
77
79
|
mini_portile2 (~> 2.8.2)
|
|
78
80
|
racc (~> 1.4)
|
|
81
|
+
nokogiri (1.19.4-aarch64-linux-gnu)
|
|
82
|
+
racc (~> 1.4)
|
|
83
|
+
nokogiri (1.19.4-aarch64-linux-musl)
|
|
84
|
+
racc (~> 1.4)
|
|
85
|
+
nokogiri (1.19.4-arm-linux-gnu)
|
|
86
|
+
racc (~> 1.4)
|
|
87
|
+
nokogiri (1.19.4-arm-linux-musl)
|
|
88
|
+
racc (~> 1.4)
|
|
89
|
+
nokogiri (1.19.4-arm64-darwin)
|
|
90
|
+
racc (~> 1.4)
|
|
91
|
+
nokogiri (1.19.4-x86_64-darwin)
|
|
92
|
+
racc (~> 1.4)
|
|
93
|
+
nokogiri (1.19.4-x86_64-linux-gnu)
|
|
94
|
+
racc (~> 1.4)
|
|
95
|
+
nokogiri (1.19.4-x86_64-linux-musl)
|
|
96
|
+
racc (~> 1.4)
|
|
79
97
|
parallel (1.26.3)
|
|
80
98
|
parser (3.3.7.3)
|
|
81
99
|
ast (~> 2.4.1)
|
|
@@ -83,11 +101,11 @@ GEM
|
|
|
83
101
|
pp (0.6.2)
|
|
84
102
|
prettyprint
|
|
85
103
|
prettyprint (0.2.0)
|
|
86
|
-
prism (1.
|
|
104
|
+
prism (1.9.0)
|
|
87
105
|
psych (5.2.3)
|
|
88
106
|
date
|
|
89
107
|
stringio
|
|
90
|
-
public_suffix (
|
|
108
|
+
public_suffix (7.0.5)
|
|
91
109
|
racc (1.8.1)
|
|
92
110
|
rainbow (3.1.1)
|
|
93
111
|
rake (13.2.1)
|
|
@@ -96,7 +114,7 @@ GEM
|
|
|
96
114
|
regexp_parser (2.10.0)
|
|
97
115
|
reline (0.6.0)
|
|
98
116
|
io-console (~> 0.5)
|
|
99
|
-
rexml (3.4.
|
|
117
|
+
rexml (3.4.4)
|
|
100
118
|
rspec (3.13.0)
|
|
101
119
|
rspec-core (~> 3.13.0)
|
|
102
120
|
rspec-expectations (~> 3.13.0)
|
|
@@ -141,15 +159,15 @@ GEM
|
|
|
141
159
|
simplecov_json_formatter (~> 0.1)
|
|
142
160
|
simplecov-html (0.13.1)
|
|
143
161
|
simplecov_json_formatter (0.1.4)
|
|
144
|
-
stringio (3.
|
|
162
|
+
stringio (3.2.0)
|
|
145
163
|
thor (1.3.2)
|
|
146
164
|
tilt (2.6.0)
|
|
147
165
|
tzinfo (2.0.6)
|
|
148
166
|
concurrent-ruby (~> 1.0)
|
|
149
167
|
unicode-display_width (3.1.4)
|
|
150
168
|
unicode-emoji (~> 4.0, >= 4.0.4)
|
|
151
|
-
unicode-emoji (4.0
|
|
152
|
-
uri (1.
|
|
169
|
+
unicode-emoji (4.2.0)
|
|
170
|
+
uri (1.1.1)
|
|
153
171
|
webmock (3.25.1)
|
|
154
172
|
addressable (>= 2.8.0)
|
|
155
173
|
crack (>= 0.3.2)
|
|
@@ -164,7 +182,15 @@ GEM
|
|
|
164
182
|
nokogiri (>= 1.6.8, < 2.0.0)
|
|
165
183
|
|
|
166
184
|
PLATFORMS
|
|
185
|
+
aarch64-linux-gnu
|
|
186
|
+
aarch64-linux-musl
|
|
187
|
+
arm-linux-gnu
|
|
188
|
+
arm-linux-musl
|
|
189
|
+
arm64-darwin
|
|
167
190
|
ruby
|
|
191
|
+
x86_64-darwin
|
|
192
|
+
x86_64-linux-gnu
|
|
193
|
+
x86_64-linux-musl
|
|
168
194
|
|
|
169
195
|
DEPENDENCIES
|
|
170
196
|
bundler (~> 2.0)
|
|
@@ -49,13 +49,24 @@ module Saml
|
|
|
49
49
|
|
|
50
50
|
return document.signature_verified! if provider.verify(
|
|
51
51
|
algorithm_for(params[:SigAlg]),
|
|
52
|
-
decode(signature),
|
|
52
|
+
decode(signature_from(signature)),
|
|
53
53
|
canonicalize(params)
|
|
54
54
|
)
|
|
55
55
|
|
|
56
56
|
raise ArgumentError, 'Invalid Signature'
|
|
57
57
|
end
|
|
58
58
|
|
|
59
|
+
# The signature arrives percent encoded from any conformant peer, but
|
|
60
|
+
# versions of this library before 1.4.1 emitted it raw. A percent sign
|
|
61
|
+
# is not in the base64 alphabet, so its presence distinguishes the two
|
|
62
|
+
# without a guess. Unescaping unconditionally would corrupt a raw
|
|
63
|
+
# signature, because CGI.unescape turns + into a space.
|
|
64
|
+
#
|
|
65
|
+
# @param signature [String] the Signature query parameter.
|
|
66
|
+
def signature_from(signature)
|
|
67
|
+
signature.include?('%') ? unescape(signature) : signature
|
|
68
|
+
end
|
|
69
|
+
|
|
59
70
|
def canonicalize(params)
|
|
60
71
|
%i[SAMLRequest SAMLResponse RelayState SigAlg].map do |key|
|
|
61
72
|
value = params[key]
|
|
@@ -21,7 +21,7 @@ module Saml
|
|
|
21
21
|
destination = document.destination
|
|
22
22
|
if configuration.sign?
|
|
23
23
|
payload = canonicalize(document, relay_state)
|
|
24
|
-
"#{destination}?#{payload}&Signature=#{signature_for(payload)}"
|
|
24
|
+
"#{destination}?#{payload}&Signature=#{escape(signature_for(payload))}"
|
|
25
25
|
else
|
|
26
26
|
"#{destination}?" + to_query_string(
|
|
27
27
|
document.query_string_parameter => serialize(document.to_xml),
|
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/xlgmokha/saml-kit'
|
|
16
16
|
spec.license = 'MIT'
|
|
17
|
-
spec.required_ruby_version = '>= 3.
|
|
17
|
+
spec.required_ruby_version = '>= 3.2.0'
|
|
18
18
|
|
|
19
19
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
|
20
20
|
(
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: saml-kit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.4.
|
|
4
|
+
version: 1.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- mo khan
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: activemodel
|
|
@@ -448,7 +447,6 @@ licenses:
|
|
|
448
447
|
- MIT
|
|
449
448
|
metadata:
|
|
450
449
|
yard.run: yri
|
|
451
|
-
post_install_message:
|
|
452
450
|
rdoc_options: []
|
|
453
451
|
require_paths:
|
|
454
452
|
- lib
|
|
@@ -456,15 +454,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
456
454
|
requirements:
|
|
457
455
|
- - ">="
|
|
458
456
|
- !ruby/object:Gem::Version
|
|
459
|
-
version: 3.
|
|
457
|
+
version: 3.2.0
|
|
460
458
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
461
459
|
requirements:
|
|
462
460
|
- - ">="
|
|
463
461
|
- !ruby/object:Gem::Version
|
|
464
462
|
version: '0'
|
|
465
463
|
requirements: []
|
|
466
|
-
rubygems_version:
|
|
467
|
-
signing_key:
|
|
464
|
+
rubygems_version: 4.0.18
|
|
468
465
|
specification_version: 4
|
|
469
466
|
summary: A simple toolkit for working with SAML.
|
|
470
467
|
test_files: []
|