如何手动测试 tomcat SSO 的 kerberos SPI
我正在尝试调试在 Centos5.5 上的 tomcat6 上运行的 spring-security-kerberos Web 应用程序 并在我在 Windows 2008 AD 上生成的密钥表中有一个服务主体。我想在 tomcat 之外测试密钥以帮助隔离问题(Spring 不会对密钥进行细化)
我可以使用 ktutil
程序列出密钥并在表中查看主体,但无法验证它确实有效。
I'm trying to debug my spring-security-kerberos web app that runs on tomcat6 on Centos5.5
and have a service principal in a keytab that i generated on a windows 2008 AD. I would like to test the keys outside of tomcat to help isolate the problem (Spring does not fine the keys)
i can list the keys with the ktutil
program and see the principal in in the table but cant verify that it actually works.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我翻阅旧问题时偶然发现了这个问题。所以您已经使用 kutil 列出了密钥。要验证 Kerberos 密钥表文件中的主体是否确实有效,您可以运行以下命令:
kinit -k -t
。例如,如果您的 SPN 为 HTTP/somehost.mydomain.com 且密钥表文件名为 myfilename.keytab,则您的命令将为:
kinit -k -t myfilename.keytab HTTP/somehost.mydomain.com
这是完全在 Tomcat 之外进行的简单 Kerberos 测试(满足您的要求),并验证您的 DNS、AD、krb5.conf 和 keytab(包括内部原理)是否全部设置正确。
I was flipping through old questions and stumbled across this one. So you've already listed the keys with kutil. To verify that the principal inside the Kerberos key table file actually works, you can run this command:
kinit -k -t <key table file name> <SPN>
.For instance, if you have an SPN of HTTP/somehost.mydomain.com and a key table file name of myfilename.keytab, your command will be:
kinit -k -t myfilename.keytab HTTP/somehost.mydomain.com
This is a simple Kerberos test fully outside of Tomcat (which meets your requirement), and verifies that your DNS, AD, krb5.conf, and keytab (including principle inside) are all set up correctly.