...
- FQDN : cas.ifsic.univ-rennes1.fr
- IP : 148.60.10.51
Authentification web par kerberos
Installation Apache
Installer httpd (Apache) et mod_auth_kerb.
...
| Bloc de code |
|---|
addprinc -randkey HTTP/cas.ifsic.univ-rennes1.fr
ktadd -k /etc/httpd/conf/mod_auth_kerb.keytab HTTP/cas.ifsic.univ-rennes1.fr
addprinc -randkey host/cas.ifsic.univ-rennes1.fr
ktadd -k /etc/krb5.keytab host/cas.ifsic.univ-rennes1.fr |
Puis :
Puis :
| Bloc de code |
|---|
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 :
| Bloc de code |
|---|
<Location /kerb>
\# SSLRequireSSL
AuthType KerberosV5
AuthName "Kerberos Login"
KrbMethodNegotiate On
KrbMethodK5Passwd Off
KrbAuthRealms IFSIC.UNIV-RENNES1.FR
Krb5KeyTab |
| Bloc de code |
chmod 600 /etc/krb5.keytab chown apache /etc/httpd/conf/mod_auth_kerb.keytab chmod 640require /etc/httpd/conf/mod_auth_kerb.keytabvalid-user </Location> |
Ecrire un simple script test.php dans le répertoire /var/www/html/kerb :
| Bloc de code |
|---|
<? 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
| Balise Wiki |
|---|
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*). |