Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
de:shibidp-install [2020/04/07 11:43] – [Leserechte für Tomcat-User korrigieren] Silke Meyerde:shibidp-install [2020/04/07 14:05] (aktuell) – gelöscht Silke Meyer
Zeile 1: Zeile 1:
-====== Installation Shibboleth IdP 4.x ====== 
  
-===== 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/. Es empfiehlt sich, die [[https://wiki.shibboleth.net/confluence/display/IDP4/ReleaseNotes|Release Notes]] zu studieren. 
- 
-<code bash> 
-root@idp:~# mkdir /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:~# wget -P /opt/install 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:~# gpg --import /opt/install/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:~# tar -xzf /opt/install/shibboleth-identity-provider-4.0.0.tar.gz -C /opt/install 
-</code> 
- 
-===== Interaktiven Installer aufrufen ===== 
- 
-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''. 
- 
-<code bash> 
-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 
- 
-install: 
-Source (Distribution) Directory (press <enter> to accept default): [/opt/install/shibboleth-identity-provider-4.0.0] ?  
- 
-Installation Directory: [/opt/shibboleth-idp] ?  
- 
-INFO [net.shibboleth.idp.installer.V4Install:151] - New Install.  Version: 4.0.0 
-Host Name: [192.168.0.5] ?  
-idp-dev.hochschule-XY.de 
-INFO [net.shibboleth.idp.installer.V4Install:549] - Creating idp-signing, CN = idp-dev.hochschule-XY.de URI = https://idp-dev.hochschule-XY.de/idp/shibboleth, keySize=3072 
-INFO [net.shibboleth.idp.installer.V4Install:549] - Creating idp-encryption, CN = idp-dev.hochschule-XY.de URI = https://idp-dev.hochschule-XY.de/idp/shibboleth, keySize=3072 
-Backchannel PKCS12 Password: 
-Re-enter password:  
-INFO [net.shibboleth.idp.installer.V4Install:592] - Creating backchannel keystore, CN = idp-dev.hochschule-XY.de URI = https://idp-dev.hochschule-XY.de/idp/shibboleth, keySize=3072 
-Cookie Encryption Key Password: 
-Re-enter password:  
-INFO [net.shibboleth.idp.installer.V4Install:633] - Creating backchannel keystore, CN = idp-dev.hochschule-XY.de URI = https://idp-dev.hochschule-XY.de/idp/shibboleth, keySize=3072 
-INFO [net.shibboleth.utilities.java.support.security.BasicKeystoreKeyStrategyTool:166] - No existing versioning property, initializing... 
-SAML EntityID: [https://idp-dev.hochschule-XY.de/idp/shibboleth] ?  
- 
-Attribute Scope: [hochschule-XY.de] ?  
- 
-INFO [net.shibboleth.idp.installer.V4Install:433] - Creating Metadata to /opt/shibboleth-idp/metadata/idp-metadata.xml 
-INFO [net.shibboleth.idp.installer.BuildWar:71] - Rebuilding /opt/shibboleth-idp/war/idp.war, Version 4.0.0 
-INFO [net.shibboleth.idp.installer.BuildWar:80] - Initial populate from /opt/shibboleth-idp/dist/webapp to /opt/shibboleth-idp/webpapp.tmp 
-INFO [net.shibboleth.idp.installer.BuildWar:89] - Overlay from /opt/shibboleth-idp/edit-webapp to /opt/shibboleth-idp/webpapp.tmp 
-INFO [net.shibboleth.idp.installer.BuildWar:94] - Creating war file /opt/shibboleth-idp/war/idp.war 
- 
-BUILD SUCCESSFUL 
-Total time: 52 seconds 
-</code> 
- 
-Die beiden abgefragten Passwörter werden in die IdP-Config geschrieben, müssen also nicht notiert oder gemerkt werden. Wählen Sie daher möglichst starke Passwörter. Der IdP wird dann im angegebenen Zielverzeichnis installiert. 
- 
-===== 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 zunächst, da einige Dateien für den Tomcat-User nicht lesbar abgelegt wurden. Korrigieren Sie dies mit: 
- 
-<code bash> 
-root@idp:/opt/install/shibboleth-identity-provider-4.0.0# cd /opt/shibboleth-idp 
-root@idp:~# chgrp -R $( getent group | grep ^tomcat | cut -d ":" -f1 ) /opt/shibboleth-idp/conf /opt/shibboleth-idp/credentials 
-root@idp:~# chmod -R g+r /opt/shibboleth-idp/conf /opt/shibboleth-idp/credentials 
-</code> 
- 
-Außerdem müssen Log-Verzeichnis und Metadata-Verzeichnis für den Tomcat-User schreibbar gemacht werden: 
- 
-<code bash> 
-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> 
- 
-===== IdP Status URL freigeben ===== 
- 
-Zur Darstellung der Status-Seite muss 
- 
-  * die Java Standard Tag Library (JSTL) im Tomcat bereit stehen (siehe [[de:shibidp:prepare-tomcat#java_standard_tag_library_jstl|Vorarbeiten]]). 
-  * die IdP Status URL für Ihr eigenes Netz und das Monitoring-Netz des DFN freigegeben werden. Damit das DFN-AAI-Monitoring nur auf die Status-Seite zugreifen kann, erstellen Sie eine separates ''<entry>'' Element mit der id ''StatusAccessByIPAddress'':  
- 
-<file xml /opt/shibboleth-idp/conf/access-control.xml> 
-<beans ...> 
-   <!-- ... --> 
-    <util:map id="shibboleth.AccessControlPolicies"> 
-        <entry key="AccessByIPAddress"> 
-            <bean parent="shibboleth.IPRangeAccessControl" 
-                p:allowedRanges="#{ {'127.0.0.1/32', '::1/128', 'IHR-NETZ/IHRE-NETZMASKE'} }" /> 
-        </entry> 
-        <entry key="StatusAccessByIPAddress"> 
-            <bean parent="shibboleth.IPRangeAccessControl" 
-                p:allowedRanges="#{ {'127.0.0.1/32', '::1/128', 'IHR-NETZ/IHRE-NETZMASKE', '193.174.247.0/24', '2001:638:206:1::/64'} }" /> 
-        </entry> 
-    </util:map> 
-   <!-- ... --> 
-</beans> 
-</file> 
- 
-FIXME Prüfen! 
- 
-Dieser Eintrag muss dann noch in ''idp.properties'' der Status-Seite zugewiesen werden: 
- 
-<file properties ./conf/idp.properties> 
-idp.status.accessPolicy=StatusAccessByIPAddress 
-</file> 
- 
-===== Tomcat-Neustart und erster Test ===== 
- 
-Jetzt kann Tomcat neu gestartet werden: 
-<code bash> 
-root@idp:# systemctl restart tomcat9 
-</code> 
-Dabei lassen Sie am besten in drei Terminalfenstern den Tomcat- und die beiden relevanten IdP-Logs mitlaufen: 
- 
-<code bash> 
-root@idp:# tail -f /var/log/tomcat9/catalina.DATUM.log 
-</code> 
- 
-FIXME: Die werden hier noch nicht geschrieben. 
- 
-<code bash> 
-root@idp:# tail -f /opt/shibboleth-idp/logs/idp-process.log 
-</code> 
- 
-<code bash> 
-root@idp:# tail -f /opt/shibboleth-idp/logs/idp-warn.log 
-</code> 
- 
-Finden sich dort keine Fehler, ist der IdP erfolgreich gestartet. Überprüfen Sie als erstes, ob Sie die Status-Seite sehen können: 
- 
-<code bash> 
-root@idp:# curl https://idp.hochschule-XY.de/idp/status 
-</code> 
- 
-====== Vorbereitung der IdP-Metadaten ====== 
- 
-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> 
-<?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"> 
- 
-... 
- 
-    <!-- Beschreibung und Logo aktivieren --> 
-        <Extensions> 
-            <shibmd:Scope regexp="false">hochschule-XY.de</shibmd:Scope> 
-            <mdui:UIInfo> 
-                <mdui:DisplayName xml:lang="en">XY University (Development)</mdui:DisplayName> 
-                <mdui:DisplayName xml:lang="de">Hochschule XY (Development)</mdui:DisplayName> 
-                <mdui:Description xml:lang="en">Identity Provider of XY University</mdui:Description> 
-                <mdui:Description xml:lang="de">Identity Provider der Hochschule XY</mdui:Description> 
-                <mdui:Logo height="16" width="16">https://idp-dev.hochschule-XY.de/favicon.ico</mdui:Logo> 
-                <mdui:Logo height="80" width="80">https://idp-dev.hochschule-XY.de/idp/images/logo.png</mdui:Logo> 
-            </mdui:UIInfo> 
-        </Extensions> 
-         
-        ... 
-         
-        <ArtifactResolutionService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP" Location="..."/> 
-         
-        <!-- vier Single-Logout-Services aktiveren --> 
-        <SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="..."/> 
-        <SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="..."/> 
-        <SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign" Location="..."/> 
-        <SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP" Location="..."/> 
-         
-        <SingleSignOnService Binding="urn:mace:... 
-        <SingleSignOnService Binding="urn:oasis:... 
-        <SingleSignOnService Binding="urn:oasis:... 
-        <SingleSignOnService Binding="urn:oasis:... 
-         
-        <!-- 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"/> 
-         
-        <!-- die fehlenden NameID-Formate hinzufügen --> 
-        <NameIDFormat>urn:mace:shibboleth:1.0:nameIdentifier</NameIDFormat> 
-        <NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</NameIDFormat> 
-        <NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</NameIDFormat> 
-... 
-    </IDPSSODescriptor> 
-     
-    <!-- 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"> 
-     
-        ... 
-         
-        <AttributeService Binding="urn:oasis:names:tc:SAML:1.0:bindings:SOAP-binding" Location="..."/> 
-        <!-- SAML2-Attribute-Service einkommentieren --> 
-        <AttributeService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP" Location="..."/> 
- 
-        <!-- die fehlenden NameID-Formate hinzufügen --> 
-        <NameIDFormat>urn:mace:shibboleth:1.0:nameIdentifier</NameIDFormat> 
-        <NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</NameIDFormat> 
-        <NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</NameIDFormat> 
- 
-    </AttributeAuthorityDescriptor> 
- 
-</EntityDescriptor> 
-</code> 
- 
-Weiter geht es mit der [[de:shibidp:config|Konfiguration]].