saml_idp 0.8.1 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/saml_idp/controller.rb +6 -4
- data/lib/saml_idp/incoming_metadata.rb +5 -0
- data/lib/saml_idp/version.rb +1 -1
- data/saml_idp.gemspec +1 -1
- data/spec/lib/saml_idp/incoming_metadata_spec.rb +5 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4692b2d2c5266c2db128e4942daddd534c7e22efe32f1f45b02776db2eb8b607
|
4
|
+
data.tar.gz: cc0b169ea2d024b91590e270c6a6cbe742a661280651917147eb0401f821c6a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d1eaa0e214b1c2cb17970987fc0956c991e33831a05f7bf40936180f6a4fc2a22d5539051b456f7a920a49b7cbd98e83296ae55858025351e9fb693a6f6d595
|
7
|
+
data.tar.gz: 587c1ca1bc298dc8381bd50e49bd3b361fd011b4ae7509107f2336ec2b9cbc30bd625915a76d5833ebbe7c36eb9181acbee2f1f8b60dae0cb71f27a0436a9fec
|
data/lib/saml_idp/controller.rb
CHANGED
@@ -36,10 +36,12 @@ module SamlIdp
|
|
36
36
|
def validate_saml_request(raw_saml_request = params[:SAMLRequest])
|
37
37
|
decode_request(raw_saml_request)
|
38
38
|
return true if valid_saml_request?
|
39
|
-
if Rails
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
if defined?(::Rails)
|
40
|
+
if Rails::VERSION::MAJOR >= 4
|
41
|
+
head :forbidden
|
42
|
+
else
|
43
|
+
render nothing: true, status: :forbidden
|
44
|
+
end
|
43
45
|
end
|
44
46
|
false
|
45
47
|
end
|
@@ -16,6 +16,11 @@ module SamlIdp
|
|
16
16
|
@document ||= Saml::XML::Document.parse raw
|
17
17
|
end
|
18
18
|
|
19
|
+
def entity_id
|
20
|
+
xpath('//md:EntityDescriptor/@entityID', md: metadata_namespace).first.try(:content).to_s
|
21
|
+
end
|
22
|
+
hashable :entity_id
|
23
|
+
|
19
24
|
def sign_assertions
|
20
25
|
doc = xpath(
|
21
26
|
"//md:SPSSODescriptor",
|
data/lib/saml_idp/version.rb
CHANGED
data/saml_idp.gemspec
CHANGED
@@ -51,7 +51,7 @@ section of the README.
|
|
51
51
|
s.add_development_dependency('rake')
|
52
52
|
s.add_development_dependency('simplecov')
|
53
53
|
s.add_development_dependency('rspec', '>= 3.7.0')
|
54
|
-
s.add_development_dependency('ruby-saml', '>= 1.
|
54
|
+
s.add_development_dependency('ruby-saml', '>= 1.7.2')
|
55
55
|
s.add_development_dependency('rails', '>= 3.2')
|
56
56
|
s.add_development_dependency('activeresource', '>= 3.2')
|
57
57
|
s.add_development_dependency('capybara', '>= 2.16')
|
@@ -28,6 +28,11 @@ module SamlIdp
|
|
28
28
|
expect(metadata.sign_assertions).to eq(false)
|
29
29
|
end
|
30
30
|
|
31
|
+
it 'should properly set entity_id as https://test-saml.com/saml' do
|
32
|
+
metadata = SamlIdp::IncomingMetadata.new(metadata_1)
|
33
|
+
expect(metadata.entity_id).to eq('https://test-saml.com/saml')
|
34
|
+
end
|
35
|
+
|
31
36
|
it 'should properly set sign_assertions to true' do
|
32
37
|
metadata = SamlIdp::IncomingMetadata.new(metadata_2)
|
33
38
|
expect(metadata.sign_assertions).to eq(true)
|
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.9.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: 2020-01-
|
11
|
+
date: 2020-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
117
|
+
version: 1.7.2
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
124
|
+
version: 1.7.2
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: rails
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -347,7 +347,7 @@ metadata:
|
|
347
347
|
homepage_uri: https://github.com/saml-idp/saml_idp
|
348
348
|
source_code_uri: https://github.com/saml-idp/saml_idp
|
349
349
|
bug_tracker_uri: https://github.com/saml-idp/saml_idp/issues
|
350
|
-
documentation_uri: http://rdoc.info/gems/saml_idp/0.
|
350
|
+
documentation_uri: http://rdoc.info/gems/saml_idp/0.9.0
|
351
351
|
post_install_message: |
|
352
352
|
If you're just recently updating saml_idp - please be aware we've changed the default
|
353
353
|
certificate. See the PR and a description of why we've done this here:
|