Hi all,

when trying to perfom a JAAS authentification from within servlets I
get the attached error message. Funny enough the same code works with
Tomcat 3.2.x but not with Tomcat 4.0! The code snippet I use for the 
authentification is:


/* set the path to the jaas configuration files */
System.setProperty("java.security.auth.login.config", jaasConfigFile);

[...]

LoginContext lc = null;
try {

lc = new LoginContext("sampleJAAS", new MyCallBackHandler());

} catch (LoginException le) {
le.printStackTrace();
/* ... auth failed */
} catch (SecurityException se) {
se.printStackTrace();
/* ... auth failed */

} 

As mentioned before the same code works with Tomcat 3.2.x and when used
standalone. The path to the config file is correct (I even put it in 
different locations within the classpath and working directories). I am 
not using a security manager. I use a simple NT login module, however it 
is never invoked (the exception is raised before). All other parts of the
application is working quite fine. Am I doing something?

Any help will be greatly appreciated.

Kind regards,
Markus Kerber

------------------------------


java.lang.SecurityException: unable to instantiate LoginConfiguration
at javax.security.auth.login.Configuration.getConfiguration(Configuration.java:212)
at javax.security.auth.login.LoginContext$1.run(LoginContext.java:166)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.init(LoginContext.java:163)
at javax.security.auth.login.LoginContext.(LoginContext.java:319)
at mycode.util.LoginHandler.authenticate(LoginHandlerStatup.java:40)
[...]

_______________________________________________________________________
1.000.000 DM gewinnen - kostenlos tippen - http://millionenklick.web.de
[EMAIL PROTECTED], 8MB Speicher, Verschluesselung - http://freemail.web.de


Reply via email to