OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Add debugging output to sso header
Oliver Günther84d9d17bc1f0
diff --git a/app/controllers/concerns/auth_source_sso.rb b/app/controllers/concerns/auth_source_sso.rbindex 9c8bdcc3d0c..41708f797d3 100644--- a/app/controllers/concerns/auth_source_sso.rb+++ b/app/controllers/concerns/auth_source_sso.rb@@ -9,6 +9,7 @@ module AuthSourceSSOreturn user if user || sso_in_progress!return nil unless header_name+ Rails.logger.debug { "Starting header-based auth source SSO for #{header_name}='#{op_auth_header_value}'" }perform_header_ssoend@@ -23,13 +24,17 @@ module AuthSourceSSOenddef read_sso_login- get_validated_login! String(request.headers[header_name])+ get_validated_login! op_auth_header_valueenddef sso_config@sso_config ||= OpenProject::Configuration.auth_source_sso.try(:with_indifferent_access)end+ def op_auth_header_value+ String(request.headers[header_name])+ end+def header_namesso_config && sso_config[:header]end@@ -55,7 +60,7 @@ module AuthSourceSSOendunless login.present?- Rails.logger.error("Secret contained in auth source SSO header #{header_name} is not valid.")+ Rails.logger.error("Provided SSO header #{header_name} is empty or not valid.")return nilend