Relative path for JAAS keytab configuration

拟墨画扇 提交于 2019-12-05 00:37:09

问题


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";
};

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"

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?


回答1:


Please use keyTab="keytab" Similar to the example: http://docs.oracle.com/javase/6/docs/technotes/guides/security/jgss/lab/part1.html



来源:https://stackoverflow.com/questions/16963494/relative-path-for-jaas-keytab-configuration

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!