Dies ist eine alte Version des Dokuments!


Shibboleth SP

Apache Webserver

/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 -SSLv2 -SSLv3
  SSLHonorCipherOrder On
  SSLCompression off
  SSLCipherSuite 'EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA'
 
  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 BetterCrypto.org, dem DFN-CERT, der DFN-PKI oder SSL LABS. Das letztgenannte Portal bietet auch einen Online-Test der Webserver-Konfiguration an.

Shibboleth SP

/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. -->
      <Handler type="Status" Location="/Status" acl="127.0.0.1 ::1"/>
      ...
      <!-- 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 5 Jahren