• Post Reply Bookmark Topic Watch Topic
  • New Topic

LoginContext and Configuration problem

Lavanya gop
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Jdk1.3 and weblogic 6.1
1.I am creating new LoginContext("Test").javax.security.auth.login.LoginContext;
I have a class SecurityConfiguration subclassed from Configuration class.
I have made an entry for SecurityConfiguration line in java.security file as login.configuration.provider=com.webct.platform.framework.security.authentication.SecurityConfiguration
I have jaas.jar in jdk131/jre/lib/ext directory
When I create new LoginContext("Test") from a standalone application, it does work fine, it picks up the Configuration information from SecurityConfiguration file.
But the following error occurs, when I access through a jsp, which calls an ActionServlet, which inturn calls .java files, which
tries to create new LoginContext("Test").
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.<init>(LoginContext.java:223)
at com.webct.platform.framework.security.authentication.AuthenticationLogic.getLoginContext(AuthenticationLogic.
Any help is highly appreciated
Thanks in advance
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to edit the security policy file of your web server instance to allow your code to access the needed APIs.
If your web server is an intranet, you might as well skip the complex configuration process and grant all to any class.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!