saml_camel 1.0.9 → 1.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/saml_camel/service_provider.rb +6 -3
- data/lib/saml_camel/version.rb +1 -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: 8883a80247875fe73ecb79704abaf9b0a249924b2b8df5582e6767ee49a3428b
|
4
|
+
data.tar.gz: 411a4be30453d4bb258065096062a6c6ce0cb89eca2ad852d9582eac8f978c1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2f154ff374ab4aa74deaf11623b693b2373a872b1a6a5dcea008fee4914b32202e8f0cfbd1978934af6355787d5fc7cbdf89d7372d3e01c7eb7761ef7fcc007
|
7
|
+
data.tar.gz: 59eb90047c7ef00faf38ca5bef9a7b371ae9de4f677c2f12d94cf8305ed1ebb0b835c2f99c7bd93c3a438d6bce0d02ef1c242c0f2a98a7e338fa5c205145031e
|
@@ -28,7 +28,7 @@ module SamlCamel
|
|
28
28
|
clock_drift = set_clock_drift
|
29
29
|
settings = SamlCamel::Transaction.saml_settings(raw_response: raw_response)
|
30
30
|
if clock_drift
|
31
|
-
response
|
31
|
+
response = OneLogin::RubySaml::Response.new(idp_response, settings: settings, allowed_clock_drift: 2.second)
|
32
32
|
else
|
33
33
|
response = OneLogin::RubySaml::Response.new(idp_response, settings: settings)
|
34
34
|
end
|
@@ -41,14 +41,16 @@ module SamlCamel
|
|
41
41
|
# however when I pulled the ruby-saml gem and searched the repo it looks like there is no clock drift by default
|
42
42
|
def self.set_clock_drift
|
43
43
|
clock_drift = SP_SETTINGS.dig('settings','clock_drift')
|
44
|
+
return false if !clock_drift
|
45
|
+
|
44
46
|
# clock drift must either be an integer of falsey, classes have come through
|
45
47
|
# differently (fixnum, bignum, integer), using a regex instead to see if that
|
46
48
|
# addresses some issues https://stackoverflow.com/questions/16774064/regular-expression-for-whole-numbers-and-integers
|
47
|
-
|
49
|
+
if !clock_drift.to_s.match(/(?<![-.])\b[0-9]+\b(?!\.[0-9])/)
|
48
50
|
SamlCamel::Logging.clock_drift(clock_drift)
|
49
51
|
raise "Clock Drift Incorrectly Configured."
|
50
52
|
end
|
51
|
-
|
53
|
+
clock_drift.to_i
|
52
54
|
end
|
53
55
|
|
54
56
|
|
@@ -147,6 +149,7 @@ module SamlCamel
|
|
147
149
|
sp_lifetime = SP_SETTINGS['settings']['sp_session_lifetime']
|
148
150
|
|
149
151
|
SamlCamel::Logging.debug("Setting lifetime of session. Lifetime of #{sp_lifetime} hours") if SP_DEBUG
|
152
|
+
Rails.cache.delete(@cache_permit_key)
|
150
153
|
Rails.cache.fetch(@cache_permit_key, expires_in: sp_lifetime.hours) do
|
151
154
|
user_saml_cache
|
152
155
|
end
|
data/lib/saml_camel/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: saml_camel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 'Danai Adkisson '
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
139
|
- !ruby/object:Gem::Version
|
140
140
|
version: '0'
|
141
141
|
requirements: []
|
142
|
-
rubygems_version: 3.
|
142
|
+
rubygems_version: 3.1.2
|
143
143
|
signing_key:
|
144
144
|
specification_version: 4
|
145
145
|
summary: SAML tool wrapping onelogin/rubysaml
|