add dolist saml config
This commit is contained in:
parent
efbec80af8
commit
3d175f107e
3 changed files with 33 additions and 5 deletions
|
@ -2,6 +2,30 @@
|
|||
# So we fetch env var directly here
|
||||
|
||||
if ENV['SAML_IDP_ENABLED'] == 'enabled'
|
||||
SamlIdp.config.x509_certificate = ENV.fetch("SAML_IDP_CERTIFICATE")
|
||||
SamlIdp.config.secret_key = ENV.fetch("SAML_IDP_SECRET_KEY")
|
||||
SamlIdp.configure do |config|
|
||||
config.base_saml_location = "https://#{ENV['APP_HOST']}/saml/metadata"
|
||||
config.x509_certificate = ENV.fetch("SAML_IDP_CERTIFICATE")
|
||||
config.secret_key = ENV.fetch("SAML_IDP_SECRET_KEY")
|
||||
|
||||
config.name_id.formats = {
|
||||
"1.1" => {
|
||||
email_address: -> (principal) { principal.email }
|
||||
},
|
||||
"2.0" => {
|
||||
transient: -> (principal) { principal.email },
|
||||
persistent: -> (p) { p.id }
|
||||
}
|
||||
}
|
||||
|
||||
service_providers = {
|
||||
"https://#{ENV.fetch('SAML_DOLIST_HOST')}" => {
|
||||
response_hosts: [ENV.fetch('SAML_DOLIST_HOST')],
|
||||
cert: ENV.fetch("SAML_DOLIST_CERTIFICATE")
|
||||
}
|
||||
}
|
||||
|
||||
config.service_provider.finder = -> (entity_id) do
|
||||
service_providers[entity_id]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue