| Author |
Jaas configuration for weblogic 9
|
suchu sanghi
Greenhorn
Joined: Nov 19, 2006
Posts: 10
|
|
hi all, i am using weblogic 9 and i have my own security filter. i get an error : java.lang.IllegalArgumentException: No Configuration was registered that can handle the configuration named RDBMSPasswordLoginModule where RDBMSPasswordLoginModule is defined in jaas.config file. Can anyone help me out with this issue?
|
 |
Rahul Bhattacharjee
Ranch Hand
Joined: Nov 29, 2005
Posts: 2300
|
|
I have not tried with jass in weblogic. But here are few things to check. * Is the java.security file configured properly with the path of your jaas.config file or check the start up files for weblogic , which might be setting this location of the jaas.config using JVM parameters. * If's its looking for the correct jaas.config file , then try for whether the mentioned loginmodule is available to the application. * If you are running with the security manager , then make sure that your loginmodule is having the right permissions.Use policy file for granting the required permissions.
|
Rahul Bhattacharjee
LinkedIn - Blog
|
 |
suchu sanghi
Greenhorn
Joined: Nov 19, 2006
Posts: 10
|
|
rahul, how do i configure my java.security file?
|
 |
Rahul Bhattacharjee
Ranch Hand
Joined: Nov 29, 2005
Posts: 2300
|
|
I am not an expert in this part , but stil giving my best shot.Would be better if some expert give comments on this issue. * Check out the jdk that your app server is using (by using env variable JAVA_HOME) * edit java.security file located at $JAVA_HOME\jre\lib\security\java.security using policytool (it comes with jdk) The following link might be useful JAAS
|
 |
Rahul Bhattacharjee
Ranch Hand
Joined: Nov 29, 2005
Posts: 2300
|
|
|
One more thing.Instead of changing right at the java.security , it would be better if you set location of jaas login configuration using the jvm parameters.
|
 |
Sean Sell
Greenhorn
Joined: Dec 12, 2006
Posts: 8
|
|
I'm having the same problem. I'm using the JRocket JVM. I have added the following to the end of the java.security file: login.config.url.1=file:${java.home}/jre/lib/security/sean_jaas.config and the following is my sean_jaas.config: myrealm { weblogic.security.auth.login.UsernamePasswordLoginModule required debug=false; }; yet I get the error: No Configuration was registered that can handle the configuration named myrealm Did you get yours to work?
|
 |
Rahul Bhattacharjee
Ranch Hand
Joined: Nov 29, 2005
Posts: 2300
|
|
Hi Sean, I do not see any reason for it to not work.Everything seems to be OK. Just for a quick check.If you are having more than 1 JDK installed , then look whether you are configuring the correct java.security file.
|
 |
Sean Sell
Greenhorn
Joined: Dec 12, 2006
Posts: 8
|
|
I found on the dev2dev.bea.com forum a note that Weblogic 9.2 (I'm assuming they mean JRocket) no longer supports the entry in the java.security file. That the authorization config must be specified on as an argument. I added: -Djava.security.auth.login.config=%WL_HOME%\server\lib\sean_jaas.config to my server startup startWebLogic.cmd and I no longer am getting the Exception. I can't seem to log in but at least the exception is gone. P.S. I didn't try to run the example but 9.2 still ships with an example that does it the old way. here's a link to the referenced forum note: http://forums.bea.com/bea/message.jspa?messageID=600046552&tstart=0 --Sean [ December 13, 2006: Message edited by: Sean Sell ]
|
 |
Rahul Bhattacharjee
Ranch Hand
Joined: Nov 29, 2005
Posts: 2300
|
|
I have seen the link that you have sent ,Weblogic 9.2 now really doesn't do it in that way. But this still leaves me with a question as how can one go ahead to make something out of the jvm security specification and I do not see any harm in configuring the login.config in java.security property file.
|
 |
Sean Sell
Greenhorn
Joined: Dec 12, 2006
Posts: 8
|
|
Originally posted by Rahul Bhattacharjee: I have seen the link that you have sent ,Weblogic 9.2 now really doesn't do it in that way.
In which way? It does appear to require the -D... if you are using JRocket JVM (I removed the java.security entry to make sure that wasn't playing a part.)
Originally posted by Rahul Bhattacharjee: But this still leaves me with a question as how can one go ahead to make something out of the jvm security specification and I do not see any harm in configuring the login.config in java.security property file.
I think you meant "take something out," I agree, I can understand the need for more options but to make the standard way not work seems dumb. --Sean
|
 |
ansh watane
Greenhorn
Joined: Nov 16, 2011
Posts: 4
|
|
Hi Rahul,
Same scinerio I have for Jaas.config configuration file.I have updated java.security file with "login.config.url.1=file:C:/SampleJaas Source/SimpleJAAS.config:.
I am usinf Tomcat6.0 server on Eclipse.I have implemented LoginModule,CallbackHander,principle and client class which has LoginContext code .
All these implemented classes are available in Web project/src.Now I have to execute my code thru Eclipse .But it couldn't find reference of jaas.config file.
Getting error "Security error creating LoginContext. Unable to locate a login configuration".
Is it possible to run sample code thru eclipse?
Do i have to statrt Tomcat server and configure anything there??
Please guide me .
Thanks.
|
 |
 |
|
|
subject: Jaas configuration for weblogic 9
|
|
|