apache kerberosauthentication票据在klist下不可见

当我configuration使用kerberos的Apache身份validation。 它工作正常。 它是要求密码并login到网站。 它正在创build一个这样的日志信息。 /var/log/kerberos/krb5kdc.log

Jul 03 15:30:03 ashokkrishna-Lenovo-B560 krb5kdc[4060](info): AS_REQ (6 etypes {18 17 16 23 25 26}) 192.168.1.224: NEEDED_PREAUTH: [email protected] for krbtgt/[email protected], Additional pre-authentication required Jul 03 15:30:03 ashokkrishna-Lenovo-B560 krb5kdc[4060](info): AS_REQ (6 etypes {18 17 16 23 25 26}) 192.168.1.224: ISSUE: authtime 1435917603, etypes {rep=18 tkt=18 ses=18}, [email protected] for krbtgt/[email protected] 

但是当我打

 ashokkrishna@ashokkrishna-Lenovo-B560:~$ klist klist: No credentials cache found (ticket cache FILE:/tmp/krb5cc_1000) 

它没有列出任何获得的票。 为什么? 每当我打开Firefox时,网站一次又一次地询问密码和用户名,虽然我的票到期时间足够长。

但是当我添加用户使用

 ashokkrishna@ashokkrishna-Lenovo-B560:~$ kinit ashokkrishna Password for [email protected]: ashokkrishna@ashokkrishna-Lenovo-B560:~$ klist Ticket cache: FILE:/tmp/krb5cc_1000 Default principal: [email protected] Valid starting Expires Service principal 2015-07-03T15:56:33 2015-07-04T01:56:33 krbtgt/[email protected] renew until 2015-07-04T15:56:30 2015-07-03T15:56:44 2015-07-04T01:56:33 HTTP/[email protected] renew until 2015-07-04T15:56:30 

它的工作正常。

为什么会这样呢?

编辑: / etc / apache2 / sites-enabled / sites-enabled。 **

 <Directory /var/www/html/auth-kerberos> AuthType Kerberos AuthName "Kerberos Authntication" KrbAuthRealms IGROUP.COM Krb5Keytab /etc/krb5.keytab KrbMethodNegotiate On KrbSaveCredentials Off KrbVerifyKDC Off Require valid-user </Directory>** 

kadmin.localconfiguration。

 kadmin.local: listprincs HTTP/[email protected] K/[email protected] ashokkrishna/[email protected] [email protected] host/[email protected] kadmin/[email protected] kadmin/[email protected] kadmin/[email protected] krbtgt/[email protected] root/[email protected] 

ashokkrishna是用户(客户端)。有一件事我有KDC,pipe理服务器,Apache服务器,客户端都在单主机(PC)下。 我正在testing单个系统。

KrbMethodNegotiate由于没有有效(在你的情况下)任何票证而失败时,Apache会故障返回到默认情况下KrbMethodK5Passwd这是您的configuration预期的行为


旁注

  1. Apache不应该使用系统密钥表。 为其configuration一个应用程序密钥表。
  2. 如果您使用的是基本身份validation机制,则该模块不会进行任何特殊的encryption。 用户名和密码的传递是通过基本authentication使用的相同Base64编码完成的。 这可以很容易地转换为纯文本。 为了解决这个问题,我build议也使用mod_ssl或Apache-SSL。 如果使用协商方法,也build议使用SSLencryption。

[Kerberos身份validation]工作正常。 它是要求密码并login到网站。

您的Apache服务器可能configuration为在不能协商Kerberos身份validation时允许某种forms的回退式身份validation。
因为如果您的浏览器提供了Kerberos票据,您将不会被提示input用户名和密码。

对我来说,事实certificate你既没有看到你的个人票证,也没有看到服务票证。

一旦使用kinit手动获取票证授予票证,只有Firefox能够并愿意与Web服务器协商Kerberos身份validation,然后使用服务票据login,而不是用户名/密码。 当你第二次运行klist时显示的是什么。