Boot sur CD Fedora 10.
- FQDN : cas.ifsic.univ-rennes1.fr
- IP : 148.60.10.51
Authentification web par kerberos
Installation Apache
Installer httpd (Apache) et mod_auth_kerb.
Sous kadmin :
addprinc -randkey HTTP/cas.ifsic.univ-rennes1.fr ktadd -k /etc/httpd/conf/mod_auth_kerb.keytab HTTP/cas.ifsic.univ-rennes1.fr
Puis :
chown apache /etc/httpd/conf/mod_auth_kerb.keytab chmod 640 /etc/httpd/conf/mod_auth_kerb.keytab
Protéger un répertoire par Kerberos en éditant /etc/httpd/conf.d/auth_kerb.conf :
<Location /kerb> \# SSLRequireSSL AuthType KerberosV5 AuthName "Kerberos Login" KrbMethodNegotiate On KrbMethodK5Passwd Off KrbAuthRealms IFSIC.UNIV-RENNES1.FR Krb5KeyTab /etc/httpd/conf/mod_auth_kerb.keytab require valid-user </Location>
Ecrire un simple script test.php dans le répertoire /var/www/html/kerb :
<? phpinfo(); ?>
Configuration Firefox
pour transmettre l'authentification Kerberos de Firefox à mod_auth_kerb :
- entrer about:config dans la barre de navigation
- entrer nego dans le filtre
- positionner les variables network.negociate-auth.delegation-uris et network.negociate-auth.trusted-uris à ifsic.univ-rennes1.fr.
Test
Tester en accédant http://cas.ifsic.univ-rennes1.fr/kerb/test.php. Le nom de l'utilisateur doit apparaître dans les variables $_SERVER["REMOTE_USER"] et $_SERVER["PHP_AUTH_USER"] (quelque chose comme paubry@IFSIC.UNIV-RENNES1.FR).