问题描述
我有一个系统,其中.NET客户端使用Kerberos针对Java服务器进行身份验证.一切正常,但我正在尝试改善服务器配置.目前,在 C:\ 的根目录中需要一个 keytab 文件,因为我的 jaas.conf 如下所示:
I have a system wherein .NET clients authenticate against a Java server with Kerberos. Everything works, but I'm trying to improve the server configuration. Currently a keytab file is required in the root of C:\ because my jaas.conf looks like this:
Server {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
storeKey=true
isInitiator=false
keyTab="///C:/keytab"
principal="XXX";
};
我试图将keyTab
属性设置为相对路径,但是没有运气.我尝试过的:
I am trying to make the keyTab
property a relative path, but am having no luck. What I've tried:
-
keyTab="///keytab"
-
keyTab="///./keytab"
-
keyTab="classpath:keytab"
keyTab="///keytab"
keyTab="///./keytab"
keyTab="classpath:keytab"
所有这些都会导致异常,因此很显然找不到 keytab 文件.
All of these result in an exception, so clearly the keytab file cannot be found.
我已经搜索并阅读文档,然后将我的头撞在墙上.谁能透露出实现这一目标所需的神奇咒语?
I've searched and read the docs and banged my head on a wall over this. Can anyone reveal the magical incantation I need to make this happen?
推荐答案
请使用keyTab="keytab"
与示例类似: http://docs.oracle.com /javase/6/docs/technotes/guides/security/jgss/lab/part1.html
Please use keyTab="keytab"
Similar to the example:http://docs.oracle.com/javase/6/docs/technotes/guides/security/jgss/lab/part1.html
这篇关于JAAS keytab配置的相对路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!