Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
de:shibidp3prepare-http [2017/02/01 17:02] – Raoul Gunnar Borenius | de:shibidp3prepare-http [2021/05/03 13:17] (aktuell) – veralteten Inhalt gelöscht Silke Meyer | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ===== IdP 3.x Vorarbeiten: | ||
- | |||
- | ====RHEL 6==== | ||
- | |||
- | <code bash> | ||
- | yum install httpd mod_ssl | ||
- | </ | ||
- | |||
- | ====SLES 11/12==== | ||
- | |||
- | Da Apache als Frontend vor Tomcat 7.0 via AJP verwendet wird: in / | ||
- | |||
- | ====Debian 8==== | ||
- | |||
- | <code bash> | ||
- | root@idp:~# apt-get install apache2 | ||
- | </ | ||
- | |||
- | Für einen sicheren Betrieb werden weiterhin einige Module benötigt, die nicht in allen Fällen per default aktiv sind: | ||
- | |||
- | <code bash> | ||
- | root@idp:~# a2enmod ssl | ||
- | root@idp:~# a2enmod headers | ||
- | root@idp:~# a2enmod proxy_ajp | ||
- | </ | ||
- | |||
- | Abschließend muss der Web Server neu gestartet werden | ||
- | <code bash> | ||
- | root@idp:~# systemctl restart apache2 | ||
- | </ | ||
- | |||
- | ==== Konfiguration ==== | ||
- | |||
- | <file apache / | ||
- | ################################################ | ||
- | # | ||
- | # Bitte im Folgenden ' | ||
- | # jeweils durch die entsprechende IP und ' | ||
- | # den FQDN Ihres IdPs ersetzen! | ||
- | # | ||
- | # Die Angabe der Portnummer bei ' | ||
- | # für den SSO auf Port 443 ein anderes Zertifikat verwendet werden | ||
- | # soll als für die Attribute Authority auf Port 8443 | ||
- | # | ||
- | # | ||
- | # SingleSignOnService | ||
- | # | ||
- | # https:// | ||
- | # https:// | ||
- | # https:// | ||
- | # | ||
- | # Sofern der Port 443 nicht von der Distribution angeschaltet wird | ||
- | # (bei Debian in / | ||
- | # können Sie das hier manuell machen: | ||
- | # | ||
- | # Listen 443 | ||
- | # | ||
- | |||
- | ################################################ | ||
- | # | ||
- | # SingleSignOnService auf Port 443 | ||
- | # | ||
- | < | ||
- | ServerName | ||
- | |||
- | SSLEngine on | ||
- | SSLCertificateFile | ||
- | SSLCertificateKeyFile | ||
- | SSLCACertificateFile | ||
- | |||
- | AddDefaultCharset UTF-8 | ||
- | |||
- | < | ||
- | Require all granted | ||
- | ProxyPass ajp:// | ||
- | # " | ||
- | # im Browser beim Logout über mehrere SPs, | ||
- | # da hierbei mit iframes gearbeitet wird | ||
- | Header always append X-FRAME-OPTIONS " | ||
- | </ | ||
- | |||
- | </ | ||
- | |||
- | ################################################ | ||
- | # | ||
- | # ArtifactResolutionService und AttributeService | ||
- | # | ||
- | # https:// | ||
- | # https:// | ||
- | # | ||
- | # https:// | ||
- | # https:// | ||
- | # | ||
- | Listen IDP-IP-ADRESSE: | ||
- | Listen [IDP-IPv6-ADRESSE]: | ||
- | |||
- | < | ||
- | ServerName | ||
- | |||
- | SSLEngine on | ||
- | SSLCertificateFile | ||
- | SSLCertificateKeyFile | ||
- | SSLCACertificateFile | ||
- | |||
- | # hier muss wegen veralteten SP-Clients (z.B. Thomson Reuters) | ||
- | # eine etwas weniger strikte Konfiguration genommen werden | ||
- | # als von bettercrypto.org empfohlen wird: | ||
- | SSLCipherSuite ' | ||
- | | ||
- | # Diese drei SSL-Optionen sind zwingend notwendig | ||
- | # damit SP-Abfragen auf diesen Port funktionieren! | ||
- | # Details siehe Shibboleth-Wiki | ||
- | SSLVerifyClient | ||
- | SSLVerifyDepth | ||
- | SSLOptions | ||
- | |||
- | < | ||
- | Require all granted | ||
- | ProxyPass ajp:// | ||
- | </ | ||
- | |||
- | </ | ||
- | |||
- | </ | ||
- | Nach jeder Änderung die Konfiguration des HTTP Servers neu laden: | ||
- | <code bash> | ||
- | root@idp:~# service apache2 reload | ||
- | </ | ||
- | |||
- | Lassen Sie beim Reload des Apache den Apache-Error-Log in einem zweiten Fenster mitlaufen um etwaige Fehler oder Warnings sehen zu können: | ||
- | |||
- | <code bash> | ||
- | root@idp:~# tail -f / | ||
- | </ | ||
- | |||
- | === 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: | ||
- | < | ||
- | https:// | ||
- | </ | ||
- | |||
- | Funktioniet die Weiterleitung, | ||
- | Kommt eine Apache-Fehlermeldung (diese sollte dann auch im obigen Apache-Log erscheinen) dann stimmt die Apache-Configuration noch nicht! Bitte dann nochmal obige Punkte sorgfältig durchgehen. | ||
- | |||
- | 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 grundsätzliche Apache-Konfiguration aktuellen Sicherheitsstandards entspricht! Details dazu übersteigen den Rahmen diese Anleitung. Hilfreiche Seiten: | ||
- | * [[https:// | ||
- | * [[https:// | ||
- | * https:// | ||
- | * [[https:// | ||
- | * [[https:// | ||
- | |||
- | ====Windows==== | ||
- | |||
- | Beispiel für eine Minimal-Konfiguration unter Windows (bereitgestellt von Thomas Glatzer, Uni Mainz): | ||
- | |||
- | <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 " | ||
- | |||
- | |||
- | # | ||
- | # Dynamic Shared Object (DSO) Support | ||
- | # | ||
- | LoadModule authn_core_module modules/ | ||
- | LoadModule authz_core_module modules/ | ||
- | |||
- | LoadModule headers_module modules/ | ||
- | LoadModule reqtimeout_module modules/ | ||
- | LoadModule log_config_module modules/ | ||
- | LoadModule mime_module modules/ | ||
- | |||
- | LoadModule proxy_module modules/ | ||
- | #LoadModule proxy_http_module modules/ | ||
- | LoadModule proxy_http_module modules/ | ||
- | |||
- | LoadModule ssl_module modules/ | ||
- | LoadModule socache_shmcb_module modules/ | ||
- | |||
- | # ' | ||
- | ServerAdmin glatzert@uni-mainz.de | ||
- | ServerName shib.uni-mainz.de | ||
- | |||
- | # | ||
- | # Deny access to the entirety of your server' | ||
- | # explicitly permit access to web content directories in other | ||
- | # < | ||
- | # | ||
- | < | ||
- | AllowOverride none | ||
- | Require all denied | ||
- | </ | ||
- | |||
- | DocumentRoot " | ||
- | < | ||
- | Options None | ||
- | |||
- | AllowOverride None | ||
- | Require all granted | ||
- | </ | ||
- | |||
- | <Files " | ||
- | Require all denied | ||
- | </ | ||
- | |||
- | ErrorLog " | ||
- | TransferLog " | ||
- | LogLevel warn | ||
- | |||
- | < | ||
- | TypesConfig conf/ | ||
- | |||
- | AddType application/ | ||
- | AddType application/ | ||
- | </ | ||
- | |||
- | Include conf/ | ||
- | Include conf/ | ||
- | Include 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/ | ||
- | |||
- | SSLRandomSeed startup builtin | ||
- | SSLRandomSeed connect builtin | ||
- | |||
- | SSLProtocol All -SSLv3 | ||
- | SSLCipherSuite ECDH+AESGCM: | ||
- | SSLHonorCipherOrder On | ||
- | |||
- | SSLUseStapling off | ||
- | SSLStaplingCache " | ||
- | SSLStaplingReturnResponderErrors off | ||
- | |||
- | SSLSessionCache " | ||
- | SSLSessionCacheTimeout | ||
- | |||
- | SSLCertificateFile " | ||
- | SSLCertificateKeyFile " | ||
- | </ | ||
- | <code apache conf/ | ||
- | ################################################ | ||
- | # | ||
- | # SingleSignOnService | ||
- | # | ||
- | |||
- | Listen 443 | ||
- | |||
- | < | ||
- | DocumentRoot " | ||
- | ServerAdmin glatzert@uni-mainz.de | ||
- | |||
- | SSLEngine on | ||
- | Header add Strict-Transport-Security " | ||
- | | ||
- | <Proxy http:// | ||
- | Require all granted | ||
- | </ | ||
- | ProxyPass /idp/ http:// | ||
- | </ | ||
- | |||
- | ################################################ | ||
- | # | ||
- | # ArtifactResolutionService und AttributeService | ||
- | # | ||
- | |||
- | Listen 8443 | ||
- | |||
- | < | ||
- | DocumentRoot " | ||
- | ServerAdmin glatzert@uni-mainz.de | ||
- | | ||
- | SSLEngine on | ||
- | Header add Strict-Transport-Security " | ||
- | | ||
- | <Proxy http:// | ||
- | Require all granted | ||
- | </ | ||
- | ProxyPass /idp/ http:// | ||
- | </ | ||
- | </ | ||
- | <code apache conf/ | ||
- | # https:// | ||
- | |||
- | LoadModule mod_shib C:/ | ||
- | |||
- | < | ||
- | AuthType None | ||
- | Require all granted | ||
- | </ | ||
- | |||
- | < | ||
- | AuthType shibboleth | ||
- | ShibRequestSetting requireSession 1 | ||
- | Require shibboleth | ||
- | </ | ||
- | </ | ||