jwt_auth_cognito 1.0.0.pre.beta.6 → 1.0.0.pre.beta.7
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18bc858f283dfe36ce2b0a160dd1ba1003d76ac13203985ff5b3e3384489fcc7
|
4
|
+
data.tar.gz: b2418e0113b7891fa6de56404832011e680e19fa5a8b4882087bafa9787485c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6148669c5e2816b9f2730ae4b0af50bcfae6873c1420a7d9e2040943859018c160327d038e97f7b5aa56b4416ae5a033f0ab101650fcdb7229dd3880bdf31235
|
7
|
+
data.tar.gz: baceecd5ab1bf12d73dbc79c119c6c66fa006dee4fc14fc5726fe34919053b4fc6df67e3a8dd59df5e3d827cb1ad76e61ffe3bcb6996b3e57780839329365c91
|
@@ -6,7 +6,6 @@ module JwtAuthCognito
|
|
6
6
|
:redis_host, :redis_port, :redis_password, :redis_db,
|
7
7
|
:redis_ssl, :redis_timeout, :redis_connect_timeout, :redis_read_timeout,
|
8
8
|
:redis_ca_cert_path, :redis_ca_cert_name, :redis_verify_mode,
|
9
|
-
:redis_tls_min_version, :redis_tls_max_version,
|
10
9
|
:jwks_cache_ttl, :validation_mode, :environment,
|
11
10
|
:enable_api_key_validation, :enable_user_data_retrieval
|
12
11
|
|
@@ -30,8 +29,6 @@ module JwtAuthCognito
|
|
30
29
|
@redis_ca_cert_path = ENV.fetch('REDIS_CA_CERT_PATH', nil)
|
31
30
|
@redis_ca_cert_name = ENV.fetch('REDIS_CA_CERT_NAME', nil)
|
32
31
|
@redis_verify_mode = ENV['REDIS_VERIFY_MODE'] || 'peer'
|
33
|
-
@redis_tls_min_version = ENV['REDIS_TLS_MIN_VERSION'] || 'TLSv1_2'
|
34
|
-
@redis_tls_max_version = ENV['REDIS_TLS_MAX_VERSION'] || 'TLSv1_3'
|
35
32
|
|
36
33
|
@jwks_cache_ttl = (ENV['JWKS_CACHE_TTL'] || 3600).to_i # 1 hour
|
37
34
|
@environment = ENV['RAILS_ENV'] || ENV['RACK_ENV'] || ENV['NODE_ENV'] || 'development'
|
@@ -163,11 +163,6 @@ module JwtAuthCognito
|
|
163
163
|
def build_ssl_params
|
164
164
|
ssl_params = {}
|
165
165
|
|
166
|
-
# Set TLS version constraints
|
167
|
-
ssl_params[:min_version] = parse_tls_version(@config.redis_tls_min_version) if @config.redis_tls_min_version
|
168
|
-
|
169
|
-
ssl_params[:max_version] = parse_tls_version(@config.redis_tls_max_version) if @config.redis_tls_max_version
|
170
|
-
|
171
166
|
# CA certificate configuration with multiple sources
|
172
167
|
ca_cert_data = load_ca_certificate
|
173
168
|
if ca_cert_data
|
@@ -235,20 +230,5 @@ module JwtAuthCognito
|
|
235
230
|
puts '⚠️ No CA certificate found, proceeding without certificate validation'
|
236
231
|
nil
|
237
232
|
end
|
238
|
-
|
239
|
-
def parse_tls_version(version_string)
|
240
|
-
case version_string.upcase
|
241
|
-
when 'TLSV1.2', 'TLSV1_2'
|
242
|
-
:TLSv1_2
|
243
|
-
when 'TLSV1.3', 'TLSV1_3'
|
244
|
-
:TLSv1_3
|
245
|
-
when 'TLSV1.1', 'TLSV1_1'
|
246
|
-
:TLSv1_1
|
247
|
-
when 'TLSV1', 'TLSV1_0'
|
248
|
-
:TLSv1
|
249
|
-
else
|
250
|
-
:TLSv1_2 # Default to TLS 1.2
|
251
|
-
end
|
252
|
-
end
|
253
233
|
end
|
254
234
|
end
|