Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Relative path for JAAS keytab configuration

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?

like image 321
Kent Boogaart Avatar asked Jun 06 '13 13:06

Kent Boogaart


People also ask

Where do I put the JAAS config file?

If you are using JAAS rather than using a Kerberos ticket, you need to create a JAAS configuration file. The default location for this file is $USER_HOME /. java.


1 Answers

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

like image 147
Michael Avatar answered Oct 04 '22 00:10

Michael