Fedora 18
Sponsored Link

FreeIPA Authentication2013/01/28

 
Configure httpd and set a page that people must authenticate with FreeIPA Server. Therefore it's necessarry to run FreeIPA Server in your LAN.
[1] First, add HTTP service like follows on the FreeIPA Server.
# how to write ⇒ ipa service-add HTTP/(your web server)

[root@dlp ~]#
ipa service-add HTTP/www.srv.world

--------------------------------------------------
Added service "HTTP/www.srv.world@SRV.WORLD"
--------------------------------------------------
  Principal: HTTP/www.srv.world@SRV.WORLD
  Managed by: www.srv.world
[2] Configure on the Web Server. For example, create a directory "ipa" and it requires authentication with IPA Server.
# install some packgaes first

[root@www ~]#
yum -y install mod_ldap mod_auth_kerb
[root@www ~]#
kinit admin

Password for admin@SRV.WORLD:
# IPA admin password
# generate Keytab

[root@www ~]#
ipa-getkeytab -s dlp.srv.world -p HTTP/www.srv.world -k /etc/httpd/conf.d/keytab

Keytab successfully retrieved and stored in: /etc/httpd/conf.d/keytab
[root@www ~]#
chown apache. /etc/httpd/conf.d/keytab
[root@www ~]#
vi /etc/httpd/conf.d/auth_ipa.conf
# create new

<Directory /var/www/html/ipa>
    SSLRequireSSL
    AuthName "IPA Authentication"
    AuthType Kerberos

    KrbServiceName HTTP
    KrbMethodK5Passwd On
    KrbSaveCredentials On
    KrbMethodNegotiate On
    KrbAuthRealms SRV.WORLD
    Krb5KeyTab /etc/httpd/conf.d/keytab

    AuthLDAPUrl ldap://10.0.0.30/dc=srv,dc=world?krbPrincipalName
    Require valid-user
</Directory>

[root@www ~]#
systemctl restart httpd.service
[root@www ~]#
vi /var/www/html/ipa/index.html
# create a test page

<html>
<body>
<div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;">
Test Page for IPA Server Auth
</div>
</body>
</html>
  Access to the test page with web browser, then authentication is required as a config. Input a FreeIPA user and authenticate here.
  Just accessed.
Matched Content