alternative to set "java.security.auth.login.config" ?
In all examples of using JASS, it uses the following way.
System.setProperty("java.security.auth.login.config", fileName)
Is there a way I can specify the policies in code, not in a file? That way I don't have to worry about file permissions.
p.s. Thanks for Seema-1 who anwsered my last question.
Message was edited by:
maqiang9111
Found it, I now use:URL url = MyClassName.class.getClassLoader().getResource("auth.conf");System.setProperty("java.security.auth.login.config", url.toExternalForm());auth.conf is placed in src/main/resources that maven will place in root of the jar file for me.
Has anyone done the same thing for the java.security.krb5.conf setting? I tried setting it using the same form of URL that I use for java.security.auth.login.config, and I get this error when the kerberos code attempts to use it:
Could not load configuration file jar:file:\C:\dev\workspace\myapp\client-data.jar!\krb5.ini (The filename, directory name, or volume label syntax is incorrect)
The corresponding login context conf file in the same jar loads fine.