views:

113

answers:

0

I've been able to setup Kerberos authentication in Tomcat utilizing a custom Realm that extends JAASRealm and overrides 'authenticate' by following the TomcatKerberos wiki.

Got it working fine in Ubuntu but keep getting the following error when trying to set it up in Windows XP.

SEVERE: Cannot find message associated with key jaasRealm.unexpectedError java.lang.SecurityException: Unable to locate a login configuration at com.sun.security.auth.login.ConfigFile.(ConfigFile.java:93)

This login configuration property gets set in the catalina.bat using the following line:

export JAVA_OPTS="-Djava.security.krb5.realm= -Djava.security.krb5.kdc= -Djava.security.auth.login.config=$CATALINA_HOME/conf/jaas.conf"

I changed export to set, gave the absolute file path, kept the forward slashes (documentation says to use forward slash no matter what OS).

set JAVA_OPTS="-Djava.security.krb5.realm=my.realm.com -Djava.security.krb5.kdc=my.kdc.com -Djava.security.auth.login.config=C:/Apache Tomcat 6.0.26/apache-tomcat-6.0.26/conf/jaas.conf"

Is there any other thing I am forgetting that would cause this configuration to work in Linux but not Windows?