Dies ist eine alte Version des Dokuments!


Shibboleth SP

/etc/apache2/sites-enabled/sp.example.org.conf
<VirtualHost SP-IP-ADRESSE:443 [SP-IPv6-ADRESSE]:443>
  ServerName              sp.example.org
 
  SSLEngine on
  SSLCertificateFile      /etc/ssl/localcerts/sp.example.org.crt.pem
  SSLCertificateKeyFile   /etc/ssl/private/sp.example.org.key.pem
  SSLCACertificateFile    /etc/ssl/chains/sp.example.org.chain.pem
 
  #
  # Zur SSL-Konfiguration siehe die Anmerkung unterhalb dieses Beispiels
  #
  SSLProtocol -all +TLSv1.2 +TLSv1.3
  SSLHonorCipherOrder Off
  SSLCompression off
  SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
  SSLCipherSuite TLSv1.3 TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256
 
  Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
 
  UseCanonicalName On
 
  AddDefaultCharset UTF-8
 
  # dieser Alias wird i.d.R. nur benötigt, wenn URL Rewrite o.ä, erfolgt
  # Alias /Shibboleth.sso /Shibboleth.sso
  <Location /Shibboleth.sso>
    SetHandler shib
    Require all granted
  </Location>
 
  # Metadata unter der entityID-URL:
  Redirect seeother /shibboleth https://sp.example.org/Shibboleth.sso/Metadata
 
  <Location /shibboleth-sp>
    Require all granted
  </Location>
  Alias /shibboleth-sp/main.css /usr/share/shibboleth/main.css
  Alias /shibboleth-sp/logo.jpg /usr/share/shibboleth/logo.jpg
 
  #
  # Vom SP zu schützende Location
  #
  # in diesem Beispiel findet keine Autorisierung statt(!)
  # zu Autorisierung etc. siehe unter https://www.switch.ch/aai/guides/sp/access-rules/
  <Location /secure-all>
    AuthType shibboleth
    ShibRequestSetting requireSession true
    Require valid-user
  </Location>
 
  #
  # Support für WAYFless-URLs
  # siehe https://www.ukfederation.org.uk/library/uploads/Documents/WAYFlessGuidance.pdf
  #
  RedirectMatch /start-session$ /Shibboleth.sso/Login
</VirtualHost>

Um sicherzustellen, dass die Webserver-Konfiguration den aktuellen Sicherheitsstandards entspricht, informieren Sie sich bitte z.B. bei Mozilla, dem DFN-CERT, der DFN-PKI oder SSL LABS. Das letztgenannte Portal bietet auch einen Online-Test der Webserver-Konfiguration an.

Ergänzende Hinweise

/etc/shibboleth/shibboleth2.xml
<SPConfig ... >
  ...
  <!-- die entityID des SPs -->
  <ApplicationDefaults entityID="https://sp.example.org/shibboleth" ... >
  ...
   <!-- zu den Parametern vgl. 
   https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPSessions -->
   <Sessions lifetime="28800" timeout="3600" relayState="ss:mem"
             checkAddress="false" consistentAddress="true"  
             handlerSSL="true" cookieProps="https">
      ...
      <!-- falls ECP unterstützt werden soll, hier noch ECP="true" einfügen;
      discoveryURL weist auf den DS für die DFN-AAI Testföderation -->
      <SSO discoveryProtocol="SAMLDS" discoveryURL="https://wayf.aai.dfn.de/DFN-AAI-Test/wayf">
         SAML2
      </SSO>
      <!-- SAML and local-only logout. -->
      <Logout>SAML2 Local</Logout>
      <!-- für Testzwecke kann *vorübergehend* die IP-Adresse des Arbeitsplatzrechners hinzugefügt werden -->
      <!-- Status reporting service, bitte auch für das DFN-Monitoring freigeben  -->
      <Handler type="Status" Location="/Status" acl="127.0.0.1 193.174.247.0/24 ::1 2001:638:206:1::/64"/>
      ...
      <!-- für Testzwecke ggf. "showAttributeValues" *vorübergehend* auf "true" setzen -->
      <!-- Session diagnostic service. -->
      <Handler type="Session" Location="/Session" showAttributeValues="false"/>
      ...
   </Sessions>       
   ...
   <!-- valide (Admin-/Hotline-) eMail-Adresse und korrekte URLs/Pfade einfügen-->
   <Errors supportContact="helpdesk@example.org"
           helpLocation="/about.html"
           styleSheet="/shibboleth-sp/main.css"/>
   ...
   <!-- Metadaten der Test-Föderation -->
   <MetadataProvider type="XML" uri="http://www.aai.dfn.de/fileadmin/metadata/dfn-aai-test-metadata.xml"
         backingFilePath="dfn-aai-test-metadata.xml" reloadInterval="3600">
       <MetadataFilter type="Signature" certificate="/etc/shibboleth/dfn-aai.g2.pem"/>
   </MetadataProvider>
   ...
   <!-- Pfadangaben zu den Zertifikat-Dateien -->
   <CredentialResolver type="File" key="/etc/ssl/private/sp-key.pem" 
          certificate="/etc/ssl/localcerts/sp-crt.pem"/>
   ...
  </ApplicationDefaults>
  ...
</SPConfig>
  • Zuletzt geändert: vor 4 Jahren