Apache中的Kerberos用户身份验证

时间:2008-09-04 10:32:17

标签: apache authentication kerberos

任何人都可以推荐一些非常好的资源来解决如何使用Kerberos对Apache进行身份验证的用户。

Kerberos上的背景阅读也很有用

由于

彼得

4 个答案:

答案 0 :(得分:4)

mod_auth_kerb是一个好的开始:http://modauthkerb.sourceforge.net/。如果您需要Active Directory支持,请查看此处:http://support.microsoft.com/?id=555092

答案 1 :(得分:1)

我发现mod_auth_spnego也很好,因为它可以在Windows上使用SSPI而不需要MIT Kerberos。 mod_spnego

答案 2 :(得分:1)

以下是使用Active Directory作为KDC的示例: http://oslabs.mikro-net.com/krb_apache.html

答案 3 :(得分:1)

我喜欢这篇关于配置apache以使用Kerberos的文章:

http://www.roguelynn.com/words/apache-kerberos-for-django/

(如果您不感兴趣,可以跳过关于django的部分)

编辑:

完全回答

配置apache以使用Kerberos身份验证非常容易。

我假设您已在计算机上正确配置了Kerberos。

1)您的网络服务器必须有keytab [1]。

一句话,您的网络服务器能够读取密钥表!

2)您必须拥有适当的httpd模块进行身份验证 - mod_auth_kerb

LoadModule auth_kerb_module modules/mod_auth_kerb.so

3)然后你必须告诉apache有关Kerberos的信息:

<Location /> 
    AuthName "Kerberos Authentication -- this will be showed to users via BasicAuth"
    AuthType Kerberos
    KrbMethodNegotiate On
    KrbMethodK5Passwd Off
    # this is the principal from your keytab (you may lose the FQDN part)
    KrbServiceName HTTP/$FQDN
    KrbAuthRealms KERBEROS_DOMAIN
    Krb5KeyTab /path/to/http.keytab
    Require valid-user

    Order Deny,Allow
    Deny from all
</Location>

然后,apache会通过REMOTE_USER HTTP标头将用户传递给您的应用。

就是这样。

我还建议您在安装过程中打开apache中的调试日志。确保你有正确的时间,httpd可以读取密钥表,这就是全部。

[1] http://kb.iu.edu/data/aumh.html

[2]主要资源:http://www.roguelynn.com/words/apache-kerberos-for-django/