2008-09-04 102 views

回答

1

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

1

我喜欢有关配置Apache以使用Kerberos这篇文章:

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

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

编辑:

Fullblown answer

配置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/

+2

感谢张贴你的答案!请注意,你应该在这里发布答案的重要部分,在这个网站上,或者你的帖子风险被删除[参见常见问题,其中提到的答案几乎不超过链接。](http:// stackoverflow。 com/faq#deletion)如果您愿意,您可能仍然包含该链接,但仅作为“参考”。答案应该独立,不需要链接。 – Taryn 2013-09-11 15:45:59