Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende ÜberarbeitungLetzte ÜberarbeitungBeide Seiten der Revision |
de:shibidp-install [2020/04/06 16:13] – Silke Meyer | de:shibidp-install [2020/04/07 13:50] – [Tomcat-Neustart und erster Test] Silke Meyer |
---|
===== IdP herunterladen ===== | ===== IdP herunterladen ===== |
| |
Laden Sie den Shibboleth IdP herunter, prüfen Sie die Signatur und entpacken Sie das Archiv. Die aktuelle IdP-Version findet sich stets unter http://shibboleth.net/downloads/identity-provider/latest/. | Laden Sie den Shibboleth IdP herunter, prüfen Sie die Signatur und entpacken Sie das Archiv. Die aktuelle IdP-Version findet sich stets unter http://shibboleth.net/downloads/identity-provider/latest/. Es empfiehlt sich, die [[https://wiki.shibboleth.net/confluence/display/IDP4/ReleaseNotes|Release Notes]] zu studieren. |
<code bash> | <code bash> |
root@idp:~# mkdir /opt/install | root@idp:~# mkdir /opt/install |
root@idp:~# cd /opt/install | root@idp:~# wget -P /opt/install https://shibboleth.net/downloads/identity-provider/latest/shibboleth-identity-provider-4.0.0.tar.gz |
root@idp:/opt/install# wget https://shibboleth.net/downloads/identity-provider/latest/shibboleth-identity-provider-4.0.0.tar.gz | root@idp:~# wget -P /opt/install https://shibboleth.net/downloads/identity-provider/latest/shibboleth-identity-provider-4.0.0.tar.gz.asc |
root@idp:/opt/install# wget https://shibboleth.net/downloads/identity-provider/latest/shibboleth-identity-provider-4.0.0.tar.gz.asc | root@idp:~# wget -P /opt/install https://shibboleth.net/downloads/PGP_KEYS |
root@idp:/opt/install# wget https://shibboleth.net/downloads/PGP_KEYS | root@idp:~# gpg --import /opt/install/PGP_KEYS |
root@idp:/opt/install# gpg --import PGP_KEYS | root@idp:~# gpg --verify /opt/install/shibboleth-identity-provider-4.0.0.tar.gz.asc /opt/install/shibboleth-identity-provider-4.0.0.tar.gz |
root@idp:/opt/install# gpg --verify shibboleth-identity-provider-4.0.0.tar.gz.asc shibboleth-identity-provider-4.0.0.tar.gz | root@idp:~# tar -xzf /opt/install/shibboleth-identity-provider-4.0.0.tar.gz -C /opt/install |
root@idp:/opt/install# tar -xzf shibboleth-identity-provider-4.0.0.tar.gz | |
</code> | </code> |
| |
===== Interaktiven Installer aufrufen ===== | ===== Interaktiven Installer aufrufen ===== |
| |
<code bash> | Das Installationsskript findet sich unter ''/opt/install/shibboleth-identity-provider-4.0.0/bin/install.sh''. Beim Ausführen werden die wichtigsten Angaben zum IdP abgefragt, wie der FQDN und das Zielverzeichnis, in das der IdP installiert werden soll. Der Default hierfür ist ''/opt/shibboleth-idp''. |
root@idp:~# cd /opt/install/shibboleth-identity-provider-4.0.0 | |
</code> | |
| |
Das Installationsskript findet sich unter bin/install.sh. Beim Ausführen werden die wichtigsten Angaben zum IdP abgefragt, wie der FQDN und das Zielverzeichnis, in das der IdP installiert werden soll. Der Default hierfür ist /opt/shibboleth-idp. | |
| |
<code bash> | <code bash> |
root@idp:/opt/install/shibboleth-identity-provider-4.0.0# JAVA_HOME=/usr bin/install.sh | root@idp:~# JAVA_HOME=/usr /opt/install/shibboleth-identity-provider-4.0.0/bin/install.sh |
Buildfile: /opt/install/shibboleth-identity-provider-4.0.0/bin/build.xml | Buildfile: /opt/install/shibboleth-identity-provider-4.0.0/bin/build.xml |
| |
===== Leserechte für Tomcat-User korrigieren ===== | ===== Leserechte für Tomcat-User korrigieren ===== |
| |
Nachdem die IdP-Files installiert sind, versucht der Tomcat, das Servlet automatisch zu starten (siehe Tomcat-Log). Das scheitert üblicherweise aber erstmal da einige Dateien für den Tomcat-User nicht lesbar abgelegt wurden. Korrigieren Sie dies mit: | Nachdem die IdP-Files installiert sind, versucht der Tomcat, das Servlet automatisch zu starten (siehe Tomcat-Log). Das scheitert üblicherweise zunächst, da einige Dateien für den Tomcat-User nicht lesbar abgelegt wurden. Korrigieren Sie dies mit: |
| |
<code bash> | <code bash> |
root@idp:/opt/install/shibboleth-identity-provider-4.0.0# cd /opt/shibboleth-idp | root@idp:/opt/install/shibboleth-identity-provider-4.0.0# cd /opt/shibboleth-idp |
root@idp:/opt/shibboleth-idp# chgrp -R $( getent group | grep ^tomcat | cut -d ":" -f1 ) conf credentials | root@idp:~# chgrp -R $( getent group | grep ^tomcat | cut -d ":" -f1 ) /opt/shibboleth-idp/conf /opt/shibboleth-idp/credentials |
root@idp:/opt/shibboleth-idp# chmod -R g+r conf credentials | root@idp:~# chmod -R g+r /opt/shibboleth-idp/conf /opt/shibboleth-idp/credentials |
</code> | </code> |
| |
| |
<code bash> | <code bash> |
root@idp:/opt/shibboleth-idp# chown $( getent passwd | grep ^tomcat | cut -d ":" -f1 ):$( getent group | grep ^tomcat | cut -d ":" -f1 ) logs metadata | root@idp:~# chown $( getent passwd | grep ^tomcat | cut -d ":" -f1 ):$( getent group | grep ^tomcat | cut -d ":" -f1 ) /opt/shibboleth-idp/logs /opt/shibboleth-idp/metadata |
</code> | </code> |
| |
Jetzt kann Tomcat neu gestartet werden: | Jetzt kann Tomcat neu gestartet werden: |
<code bash> | <code bash> |
root@idp:/opt/shibboleth-idp# systemctl restart tomcat9 | root@idp:# systemctl restart tomcat9 |
</code> | </code> |
Dabei lassen Sie am besten in drei Terminalfenstern den Tomcat- und die beiden relevanten IdP-Logs mitlaufen: | Dabei lassen Sie am besten in drei Terminalfenstern den Tomcat- und die beiden relevanten IdP-Logs mitlaufen: |
| |
<code bash> | <code bash> |
root@idp:/opt/shibboleth-idp# tail -f /var/log/tomcat9/catalina.DATUM.log | root@idp:# tail -f /var/log/tomcat9/catalina.DATUM.log |
</code> | </code> |
| |
FIXME: Die werden hier noch nicht geschrieben. | |
| |
<code bash> | <code bash> |
root@idp:/opt/shibboleth-idp# tail -f logs/idp-process.log | root@idp:# tail -f /opt/shibboleth-idp/logs/idp-process.log |
</code> | </code> |
| |
<code bash> | <code bash> |
root@idp:/opt/shibboleth-idp# tail -f logs/idp-warn.log | root@idp:# tail -f /opt/shibboleth-idp/logs/idp-warn.log |
</code> | </code> |
| |
Finden sich dort keine Fehler, ist der IdP erfolgreich gestartet. Überprüfen Sie als erstes, ob Sie die Status-Seite sehen können: | Finden sich dort keine Fehler, ist der IdP erfolgreich gestartet. Überprüfen Sie als erstes, ob Sie die Status-Seite sehen können: |
| |
<code> | <code bash> |
curl https://idp.hochschule-XY.de/idp/status | root@idp:# curl https://idp.hochschule-XY.de/idp/status |
</code> | </code> |
| |
| |
Um den Aufwand beim Eintragen der IdP-Metadaten in der DFN-AAI Metadatenverwaltung zu reduzieren, empfiehlt es sich vor dem initialen Registrieren des IdPs in ./metadata/idp-metadata.xml die noch fehlenden Einträge zu aktivieren. Es handelt sich dabei um IdP-Features die in der DFN-AAI empfohlen sind und deren Konfiguration in diesem Wiki zu finden sind. Im Folgenden sind nur die relevanten Ausschnitte angegeben. | Um den Aufwand beim Eintragen der IdP-Metadaten in der DFN-AAI Metadatenverwaltung zu reduzieren, empfiehlt es sich vor dem initialen Registrieren des IdPs in ./metadata/idp-metadata.xml die noch fehlenden Einträge zu aktivieren. Es handelt sich dabei um IdP-Features die in der DFN-AAI empfohlen sind und deren Konfiguration in diesem Wiki zu finden sind. Im Folgenden sind nur die relevanten Ausschnitte angegeben. |
| |
| <callout type="danger" title="Einmalige Verwendung der idp-metadata.xml"> |
| Die Datei ''./metadata/idp-metadata.xml'' wird in der DFN-AAI nicht verwendet. Sie wird später weder vom IdP aktualisiert, noch von anderen Teilnehmern benötigt. Sie wird hier **ausschließlich für das initiale Einlesen in die Metadatenverwaltung** editiert und verwendet! |
| </callout> |
| |
<code xml ./metadata/idp-metadata.xml> | <code xml ./metadata/idp-metadata.xml> |
| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- In der folgenden Zeile muss das Ablaufdatum dieses Metadatensatz entfernt werden, z.B. validUntil="2020-04-06T13:35:26.645Z". --> |
| <EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:shibmd="urn:mace:shibboleth:metadata:1.0" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:mdui="urn:oasis:names:tc:SAML:metadata:ui" xmlns:req-attr="urn:oasis:names:tc:SAML:protocol:ext:req-attr" entityID="https://web1.in.dfn.de/idp/shibboleth"> |
| |
... | ... |
| |
<SingleSignOnService Binding="urn:oasis:... | <SingleSignOnService Binding="urn:oasis:... |
<SingleSignOnService Binding="urn:oasis:... | <SingleSignOnService Binding="urn:oasis:... |
| |
<!-- den fehlenden ECP-Endpoint hinzufügen --> | <!-- den fehlenden ECP-Endpoint hinzufügen --> |
<SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP" Location="https://idp.hochschule-XY.de/idp/profile/SAML2/SOAP/ECP"/> | <SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP" Location="https://idp.hochschule-XY.de/idp/profile/SAML2/SOAP/ECP"/> |
</IDPSSODescriptor> | </IDPSSODescriptor> |
| |
<!-- Protocol-Support für SAML2-Queries im AA-Descriptor aktivieren --> | <!-- Protocol-Support für SAML2-Queries im Attribute Authority-Descriptor aktivieren --> |
<AttributeAuthorityDescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:1.1:protocol urn:oasis:names:tc:SAML:2.0:protocol"> | <AttributeAuthorityDescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:1.1:protocol urn:oasis:names:tc:SAML:2.0:protocol"> |
| |
| |
<AttributeService Binding="urn:oasis:names:tc:SAML:1.0:bindings:SOAP-binding" Location="..."/> | <AttributeService Binding="urn:oasis:names:tc:SAML:1.0:bindings:SOAP-binding" Location="..."/> |
<!-- SAML2-Attribute-Service aktivieren --> | <!-- SAML2-Attribute-Service einkommentieren --> |
<AttributeService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP" Location="..."/> | <AttributeService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP" Location="..."/> |
| |
</code> | </code> |
| |
Weiter geht es mit der [[de:shibidp3config|Konfiguration]]. | Weiter geht es mit der [[de:shibidp:config|Konfiguration]]. |