saml_idp 0.15.0 → 0.16.0
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/README.md +0 -1
- data/lib/saml_idp/controller.rb +1 -1
- data/lib/saml_idp/request.rb +3 -3
- data/lib/saml_idp/version.rb +1 -1
- data/spec/lib/saml_idp/controller_spec.rb +6 -0
- data/spec/lib/saml_idp/request_spec.rb +17 -0
- data/spec/support/saml_request_macros.rb +3 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cd98d292836070eddac0b7f710dbd15b0d3611cc849de827b999c3a2fa12d86
|
4
|
+
data.tar.gz: f49f1035b63375d5b8aebfd38484c1859d8ac35520f82df92fc698cea00dde1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ab18f32c643b5c8be43a093349ff5c1c0f3142b8156fb650f749ffde2ce1306e104d4006178f77f27055bc6683a35ffbf8aa1d79331140b9c94ae7a2a1da7ee
|
7
|
+
data.tar.gz: e68e9a8f0dd08f5dd9aa31c8ff8461ca229b97cbc5e9813eed9c3575ee65bafd2c766bcfd19d9081d0956bab62b8819574b8765be692156d10967589a791cda3
|
data/README.md
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
Forked from <https://github.com/lawrencepit/ruby-saml-idp>
|
4
4
|
|
5
|
-
[](https://travis-ci.org/saml-idp/saml_idp)
|
6
5
|
[](http://badge.fury.io/rb/saml_idp)
|
7
6
|
|
8
7
|
The ruby SAML Identity Provider library is for implementing the server side of SAML authentication. It allows
|
data/lib/saml_idp/controller.rb
CHANGED
data/lib/saml_idp/request.rb
CHANGED
data/lib/saml_idp/version.rb
CHANGED
@@ -91,6 +91,12 @@ describe SamlIdp::Controller do
|
|
91
91
|
expect(response.issuer).to eq("http://example.com")
|
92
92
|
end
|
93
93
|
|
94
|
+
it "should by default create a SAML Response with a signed assertion" do
|
95
|
+
saml_response = encode_response(principal)
|
96
|
+
response = OneLogin::RubySaml::Response.new(saml_response)
|
97
|
+
response.settings = saml_settings("https://foo.example.com/saml/consume", true)
|
98
|
+
expect(response.is_valid?).to be_truthy
|
99
|
+
end
|
94
100
|
|
95
101
|
[:sha1, :sha256, :sha384, :sha512].each do |algorithm_name|
|
96
102
|
it "should create a SAML Response using the #{algorithm_name} algorithm" do
|
@@ -91,6 +91,23 @@ module SamlIdp
|
|
91
91
|
end
|
92
92
|
end
|
93
93
|
|
94
|
+
context 'a Logger-like logger is configured' do
|
95
|
+
let(:logger) do
|
96
|
+
Class.new {
|
97
|
+
def info(msg); end
|
98
|
+
}.new
|
99
|
+
end
|
100
|
+
|
101
|
+
before do
|
102
|
+
allow(logger).to receive(:info)
|
103
|
+
end
|
104
|
+
|
105
|
+
it 'logs an error message' do
|
106
|
+
expect(subject.valid?).to be false
|
107
|
+
expect(logger).to have_received(:info).with('Unable to find service provider for issuer ')
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
94
111
|
context 'a logger lambda is configured' do
|
95
112
|
let(:logger) { double }
|
96
113
|
|
@@ -40,7 +40,8 @@ module SamlRequestMacros
|
|
40
40
|
logout_requests_signed: true,
|
41
41
|
logout_responses_signed: true,
|
42
42
|
digest_method: XMLSecurity::Document::SHA256,
|
43
|
-
signature_method: XMLSecurity::Document::RSA_SHA256
|
43
|
+
signature_method: XMLSecurity::Document::RSA_SHA256,
|
44
|
+
assertions_signed: true)
|
44
45
|
# Security section
|
45
46
|
settings.idp_cert = SamlIdp::Default::X509_CERTIFICATE
|
46
47
|
# Signed embedded singature
|
@@ -51,6 +52,7 @@ module SamlRequestMacros
|
|
51
52
|
settings.security[:metadata_signed] = digest_method
|
52
53
|
settings.security[:digest_method] = digest_method
|
53
54
|
settings.security[:signature_method] = signature_method
|
55
|
+
settings.security[:want_assertions_signed] = assertions_signed
|
54
56
|
settings.private_key = sp_pv_key
|
55
57
|
settings.certificate = sp_x509_cert
|
56
58
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: saml_idp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Phenow
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -365,7 +365,7 @@ metadata:
|
|
365
365
|
homepage_uri: https://github.com/saml-idp/saml_idp
|
366
366
|
source_code_uri: https://github.com/saml-idp/saml_idp
|
367
367
|
bug_tracker_uri: https://github.com/saml-idp/saml_idp/issues
|
368
|
-
documentation_uri: http://rdoc.info/gems/saml_idp/0.
|
368
|
+
documentation_uri: http://rdoc.info/gems/saml_idp/0.16.0
|
369
369
|
post_install_message: |2
|
370
370
|
If you're just recently updating saml_idp - please be aware we've changed the default
|
371
371
|
certificate. See the PR and a description of why we've done this here:
|