Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| de:shibidp3prepare-http [2020/01/27 15:26] – Silke Meyer | de:shibidp3prepare-http [2021/05/03 13:17] (aktuell) – veralteten Inhalt gelöscht Silke Meyer | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ===== IdP 3.x Vorarbeiten: | ||
| - | ** WICHTIG: Unabhängig vom Betriebsystem dürfen Sie nicht vergessen, die beiden TCP-Port 443 und 8443 für eingehende Zugriffe auf Ihrer vorgelagerten Firewall weltweit aufzumachen!** | ||
| - | ====Installation des Apache Webserver ==== | ||
| - | ===Debian 8/9/10 === | ||
| - | |||
| - | <code bash> | ||
| - | root@idp:~# apt-get install apache2 | ||
| - | </ | ||
| - | |||
| - | ===RHEL 6/CentOS 7=== | ||
| - | |||
| - | <code bash> | ||
| - | yum -y install httpd mod_ssl | ||
| - | </ | ||
| - | |||
| - | ===SLES 11/12, OpenSUSE Leap 15.1=== | ||
| - | |||
| - | Da Apache als Frontend vor Tomcat via AJP verwendet wird: in ''/ | ||
| - | |||
| - | ==== Apache-Module aktivieren ==== | ||
| - | |||
| - | <code bash> | ||
| - | root@idp:~# a2enmod ssl | ||
| - | root@idp:~# a2enmod headers | ||
| - | root@idp:~# a2enmod proxy | ||
| - | root@idp:~# a2enmod proxy_ajp | ||
| - | </ | ||
| - | |||
| - | Abschließend muss der Web Server neu gestartet werden | ||
| - | <code bash> | ||
| - | root@idp:~# systemctl restart apache2 | ||
| - | </ | ||
| - | |||
| - | ==== VHost-Konfiguration ==== | ||
| - | |||
| - | Eine Anleitung zur Erstellung einer Zertifikatskette (s.u. SSLCACertificateFile) findet sich [[de: | ||
| - | |||
| - | Im Mozilla-Wiki finden Sie Empfehlungen für eine [[https:// | ||
| - | |||
| - | <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 | ||
| - | # Die Zertifikatsdatei enthält die vollständige Kette, vgl. | ||
| - | # http:// | ||
| - | SSLCertificateFile | ||
| - | SSLCertificateKeyFile | ||
| - | |||
| - | 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 " | ||
| - | </ | ||
| - | |||
| - | # Support für favicon.ico, | ||
| - | DocumentRoot / | ||
| - | < | ||
| - | Require all granted | ||
| - | </ | ||
| - | |||
| - | </ | ||
| - | |||
| - | ################################################ | ||
| - | # | ||
| - | # ArtifactResolutionService und AttributeService | ||
| - | # | ||
| - | # https:// | ||
| - | # https:// | ||
| - | # | ||
| - | # https:// | ||
| - | # https:// | ||
| - | # | ||
| - | |||
| - | # Wenn Sie den Port 8443 nicht bereits an anderer Stelle angeschaltet haben, | ||
| - | # (z.B. bei Debian in / | ||
| - | # können Sie das hier manuell machen: | ||
| - | Listen IDP-IP-ADRESSE: | ||
| - | Listen [IDP-IPv6-ADRESSE]: | ||
| - | |||
| - | < | ||
| - | ServerName | ||
| - | |||
| - | SSLEngine on | ||
| - | # Die Zertifikatsdatei enthält die vollständige Kette, vgl. | ||
| - | # http:// | ||
| - | SSLCertificateFile | ||
| - | SSLCertificateKeyFile | ||
| - | |||
| - | # 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:// | ||
| - | </ | ||
| - | |||
| - | Funktioniert 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 Apache-SSL-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 HIER INFORMIEREN SIE SICH BITTE ÜBER EINE STATE-OF-THE-ART-KONFIGURATION | ||
| - | # SSLCipherSuite HIER INFORMIEREN SIE SICH BITTE ÜBER EINE STATE-OF-THE-ART-KONFIGURATION | ||
| - | # Nützliche Quelle: https:// | ||
| - | 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 | ||
| - | </ | ||
| - | </ | ||
| - | |||
| - | |||
| - | |||
| - | Weiter geht es mit [[de: | ||