Kerberos缓存票证

时间:2011-11-07 14:20:16

标签: java kerberos jaas

我在Windows 7(64位)上创建了一个简单的应用程序来计算实现PrivilegedAction的类的run方法中的文件。以下是我的jaas.conf文件:

CountFiles {
    com.sun.security.auth.module.Krb5LoginModule required 
    useTicketCache=true
    debug=true;
};

我收到以下消息。

Debug is  true storeKey false useTicketCache true useKeyTab false doNotPrompt false ticketCache is null isInitiator true KeyTab is null refreshKrb5Config is false principal is null tryFirstPass is false useFirstPass is false storePass is false clearPass is false
Acquire TGT from Cache
Credentials are no longer valid
Principal is null
null credentials from Ticket Cache

然后程序抛出LoginException,但是如果我在Windows命令行上执行kinit.exe那么它就可以给我计数了。

我还将以下注册表值设置为1:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters
Value Name: AllowTGTSessionKey
Value Type: REG_DWORD
Value: 1

您能否告诉我如何访问系统上缓存的kerberos门票?

谢谢。

2 个答案:

答案 0 :(得分:5)

我在C:\ Users下用我的用户名删除了krb5cc *文件,找到了我的问题的答案。该文件由kinit.exe创建。

答案 1 :(得分:0)

相关问题