提问人:Vagnerr 提问时间:9/4/2008 更新时间:4/7/2014 访问量:8764
Apache 中的 Kerberos 用户身份验证
Kerberos user authentication in Apache
答:
mod_auth_kerb是一个好的开始:http://modauthkerb.sourceforge.net/。如果您需要 Active Directory 支持,请在此处查看:http://support.microsoft.com/?id=555092。
我发现mod_auth_spnego也很好,因为它可以在 Windows 上使用 SSPI,而不需要 MIT Kerberos。mod_spnego
下面是使用 Active Directory 作为 KDC 的示例: http://oslabs.mikro-net.com/krb_apache.html
我喜欢这篇关于配置 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 会通过 HTTP 标头将用户传递给您的应用程序。REMOTE_USER
就是这样。
我还建议您在安装过程中打开apache中的调试日志记录。确保你有正确的时间,httpd可以读取keytab,仅此而已。
[1] http://kb.iu.edu/data/aumh.html
[2] 主要资源:http://www.roguelynn.com/words/apache-kerberos-for-django/
评论