Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
de:shibidp:prepare-http [2020/04/06 15:05] – angelegt Silke Meyer | de:shibidp:prepare-http [2024/11/12 14:25] (aktuell) – [Apache-Module aktivieren] : Zugriff auf Gruppe ssl-cert Thorsten Michels | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== IdP-Vorarbeiten: | + | <- de: |
- | < | + | ====== IdP-Vorarbeiten: |
- | Die TCP-Ports 443 und 8443 müssen auf dem IdP für eingehende Zugriffe geöffnet sein! | + | |
+ | < | ||
+ | Die TCP-Ports 443 und 8443 müssen auf dem IdP für eingehende Zugriffe geöffnet sein! Die Verwendung des Backchannels auf Port 8443 wird im [[https:// | ||
</ | </ | ||
Zeile 9: | Zeile 11: | ||
==== Installation ==== | ==== Installation ==== | ||
- | === Debian | + | === Debian |
<code bash> | <code bash> | ||
Zeile 15: | Zeile 17: | ||
</ | </ | ||
- | === RHEL 6/CentOS 7 === | + | |
+ | ==== Apache-Module aktivieren ==== | ||
<code bash> | <code bash> | ||
- | yum -y install httpd mod_ssl | + | root@idp:~# a2enmod ssl headers proxy proxy_ajp |
</ | </ | ||
- | === SLES 11/12, OpenSUSE Leap 15.1 === | + | Außerdem |
- | + | ||
- | Apache wird als Proxy vor Tomcat via AJP verwendet. In ''/ | + | |
- | + | ||
- | ==== Apache-Module aktivieren ==== | + | |
<code bash> | <code bash> | ||
- | root@idp: | + | root@idp: |
- | root@idp:~# a2enmod headers | + | |
- | root@idp:~# a2enmod proxy | + | |
- | root@idp:~# a2enmod proxy_ajp | + | |
</ | </ | ||
- | Abschließend muss der Web Server neu gestartet werden | + | Abschließend muss der Web Server neu gestartet werden: |
<code bash> | <code bash> | ||
root@idp:~# systemctl restart apache2 | root@idp:~# systemctl restart apache2 | ||
Zeile 96: | Zeile 91: | ||
# Die Zertifikatsdatei enthält die vollständige Kette, vgl. | # Die Zertifikatsdatei enthält die vollständige Kette, vgl. | ||
# http:// | # http:// | ||
+ | # ACHTUNG: Wenn Sie für die SAML-Kommunikation ein anderes, länger laufendes Zertifikat | ||
+ | # als für den Webserver verwenden, müssen Sie hier dieses SAML-Zertifikat eintragen. | ||
+ | # Siehe unten bei " | ||
SSLCertificateFile | SSLCertificateFile | ||
SSLCertificateKeyFile | SSLCertificateKeyFile | ||
Zeile 131: | Zeile 129: | ||
<code apache conf/ | <code apache conf/ | ||
- | # | ||
- | # This is the main Apache HTTP server configuration file. It contains the | ||
- | # configuration directives that give the server its instructions. | ||
- | # See < | ||
- | # In particular, see | ||
- | # < | ||
- | # for a discussion of each configuration directive. | ||
- | # | ||
- | # ServerRoot: The top of the directory tree under which the server' | ||
- | # configuration, | ||
- | # | ||
- | # Do not add a slash at the end of the directory path. If you point | ||
- | # ServerRoot at a non-local disk, be sure to specify a local disk on the | ||
- | # Mutex directive, if file-based mutexes are used. If you wish to share the | ||
- | # same ServerRoot for multiple httpd daemons, you will need to change at | ||
- | # least PidFile. | ||
- | # | ||
ServerRoot " | ServerRoot " | ||
- | |||
# | # | ||
Zeile 164: | Zeile 144: | ||
LoadModule proxy_module modules/ | LoadModule proxy_module modules/ | ||
- | #LoadModule proxy_http_module modules/ | ||
LoadModule proxy_http_module modules/ | LoadModule proxy_http_module modules/ | ||
Zeile 174: | Zeile 153: | ||
ServerName shib.uni-mainz.de | ServerName shib.uni-mainz.de | ||
- | # | ||
# Deny access to the entirety of your server' | # Deny access to the entirety of your server' | ||
# explicitly permit access to web content directories in other | # explicitly permit access to web content directories in other | ||
# < | # < | ||
- | # | + | |
< | < | ||
AllowOverride none | AllowOverride none | ||
Zeile 187: | Zeile 165: | ||
< | < | ||
Options None | Options None | ||
- | |||
AllowOverride None | AllowOverride None | ||
Require all granted | Require all granted | ||
Zeile 212: | Zeile 189: | ||
</ | </ | ||
<code apache conf/ | <code apache conf/ | ||
- | ## | ||
- | ## SSL Global Context | ||
- | ## | ||
- | ## All SSL configuration in this context applies both to | ||
- | ## the main server and all SSL-enabled virtual hosts. | ||
- | ## | ||
- | # | ||
- | # Some MIME-types for downloading Certificates and CRLs | ||
- | # | ||
AddType application/ | AddType application/ | ||
AddType application/ | AddType application/ | ||
Zeile 301: | Zeile 269: | ||
</ | </ | ||
- | ==== Testen der Verbindung Apache --> Tomcat ==== | + | ===== Besonderheiten bei Backchannel Requests ===== |
+ | Der Backchannel auf Port 8443 für die Server-to-Server-Kommunikation ist für eine funktionierende IdP-Konfiguration heutzutage nicht mehr zwingend nötig. Die obige Webserver-Konfiguration zeigt den Standardfall, | ||
+ | |||
+ | Wenn ein Shibboleth Service Provider eine [[https:// | ||
+ | * eine Attribute Query auf Port 8443 gestellt wird oder | ||
+ | * ein Single Logout Request via SOAP auf Port 8443 gestellt wird. | ||
+ | Stellt derselbe SP die beiden Anfragen an Port 443, so ignoriert er das fehlende Vertrauen und baut eine Verbindung zum IdP auf, obwohl das Zertifikat am Webserver dem in den Metadaten publizierten Zertifikat nicht entspricht. | ||
+ | |||
+ | Um sicherzustellen, | ||
+ | |||
+ | |||
+ | <file apache / | ||
+ | < | ||
+ | ServerName | ||
+ | |||
+ | SSLEngine on | ||
+ | SSLCertificateFile | ||
+ | SSLCertificateKeyFile | ||
+ | |||
+ | # REST WIE OBEN | ||
+ | |||
+ | </ | ||
+ | |||
+ | ################################################ | ||
+ | |||
+ | < | ||
+ | # Hier muss der Port im Servername genannt werden, | ||
+ | # damit das abweichende Zertifikat genutzt wird. | ||
+ | ServerName | ||
+ | |||
+ | SSLEngine on | ||
+ | SSLCertificateFile | ||
+ | SSLCertificateKeyFile | ||
+ | |||
+ | # REST WIE OBEN | ||
+ | |||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | ===== Testen der Verbindung Apache --> Tomcat | ||
Liest der Apache seine Config ohne Fehler ein, testen Sie bitte als nächstes die Weiterleitung von Apache auf den Tomcat indem Sie folgende URL aufrufen: | Liest der Apache seine Config ohne Fehler ein, testen Sie bitte als nächstes die Weiterleitung von Apache auf den Tomcat indem Sie folgende URL aufrufen: | ||
Zeile 309: | Zeile 317: | ||
Funktioniert die Weiterleitung, | Funktioniert die Weiterleitung, | ||
- | Kommt eine Apache-Fehlermeldung | + | Kommt eine Apache-Fehlermeldung, dann stimmt die Apache-Konfiguration |
Anmerkungen: | Anmerkungen: | ||
- | * Achten Sie bitte darauf, dass sich die SSL-Direktiven tatsächlich in einem VirtualHost-Kontext befinden und **nicht** im Location-Kontext. (Mehr dazu im [[https:// | + | |
- | * stellen Sie sicher dass die Apache-SSL-Konfiguration aktuellen Sicherheitsstandards entspricht! Details dazu übersteigen den Rahmen diese Anleitung. Hilfreiche Seiten: | + | * Bitte stellen Sie sicher dass die Apache-SSL-Konfiguration aktuellen Sicherheitsstandards entspricht! Details dazu übersteigen den Rahmen diese Anleitung. Hilfreiche Seiten: |
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
- | * https:// | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
- | Weiter geht es mit [[de: | + | {{tag> |