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:shibidp3prepare-http [2017/02/17 21:17] – [Konfiguration] Raoul Gunnar Boreniusde:shibidp3prepare-http [2021/05/03 13:17] (aktuell) – veralteten Inhalt gelöscht Silke Meyer
Zeile 1: Zeile 1:
-===== IdP 3.x Vorarbeiten: HTTP-Server ===== 
- 
-====RHEL 6==== 
- 
-<code bash> 
-yum install httpd mod_ssl 
-</code> 
- 
-====SLES 11/12==== 
- 
-Da Apache als Frontend vor Tomcat 7.0 via AJP verwendet wird: in /etc/sysconfig/apache2 muss bei APACHE_MODULES proxy vor proxy_ajp stehen (ggfs. so editieren), weiterhin APACHE_SERVER_FLAGS="SSL" setzen. 
- 
-====Debian 8==== 
- 
-<code bash> 
-root@idp:~# apt-get install apache2 
-</code> 
- 
-Module aktivieren: 
- 
-<code bash> 
-root@idp:~# a2enmod ssl 
-root@idp:~# a2enmod headers 
-root@idp:~# a2enmod proxy_ajp 
-</code> 
- 
-Abschließend muss der Web Server neu gestartet werden 
-<code bash> 
-root@idp:~# systemctl restart apache2 
-</code> 
- 
-==== Konfiguration ==== 
- 
-<file apache /etc/apache2/sites-enabled/idp.uni-beispiel.de.conf> 
-################################################ 
-# 
-# Bitte im Folgenden 'IDP-IP-ADRESSE' und ggf. 'IDP-IPv6-ADRESSE' 
-# jeweils durch die entsprechende IP und 'idp.uni-beispiel.de' durch  
-# den FQDN Ihres IdPs ersetzen! 
-# 
-# Die Angabe der Portnummer bei 'ServerName' ist wichtig falls 
-# für den SSO auf Port 443 ein anderes Zertifikat verwendet werden 
-# soll als für die Attribute Authority auf Port 8443 
-# 
-# 
-# SingleSignOnService 
-# 
-# https://idp.uni-beispiel.de/idp/profile/SAML2/POST/SSO 
-# https://idp.uni-beispiel.de/idp/profile/SAML2/Redirect/SSO 
-# https://idp.uni-beispiel.de/idp/profile/Shibboleth/SSO 
-# 
-# Sofern der Port 443 nicht von der Distribution angeschaltet wird 
-# (bei Debian in /etc/apache2/ports.conf, bei openSUSE in /etc/apache2/listen.conf) 
-# können Sie das hier manuell machen: 
-# 
-# Listen 443 
-# 
- 
-################################################ 
-# 
-# SingleSignOnService auf Port 443 
-# 
-<VirtualHost IDP-IP-ADRESSE:443 [IDP-IPv6-ADRESSE]:443> 
-  ServerName              idp.uni-beispiel.de 
- 
-  SSLEngine on 
-  SSLCertificateFile      /etc/ssl/localcerts/idp.uni-beispiel.crt.pem 
-  SSLCertificateKeyFile   /etc/ssl/private/idp.uni-beispiel.key.pem 
-  SSLCACertificateFile    /etc/ssl/chains/uni-beispiel-chain.pem 
- 
-  AddDefaultCharset UTF-8 
- 
-  <Location /idp> 
-    Require all granted 
-    ProxyPass ajp://localhost:8009/idp 
-    # "SAMEORIGIN" vermeidet etwaige Fehlermeldungen 
-    # im Browser beim Logout über mehrere SPs,  
-    # da hierbei mit iframes gearbeitet wird 
-    Header always append X-FRAME-OPTIONS "SAMEORIGIN" 
-  </Location> 
- 
-</VirtualHost> 
-  
-################################################ 
-# 
-# ArtifactResolutionService und AttributeService 
-# 
-# https://idp.beispiel-uni.de:8443/idp/profile/SAML2/SOAP/ArtifactResolution 
-# https://idp.beispiel-uni.de:8443/idp/profile/SAML1/SOAP/ArtifactResolution 
-# 
-# https://idp.beispiel-uni.de:8443/idp/profile/SAML2/SOAP/AttributeQuery 
-# https://idp.beispiel-uni.de:8443/idp/profile/SAML1/SOAP/AttributeQuery 
-# 
-Listen IDP-IP-ADRESSE:8443 
-Listen [IDP-IPv6-ADRESSE]:8443 
- 
-<VirtualHost IDP-IP-ADRESSE:8443 [IDP-IPv6-ADRESSE]:8443> 
-  ServerName              idp.uni-beispiel.de 
- 
-  SSLEngine on 
-  SSLCertificateFile      /etc/ssl/localcerts/idp.uni-beispiel.crt.pem 
-  SSLCertificateKeyFile   /etc/ssl/private/idp.uni-beispiel.key.pem 
-  SSLCACertificateFile    /etc/ssl/chains/uni-beispiel-chain.pem 
- 
-  # hier muss wegen veralteten SP-Clients (z.B. Thomson Reuters) 
-  # eine etwas weniger strikte Konfiguration genommen werden 
-  # als von bettercrypto.org empfohlen wird: 
-  SSLCipherSuite 'EECDH+ECDSA+AESGCM+AES128:AES128:EECDH+ECDSA+AESGCM+AES256:AES256:!aNULL:!eNULL:!PSK:!SRP:!DH' 
-   
-  # Diese drei SSL-Optionen sind zwingend notwendig 
-  # damit SP-Abfragen auf diesen Port funktionieren! 
-  # Details siehe Shibboleth-Wiki 
-  SSLVerifyClient       optional_no_ca 
-  SSLVerifyDepth        10 
-  SSLOptions            +StdEnvVars +ExportCertData 
- 
-  <Location /idp> 
-    Require all granted 
-    ProxyPass ajp://localhost:8009/idp 
-  </Location> 
- 
-</VirtualHost> 
- 
-</file> 
-Nach jeder Änderung die Konfiguration des HTTP Servers neu laden: 
-<code bash> 
-root@idp:~# service apache2 reload 
-</code> 
- 
-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 /var/log/apache2/error_log 
-</code> 
- 
-=== 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: 
-<code> 
-https://HOSTNAME/idp/ 
-</code> 
- 
-Funktioniet die Weiterleitung, dann bekommen Sie eine Fehlermeldung "HTTP Status 404 - /idp/" oder (je nach Tomcat-Version) eine weisse Seite vom Tomcat zu sehen da das IdP-Servlet im Tomcat noch nicht aktiv ist. Die Weiterleitung ist damit aber erfolgreich getestet! 
-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://www.aai.dfn.de/aktuelles/newsansicht/article/emfohlene-konfigurationsaenderung-fuer-den-shibboleth-idp-83/|Archiv]]). 
-  * stellen Sie sicher dass die Apache-SSL-Konfiguration aktuellen Sicherheitsstandards entspricht! Details dazu übersteigen den Rahmen diese Anleitung. Hilfreiche Seiten: 
-    * [[https://bettercrypto.org/]] 
-    * [[https://www.dfn-cert.de/]] 
-    * https://blog.pki.dfn.de/2015/03/mehr-privacy-fuer-den-nutzer-ocsp-stapling/]] 
-    * [[https://blog.pki.dfn.de/]] 
-    * [[https://www.ssllabs.com/ssltest/]] 
- 
-====Windows==== 
- 
-Beispiel für eine Minimal-Konfiguration unter Windows (bereitgestellt von Thomas Glatzer, Uni Mainz): 
- 
-<code apache conf/httpd.conf> 
-# 
-# This is the main Apache HTTP server configuration file.  It contains the 
-# configuration directives that give the server its instructions. 
-# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information. 
-# In particular, see  
-# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html> 
-# for a discussion of each configuration directive. 
-# 
- 
-# ServerRoot: The top of the directory tree under which the server's 
-# configuration, error, and log files are kept. 
-# 
-# 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 "C:/Program Files/Apache/Apache24" 
- 
- 
-# 
-# Dynamic Shared Object (DSO) Support 
-# 
-LoadModule authn_core_module modules/mod_authn_core.so 
-LoadModule authz_core_module modules/mod_authz_core.so 
- 
-LoadModule headers_module modules/mod_headers.so 
-LoadModule reqtimeout_module modules/mod_reqtimeout.so 
-LoadModule log_config_module modules/mod_log_config.so 
-LoadModule mime_module modules/mod_mime.so 
- 
-LoadModule proxy_module modules/mod_proxy.so 
-#LoadModule proxy_http_module modules/mod_proxy_ajp.so 
-LoadModule proxy_http_module modules/mod_proxy_http.so 
- 
-LoadModule ssl_module modules/mod_ssl.so 
-LoadModule socache_shmcb_module modules/mod_socache_shmcb.so 
- 
-# 'Main' server configuration 
-ServerAdmin glatzert@uni-mainz.de 
-ServerName shib.uni-mainz.de 
- 
-# 
-# Deny access to the entirety of your server's filesystem. You must 
-# explicitly permit access to web content directories in other  
-# <Directory> blocks below. 
-# 
-<Directory /> 
-    AllowOverride none 
-    Require all denied 
-</Directory> 
- 
-DocumentRoot "c:/inetpub/shib.uni-mainz.de" 
-<Directory "c:/inetpub/shib.uni-mainz.de"> 
-    Options None 
- 
-    AllowOverride None 
-    Require all granted 
-</Directory> 
- 
-<Files ".ht*"> 
-    Require all denied 
-</Files> 
- 
-ErrorLog "C:/inetpub/logs/apache/error.log" 
-TransferLog "C:/inetpub/logs/apache/access.log" 
-LogLevel warn 
- 
-<IfModule mime_module> 
-    TypesConfig conf/mime.types 
- 
-    AddType application/x-compress .Z 
-    AddType application/x-gzip .gz .tgz 
-</IfModule> 
- 
-Include conf/extra/httpd-ssl.conf 
-Include conf/extra/shib-sp.conf 
-Include conf/extra/shib-idp.conf 
-</code>  
-<code apache conf/extra/httpd-ssl.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/x-x509-ca-cert .crt 
-AddType application/x-pkcs7-crl    .crl 
- 
-SSLRandomSeed startup builtin 
-SSLRandomSeed connect builtin 
- 
-SSLProtocol All -SSLv3 
-SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:ECDH+3DES:DH+3DES:RSA+3DES:!aNULL:!eNULL:!LOW:!RC4:!MD5:!EXP:!PSK:!DSS:!SEED:!ECDSA:!CAMELLIA 
-SSLHonorCipherOrder On 
- 
-SSLUseStapling off 
-SSLStaplingCache "shmcb:c:/inetpub/logs/apache/ssl_stapling(512000)" 
-SSLStaplingReturnResponderErrors off 
- 
-SSLSessionCache "shmcb:c:/inetpub/logs/apache/ssl_scache(512000)" 
-SSLSessionCacheTimeout  300 
- 
-SSLCertificateFile "C:/inetpub/shibboleth/idp/credentials/shib.uni-mainz.de.crt" 
-SSLCertificateKeyFile "C:/inetpub/shibboleth/idp/credentials/shib.uni-mainz.de.key" 
-</code> 
-<code apache conf/extra/shib-idp.conf> 
-################################################ 
-# 
-# SingleSignOnService 
-# 
- 
-Listen 443 
- 
-<VirtualHost _default_:443> 
-  DocumentRoot "C:/inetpub/shib.uni-mainz.de" 
-  ServerAdmin glatzert@uni-mainz.de 
- 
-  SSLEngine on 
-  Header add Strict-Transport-Security "max-age=15768000" 
-   
-  <Proxy http://localhost:8080/idp/*> 
-    Require all granted 
-  </Proxy> 
-  ProxyPass /idp/ http://localhost:8080/idp/ 
-</VirtualHost> 
- 
-################################################ 
-# 
-# ArtifactResolutionService und AttributeService 
-# 
- 
-Listen 8443 
- 
-<VirtualHost _default_:8443> 
-  DocumentRoot "C:/inetpub/shib.uni-mainz.de" 
-  ServerAdmin glatzert@uni-mainz.de 
-   
-  SSLEngine on 
-  Header add Strict-Transport-Security "max-age=15768000" 
-   
-  <Proxy http://localhost:8080/idp/*> 
-    Require all granted 
-  </Proxy> 
-  ProxyPass /idp/ http://localhost:8080/idp/ 
-</VirtualHost> 
-</code> 
-<code apache conf/extra/shib-sp.conf> 
-# https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPApacheConfig 
- 
-LoadModule mod_shib C:/inetpub/shibboleth/sp/lib64/shibboleth/mod_shib_24.so 
- 
-<Location /Shibboleth.sso> 
-  AuthType None 
-  Require all granted 
-</Location> 
- 
-<LocationMatch "(/idp/(.*)/SSO)|(/idp/Authn)"> 
-  AuthType shibboleth 
-  ShibRequestSetting requireSession 1 
-  Require shibboleth 
-</LocationMatch> 
-</code> 
  
  • Zuletzt geändert: vor 7 Jahren