• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

LoginContext and Configuration problem

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
A day job? In an office? My worst nightmare! Comfort me tiny ad!
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic