Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
Das Regionale RechenZentrum Erlangen (RRZE)
SimpleSAMLphpals Identity Provider in der DFN-AAI
F. Tröger
AgendaAgenda
1. Einsatz an der FAU
2. Installation & Konfiguration
3. Einrichtung IdP – Integration in die DFN-AAI-Föderation
4. Erweiterungen:
Metarefresh- & Consent-Modul, Bridging, Theming, …
5. Ausblick
AgendaAgenda
1. Einsatz an der FAU
2. Installation & Konfiguration
3. Einrichtung IdP – Integration in die DFN-AAI-Föderation
4. Erweiterungen:
Metarefresh- & Consent-Modul, Bridging, Theming, …
5. Ausblick
Historie Web-SSO an der FAU
• Seit 12/2006: Beschäftigung mit dem ThemaWebSSO, Shibboleth, IdP & SP
• SimpleSAMLphp• 06/2008: Erster Kontakt (auf EUNIS 2008)• 03/2009: Erste Testinstallation• Seit 14.10.2009: Produktiver Betrieb• 11.08.2010: Beitritt DFN-AAI-Föderation
• Stiefmütterliche Behandlung, da „kleiner Bruder“ des Identity Management Projektes
• Seit 02/2012: Aufbau einer neuen Infrastruktur als Abschlussprojekt (Auszubildener → jetzt Mitarbeiter)
Historie Web-SSO an der FAU
• Seit 12/2006: Beschäftigung mit dem ThemaWebSSO, Shibboleth, IdP & SP
• SimpleSAMLphp• 06/2008: Erster Kontakt (auf EUNIS 2008)• 03/2009: Erste Testinstallation• Seit 14.10.2009: Produktiver Betrieb• 11.08.2010: Beitritt DFN-AAI-Föderation
• Stiefmütterliche Behandlung, da „kleiner Bruder“ des Identity Management Projektes
• Seit 02/2012: Aufbau einer neuen Infrastruktur als Abschlussprojekt (Auszubildener → jetzt Mitarbeiter)
Historie Web-SSO an der FAU
• Seit 12/2006: Beschäftigung mit dem ThemaWebSSO, Shibboleth, IdP & SP
• SimpleSAMLphp• 06/2008: Erster Kontakt (auf EUNIS 2008)• 03/2009: Erste Testinstallation• Seit 14.10.2009: Produktiver Betrieb• 11.08.2010: Beitritt DFN-AAI-Föderation
• Stiefmütterliche Behandlung, da „kleiner Bruder“ des Identity Management Projektes
• Seit 02/2012: Aufbau einer neuen Infrastruktur als Abschlussprojekt (Auszubildener → jetzt Mitarbeiter)
Aktuelle Infrastruktur
• Ein virtueller Server• SimpleSAMLphp• Apache2• OpenLDAP• PostgreSQL
www.sso.uni-erlangen.de
AgendaAgenda
1. Einsatz an der FAU
2. Installation & Konfiguration
3. Einrichtung IdP – Integration in die DFN-AAI-Föderation
4. Erweiterungen:
Metarefresh- & Consent-Modul, Bridging, Theming, …
5. Ausblick
Voraussetzungen
sso ~ # apt-get install apache2sso ~ # apt-get install libapache2-mod-php5sso ~ # apt-get install php5-ldapsso ~ # apt-get install php5-mcryptsso ~ # apt-get install php5-pgsql
File Edit View Search Terminal Help
• Installation Apache2• Installation PHP inkl. benötigter Module
• php5-ldap→ Authentifizierung gegen LDAP
• php5-mcrypt→ Verschlüsselung der Assertions
• php5-pgsql→ Speicherung Einverständniserklärungen (Consent-Modul); Alternative: php5-mysql
getestet unterubuntu (Vortrag) & sles (Betrieb)
Installation
frank@sso ~ $ wget http://simplesamlphp.googlecode.com/files/simplesamlphp-1.10.0.tar.gzfrank@sso / $ cd /varfrank@sso /var $ sudo tar xzvf ~/simplesamlphp-1.10.0.tar.gzfrank@sso /var $ sudo ln -s simplesamlphp-1.10.0 simplesamlphpfrank@sso /var $ ls -llrwxrwxrwx 1 root root 20 Mar 8 10:01 simplesamlphp -> simplesamlphp-1.10.0drwxr-xr-x 19 root root 4096 Sep 25 12:16 simplesamlphp-1.10.0
File Edit View Search Terminal Help
• Herunterladen und Entpacken
• Webseite: http://simplesamlphp.org/• Aktuelle Version: 1.10.0 (25.09.2012)
SimpleSAMLphp-Verzeichnis
frank@sso /var/simplesamlphp $ ls -ltotal 96drwxr-xr-x 2 root root 4096 Sep 25 12:16 attributemapdrwxr-xr-x 2 root root 4096 Sep 25 12:16 bindrwxr-xr-x 2 root root 4096 Sep 25 12:16 certdrwxr-xr-x 2 root root 4096 Sep 25 12:16 configdrwxr-xr-x 2 root root 4096 Sep 25 12:16 config-templates-rw-r--r-- 1 root root 26709 Jan 29 2010 COPYINGdrwxr-xr-x 2 root root 4096 Sep 25 12:16 datadrwxr-xr-x 2 root root 4096 Sep 25 12:16 dictionariesdrwxr-xr-x 3 root root 4096 Sep 25 12:16 docsdrwxr-xr-x 2 root root 4096 Sep 25 12:16 extradrwxr-xr-x 5 root root 4096 Sep 25 12:16 libdrwxr-xr-x 2 root root 4096 Sep 25 12:16 logdrwxr-xr-x 2 root root 4096 Sep 25 12:16 metadatadrwxr-xr-x 2 root root 4096 Sep 25 12:16 metadata-templatesdrwxr-xr-x 52 root root 4096 Sep 25 12:16 modulesdrwxr-xr-x 2 root root 4096 Sep 25 12:16 schemasdrwxr-xr-x 3 root root 4096 Sep 25 12:16 templatesdrwxr-xr-x 9 root root 4096 Sep 25 12:16 www
File Edit View Search Terminal Help
Apache2 Konfiguration
…
Alias /simplesaml /var/simplesamlphp/www <Directory /> Options FollowSymLinks AllowOverride None </Directory>
…
/etc/apache2/sites-enabled/simplesamlphp-ssl
• Alias für www Unterverzeichnis• siehe auch baseurlpath in config/config.php
• Weitere Einstellungen• SSL, …
SimpleSAMLphp Konfiguration
…
'auth.adminpassword' => 'uo:vai7P',… 'secretsalt' => '9dvfm4exk3lnvv72z0mkbqi1j87wgxns', … 'technicalcontact_name' => 'Frank Tröger', 'technicalcontact_email' => '[email protected]',…
'timezone' => 'Europe/Berlin',…
'language.default' => 'de',
…
config/config.php
• Zentrale Einstellungen• Sehr gut dokumentiert• Weitere Einstellungen: Logging, …
AgendaAgenda
1. Einsatz an der FAU
2. Installation & Konfiguration
3. Einrichtung IdP – Integration in die DFN-AAI-Föderation
4. Erweiterungen:
Metarefresh- & Consent-Modul, Bridging, Theming, …
5. Ausblick
Authentifizierungsmodule
• authcrypt:Hash, authcrypt:Htpasswd, authX509:authX509userCert, exampleauth:UserPass, exampleauth:Static, ldap:LDAP, ldap:LDAPMulti, sqlauth:SQL, radius:Radius, InfoCard:ICAuth, multiauth:MultiAuth, openid:OpenIDConsumer, saml:SP, authYubiKey:YubiKey, authfacebook:Facebook, authtwitter:Twitter, papi:PAPI
Quelle:http://simplesamlphp.org/docs/stable/simplesamlphp-idp#section_2
• Erweiterung durch eigene Module möglich
Authentifizierungsmodul ldap:LDAP
frank@sso /var/simplesamlphp $ sudo touch modules/ldap/enable
File Edit View Search Terminal Help
• Authentifizierungsquelle: sso-ldap• Weitere Optionen vorhanden und gut dokumentiert
…
'sso-ldap' => array( 'ldap:LDAP', 'hostname' => 'sso.test.fau.de', 'enable_tls' => FALSE, 'attributes' => NULL, 'search.enable' => TRUE, 'search.base' => 'ou=people,ou=sso,dc=test,dc=fau,dc=de', 'search.attributes' => array('uid', 'mail'), 'search.username' => 'cn=idp,ou=sso,dc=test,dc=fau,dc=de', 'search.password' => 'pHe3!5ja', ),
…
config/authsources.php
IdP aktivieren
…
'enable.saml20-idp' => true, 'enable.shib13-idp' => true, 'enable.adfs-idp' => false, 'enable.wsfed-sp' => false, 'enable.authmemcookie' => false,
…
config/config.php
• enable.saml20-idp → Shibboleth 2.x IdP• enable.shib13-idp → Shibboleth 1.x IdP
Metadaten-Verzeichnis
frank@sso /var/simplesamlphp $ ls -l metadatatotal 44-rw-r--r-- 1 root root 170 Sep 25 12:16 adfs-idp-hosted.php-rw-r--r-- 1 root root 272 Sep 25 12:16 adfs-sp-remote.php-rw-r--r-- 1 root root 888 Sep 25 12:16 saml20-idp-hosted.php-rw-r--r-- 1 root root 3758 Sep 25 12:16 saml20-idp-remote.php-rw-r--r-- 1 root root 1178 Sep 25 12:16 saml20-sp-remote.php-rw-r--r-- 1 root root 609 Sep 25 12:16 shib13-idp-hosted.php-rw-r--r-- 1 root root 400 Sep 25 12:16 shib13-idp-remote.php-rw-r--r-- 1 root root 244 Sep 25 12:16 shib13-sp-hosted.php-rw-r--r-- 1 root root 969 Sep 25 12:16 shib13-sp-remote.php-rw-r--r-- 1 root root 225 Sep 25 12:16 wsfed-idp-remote.php-rw-r--r-- 1 root root 167 Sep 25 12:16 wsfed-sp-hosted.php
File Edit View Search Terminal Help
• idp ↔ sp• hosted ↔ remote
Shibboleth 2.x IdP einrichten
…$metadata['https://sso.test.fau.de/simplesaml/saml2/idp/metadata.php'] = array( 'host' => 'sso.test.fau.de', 'privatekey' => 'sso.test.fau.de.pem', 'certificate' => 'sso.test.fau.de.crt', 'auth' => 'sso-ldap', 'redirect.sign' => true, 'attributes.NameFormat' => 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri', 'authproc' => array( // Convert LDAP names to urns. 100 => array('class' => 'core:AttributeMap', 'name2urn'), ),
);
…
metadata/saml20-idp-hosted.php
• Verwendung der Authentifizierungsquelle sso-ldap• Attributnamen auf URNs abbilden
Shibboleth 1.x IdP einrichten
…//$metadata['https://sso.test.uni-erlangen.de/simplesaml/shib13/idp/metadata.php'] = array($metadata['https://sso.test.uni-erlangen.de/simplesaml/saml2/idp/metadata.php'] = array(
'host' => 'unrz157.vpn.rrze.uni-erlangen.de', 'privatekey' => 'unrz157.vpn.rrze.uni-erlangen.de.pem', 'certificate' => 'unrz157.vpn.rrze.uni-erlangen.de.crt', 'auth' => 'sso-ldap', 'attributes.NameFormat' => 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri', 'authproc' => array( // Convert LDAP names to urns 100 => array('class' => 'core:AttributeMap', 'name2urn'), ),
);
…
metadata/shib13-idp-hosted.php
• Verwendung der Authentifizierungsquelle sso-ldap• Trick: Gleiche Entity-Id wie Shibboleth 2.x IdP
Beispiel-SP eintragen
…$metadata['https://dev1.rrze.de/Shibboleth.sso/Metadata'] = array( 'name' => array ('de' => 'Entwicklung', 'en' => 'Development'), 'AssertionConsumerService' => 'https://dev1.rrze.de/Shibboleth.sso/SAML2/POST', 'SingleLogoutService' => 'https://dev1.rrze.de/Shibboleth.sso/SLO/Redirect', 'attributes' => array( 'uid', 'mail', 'givenName', 'sn', 'schacGender' ),);
…
metadata/saml20-sp-remote.php
• Attribute filtern mittels attributes• authproc ebenfalls verfügbar
AgendaAgenda
1. Einsatz an der FAU
2. Installation & Konfiguration
3. Einrichtung IdP – Integration in die DFN-AAI-Föderation
4. Erweiterungen:
Metarefresh- & Consent-Modul, Bridging, Theming, …
5. Ausblick
Modul metarefresh
frank@sso /var/simplesamlphp $ sudo touch modules/metarefresh/enablefrank@sso /var/simplesamlphp $ sudo cp modules/metarefresh/config-templates/config-metarefresh .php config/
File Edit View Search Terminal Help
'dfntest' => array('cron' => array('hourly'),
'sources' => array( array( 'src' => 'https://www.aai.dfn.de/fileadmin/metadata/DFN-AAI-Test-metadata.xml', 'template' => array(
'tags' => array('dfntest'), 'authproc' => array( 49 => array('class' => 'core:AttributeLimit', 'sn', 'givenName'), ), ), ), ), 'expireAfter' => 60*60*24*4, // Maximum 4 days cache time.
'outputDir' => 'metadata/dfntest/', 'outputFormat' => 'flatfile',
),
config/config-metarefresh.php
Modul consent
frank@sso /var/simplesamlphp $ sudo touch modules/consent/enable
File Edit View Search Terminal Help
… 'authproc' => array(
90 => array( 'class' => 'consent:Consent', 'store' => array( 'consent:Database', 'dsn' => 'pgsql:host=localhost;dbname=consent', 'username' => 'simplesaml', 'password' => 'er1:qWht', ), 'includeValues' => TRUE, //'checked' => FALSE, //'focus' => "yes" or "no" //'hiddenAttributes' => array(), ), 100 => array('class' => 'core:AttributeMap', 'name2urn'), ),…
metadata/saml2-idp-hosted.php
Bridging zwischen Protokollen
• Definition einer Authentifizierungsquelle vom Typ saml:SP
…
// An authentication source which can authenticate against both SAML 2.0 // and Shibboleth 1.3 IdPs. 'default-sp' => array( 'saml:SP', 'entityID' => 'https://sso.test.uni-erlangen.de/simplesaml/module.php/saml/sp/metadata.php/default-sp', 'idp' => 'https://sso.test.uni-erlangen.de/simplesaml/saml2/idp/metadata.php', 'discoURL' => NULL, ),
…
config/authsources.php
Shibboleth 1.x IdP Bridging
…$metadata['https://sso.test.uni-erlangen.de/simplesaml/shib13/idp/metadata.php'] = array(
'host' => 'unrz157.vpn.rrze.uni-erlangen.de', 'privatekey' => 'unrz157.vpn.rrze.uni-erlangen.de.pem', 'certificate' => 'unrz157.vpn.rrze.uni-erlangen.de.crt', //'auth' => 'sso-ldap', 'auth' => 'default-sp', 'attributes.NameFormat' => 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri', 'authproc' => array(
// Convert LDAP urns to names 10 => array('class' => 'core:AttributeMap', 'urn2name'), // Convert LDAP names to urns 100 => array('class' => 'core:AttributeMap', 'name2urn'), ),
);
…
metadata/shib13-idp-hosted.php
• Verwendung der Authentifizierungsquelle default-sp
default-sp als SP eintragen
…$metadata['https://sso.test.uni-erlangen.de/simplesaml/module.php/saml/sp/metadata.php/default-sp'] = array ( 'AssertionConsumerService' => 'https://sso.test.uni-erlangen.de/simplesaml/module.php/saml/sp/saml2-acs.php/default-sp', 'SingleLogoutService' => 'https://sso.test.uni-erlangen.de/simplesaml/module.php/saml/sp/saml2-logout.php/default-sp', 'consent.disable' => TRUE,);
…
metadata/saml20-sp-remote.php
• default-sp dem Shibboleth 2.x IdP bekannt machen
AgendaAgenda
1. Einsatz an der FAU
2. Installation & Konfiguration
3. Einrichtung IdP – Integration in die DFN-AAI-Föderation
4. Erweiterungen:
Metarefresh- & Consent-Modul, Bridging, Theming, …
5. Ausblick
Ausblick
• Mehrere Apache2 als Proxy (vorne)• HTTPS-Aufpunkt• Load-Balancing• Caching
• Mehrere SimpleSAMLphp (hinten)• Session via memcached
www.sso.uni-erlangen.de
AgendaAgenda
Live-Demo?
Herzlichen Dank!
Regionales RechenZentrum Erlangen (RRZE)Martensstraße 1, 91058 Erlangenhttp://www.rrze.fau.de