Java Kerberos缓存票证

Java Kerberos缓存票证,java,kerberos,jaas,Java,Kerberos,Jaas,我在Windows7(64位)上,我创建了一个简单的应用程序来计算实现PrivilegedAction的类的run方法中的文件数。以下是我的jaas.conf文件: CountFiles { com.sun.security.auth.module.Krb5LoginModule required useTicketCache=true debug=true; }; 计数文件{ 需要com.sun.security.auth.module.Krb5LoginModule

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

CountFiles { com.sun.security.auth.module.Krb5LoginModule required useTicketCache=true debug=true; }; 计数文件{ 需要com.sun.security.auth.module.Krb5LoginModule 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 Debug为true storeKey为false useTicketCache为true useTicketCache为false doNotPrompt为false ticketCache为null isInitiator为true KeyTab为null refreshKrb5Config为false principal为null tryFirstPass为false useFirstPass为false storePass为false clearPass为false 从缓存中获取TGT 凭据不再有效 主体为空 来自票证缓存的空凭据 然后程序抛出LoginException,但是如果我在windows命令行上执行kinit.exe,那么它就可以给我计数

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

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters Value Name: AllowTGTSessionKey Value Type: REG_DWORD Value: 1 HKEY\U LOCAL\U MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters 值名称:AllowTgSessionKey 值类型:REG_DWORD 价值:1 您能告诉我如何访问系统上缓存的kerberos票证吗


谢谢。

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

您是说我应该进行kilst清除吗?我尝试了klist purge并再次运行该程序,但没有成功。Windows 2008 server上也存在同样的问题