设置问题使用Kerberos身份validation设置单一login

我需要使用Kerberos身份validation通过Active Directory进行Ruby on Rail应用程序集身份validation。

一些技术信息:

  1. 我正在使用Apache
  2. 安装了mod_auth_kerb
  3. httpd.conf中,我添加了LoadModule auth_kerb_module modules / mod_auth_kerb.so
  4. /etc/krb5.conf中添加了以下configuration

    [logging] default = FILE:/var/log/krb5libs.log kdc = FILE:/var/log/krb5kdc.log admin_server = FILE:/var/log/kadmind.log [libdefaults] default_realm = EU.ORG.COM dns_lookup_realm = false dns_lookup_kdc = false ticket_lifetime = 24h forwardable = yes [realms] EU.ORG.COM = { kdc = eudc05.eu.org.com:88 admin_server = eudc05.eu.org.com:749 default_domain = eu.org.com } [domain_realm] .eu.org.com = EU.ORG.COM eu.org.com = EU.ORG.COM [appdefaults] pam = { debug = true ticket_lifetime = 36000 renew_lifetime = 36000 forwardable = true krb4_convert = false } 
  5. 当我testingkinit validuser并input密码时,validation成功。

  6. klist返回

     Ticket cache: FILE:/tmp/krb5cc_600 Default principal: [email protected] Valid starting Expires Service principal 02/08/13 13:46:40 02/08/13 23:46:47 krbtgt/[email protected] renew until 02/09/13 13:46:40 Kerberos 4 ticket cache: /tmp/tkt600 klist: You have no tickets cached 
  7. 在我添加的应用程序的Apacheconfiguration

     IfModule mod_auth_kerb.c> Location /winlogin> AuthType Kerberos AuthName "Kerberos Loginsss" KrbMethodNegotiate off KrbAuthoritative on KrbVerifyKDC off KrbAuthRealms EU.ORG.COM Krb5Keytab /home/crmdata/httpd/apache.keytab KrbSaveCredentials off Require valid-user </Location> </IfModule> 
  8. 我重新启动Apache

现在一些testing:

  1. 当我尝试从Win7访问应用程序时,popup消息框,显示文本:

     Warning: This server is requesting that your username and password be sent in an insecure manner (basic authentification without a secure connection) 
  2. 当我input有效的凭据,然后我的应用程序打开成功,并且一切正常。

问题:

  1. 对于用户popup窗口这样的窗口可以吗? 如果我使用NTLM身份validation,那么没有这样的popup窗口。 我检查了IE Internet选项,并选中“启用集成Windows身份validation”。

  2. 为什么IE试图发送用户名和密码到应用程序的Apache? 如果我正确地理解,那么Windows自己必须使用Kerberos协议通过Active Directory进行身份validation。

  3. 当我尝试从Win7访问应用程序时,input错误的凭据popup消息框

    • 应用程序说authentication失败(这是OK)
    • 在Apache错误日志中,我看到:

       [error] [client 192.168.56.1] krb5_get_init_creds_password() failed: Client not found in Kerberos database 
    • 但现在我无法获得input有效凭证的可能性,只有当我重新启动IE后,我才能再次popup框。

在我的Kerberos安装程序中有什么不正确的或缺失的?

我在一些博客文章中读到,可能需要在Active Directory方面做些事情。 究竟是什么?

你需要KrbMethodNegotiate on
没有这个,http客户端本质上是对apache进行auth-basic,而apache正在testingkdc的密码。
另外,为了安全起见,你应该真的设置KrbVerifyKDC on