mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 20:14:08 +00:00
feat: add SSL_CA_FILE and SSL_VERIFY environment variables to support… (#894)
* feat: add SSL_CA_FILE and SSL_VERIFY environment variables to support self-signed certificates in self-hosted environments * fix: NoMethodError by defining SSL helper methods before configure block executes * refactor: Refactor SessionsController to use shared SslConfigurable module and simplify SSL initializer redundant checks * refactor: improve SSL configuration robustness and error detection accuracy * fix:HTTParty SSL options, add file validation guards, prevent Tempfile GC, and redact URLs in error logs * fix: Fix SSL concern indentation and stub Simplefin POST correctly in tests * fix: normalize ssl_verify to always return boolean instead of nil * fix: solve failing SimpleFin test * refactor: trim unused error-handling code from SslConfigurable, replace Tempfile with fixed-path CA bundle, fix namespace pollution in initializers, and add unit tests for core SSL configuration and Langfuse CRL callback. * fix: added require ileutils in the initializer and require ostruct in the test file. * fix: solve autoload conflict that broke provider loading, validate all certs in PEM bundles, and add missing requires.
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
class SessionsController < ApplicationController
|
||||
extend SslConfigurable
|
||||
|
||||
before_action :set_session, only: :destroy
|
||||
skip_authentication only: %i[index new create openid_connect failure post_logout mobile_sso_start]
|
||||
|
||||
@@ -305,7 +307,7 @@ class SessionsController < ApplicationController
|
||||
if provider_config[:strategy] == "openid_connect" && provider_config[:issuer].present?
|
||||
begin
|
||||
discovery_url = discovery_url_for(provider_config[:issuer])
|
||||
response = Faraday.get(discovery_url) do |req|
|
||||
response = Faraday.new(ssl: self.class.faraday_ssl_options).get(discovery_url) do |req|
|
||||
req.options.timeout = 5
|
||||
req.options.open_timeout = 3
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user