Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

saml: allow specification of the IdP entityid #8630

Merged
merged 10 commits into from
Nov 19, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/8630.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow specification of the SAML IdP if the metadata returns multiple IdPs.
3 changes: 2 additions & 1 deletion synapse/handlers/saml_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class SamlHandler:
def __init__(self, hs: "synapse.server.HomeServer"):
self.hs = hs
self._saml_client = Saml2Client(hs.config.saml2_sp_config)
self._saml_idp_entityid = hs.config.saml2_sp_config.getattr("idp")
self._auth = hs.get_auth()
self._auth_handler = hs.get_auth_handler()
self._registration_handler = hs.get_registration_handler()
Expand Down Expand Up @@ -124,7 +125,7 @@ def handle_redirect_request(
URL to redirect to
"""
reqid, info = self._saml_client.prepare_for_authenticate(
relay_state=client_redirect_url
entityid=self._saml_idp_entityid, relay_state=client_redirect_url
)

# Since SAML sessions timeout it is useful to log when they were created.
Expand Down