Kerberos 缓存票证
我使用的是 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 票证吗?
谢谢。
I am on windows 7 (64-bit) and I have created a simple app to count files in the run method of a class that implements PrivilegedAction. following is my jaas.conf file:
CountFiles { com.sun.security.auth.module.Krb5LoginModule required useTicketCache=true debug=true; };
I am getting the following message.
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
and the program throws LoginException after that, however if I execute the kinit.exe on windows command line then it is able to give me the count.
I have also setup the following registry value to 1:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters Value Name: AllowTGTSessionKey Value Type: REG_DWORD Value: 1
Can you please tell how to access the kerberos tickets cached on the system?
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我通过删除 C:\Users 下以我的用户名命名的文件夹中的 krb5cc* 文件找到了问题的答案。该文件是由 kinit.exe 创建的。
I found the answer to my question by deleting krb5cc* file in a folder with my user name under C:\Users. The file was created by kinit.exe.
我相信 klist是要走的路
I believe klist is the way to go