Skip to content

Commit

Permalink
[SAML] set ACS only with the config.DOMAIN_PROTOCAL that is set
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanBldy committed Oct 16, 2024
1 parent 4b4b1ea commit be5aa08
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions zou/app/utils/saml.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ def saml_client_for(metadata_url):
Given the name of an IdP, return a configuation.
The configuration is a hash for use by saml2.config.Config
"""
acs_url = f"http://{config.DOMAIN_NAME}/api/auth/saml/sso"
https_acs_url = f"https://{config.DOMAIN_NAME}/api/auth/saml/sso"
acs_url = (
f"{config.DOMAIN_PROTOCOL}://{config.DOMAIN_NAME}/api/auth/saml/sso"
)

rv = requests.get(metadata_url)

Expand All @@ -29,8 +30,6 @@ def saml_client_for(metadata_url):
"assertion_consumer_service": [
(acs_url, BINDING_HTTP_REDIRECT),
(acs_url, BINDING_HTTP_POST),
(https_acs_url, BINDING_HTTP_REDIRECT),
(https_acs_url, BINDING_HTTP_POST),
],
},
# Don't verify that the incoming requests originate from us via
Expand Down

0 comments on commit be5aa08

Please sign in to comment.