Mehrere IdP oder SP in shibboleth2.xml konfigurieren
Um mehrere Anwendungen auf einem System via Shibboleth Anmeldung bereitzustellen, werden Application Overrides verwendet.
Diese werden wir am Beispiel einer Test- und Produktivumgebung erläutern.
Zum einem sollte hierbei sichergestellt sein, dass die an Shibboleth anzubindende Applikation, einmal als Test- und einmal als Produktiv-Applikation bereitgestellt wird.
Desweiteren sollten Sie im Apache (o.ä.) pro Anwendung einen eigenen Vhost einrichten, unter dem die Anwendung erreicht werden kann. https://httpd.apache.org/docs/2.4/vhosts/
Nun folgt der für uns interessante Teil. Die spezifischen Einstellungen in der shibboleth2.xml.
ApplicationOverride konfigurieren
... <!-- To customize behavior, map hostnames and path components to applicationId and other settings. --> <RequestMapper type="Native"> <RequestMap applicationId="default"> <!-- The example requires a session for documents in /secure on the containing host with http and https on the default ports. Note that the name and port in the <Host> elements MUST match Apache's ServerName and Port directives or the IIS Site name in the <ISAPI> element below. --> <Host name="test.rwth-aachen.de">
<Path name="anwendungtest" authType="shibboleth" requireSession="true" applicationId="anwendungtest" /> </Host> <Host name="produktiv.rwth-aachen.de">
<Path name="anwendungprod" authType="shibboleth" requireSession="true" applicationId="anwendungprod" /> </Host> </RequestMap> </RequestMapper> <!-- The ApplicationDefaults element is where most of Shibboleth's SAML bits are defined. Resource requests are mapped by the RequestMapper to an applicationId that points into to this section. --> <ApplicationDefaults id="default" policyId="default" entityID="https://produktiv.rwth-aachen.de/shibboleth2" REMOTE_USER="eppn persistent-id targeted-id" signing="false" encryption="false"> ... <ApplicationOverride id="anwendungtest" entityID="https://test.rwth-aachen.de/anwendungtest/shibboleth" homeURL="https://test.rwth-aachen.de/anwendungtest"> <Sessions lifetime="28800" timeout="3600" checkAddress="false" consistentAddress="false" handlerURL="/anendungtest/Shibboleth.sso" handlerSSL="true" exportLocation="http://localhost/Shibboleth.sso/GetAssertion" exportACL="127.0.0.1" idpHistory="false" idpHistoryDays="7" cookieProps="https" redirectLimit="exact">
<!-- SSO verfügbar ab Shibboleth Service Provider (shibd) Version 2.4, ansonsten hier weiterhin <SessionInitiator> verwenden --> <SSO entityID="https://login-test.rz.rwth-aachen.de/shibboleth"> SAML2 </SSO> </Sessions> <MetadataProvider type="XML" uri="https://sso-test.rwth-aachen.de/metadata/rwth.metadata.xml" backingFilePath="sso-test.rwth.metadata.xml" reloadInterval="7200"> <MetadataFilter type="Signature" certificate="/Pfad/zum/sso.pem"/> </MetadataProvider> </ApplicationOverride>
<!-- produktiv ist jetzt eigentlich nicht nötig, da als Default definiert. Aber hier nochmal um den Unterschied darzustellen: --> <ApplicationOverride id="anwendungprod" entityID="https://produktiv.rwth-aachen.de/anwendungprod/shibboleth" homeURL="https://produktiv.rwth-aachen.de/anwendungprod"> <Sessions lifetime="28800" timeout="3600" checkAddress="false" consistentAddress="false" handlerURL="/anendungprod/Shibboleth.sso" handlerSSL="true" exportLocation="http://localhost/Shibboleth.sso/GetAssertion" exportACL="127.0.0.1" idpHistory="false" idpHistoryDays="7" cookieProps="https" redirectLimit="exact"> <SSO entityID="https://login.rz.rwth-aachen.de/shibboleth"> SAML2 </SSO> </Sessions> <MetadataProvider type="XML" uri="https://sso.rwth-aachen.de/metadata/rwth.metadata.xml" backingFilePath="sso.rwth.metadata.xml" reloadInterval="7200"> <MetadataFilter type="Signature" certificate="/Pfad/zum/sso.pem"/> </MetadataProvider> </ApplicationOverride> ... |
Als Ergänzung hier noch die offizielle Dokumentation: https://wiki.shibboleth.net/confluence/x/fIBC, https://wiki.shibboleth.net/confluence/x/yYBC