wood burning stoves 2.0*
The moose likes Security and the fly likes JAAS- Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "JAAS- "No LoginModule found for ur jaas_configinfo!"" Watch "JAAS- "No LoginModule found for ur jaas_configinfo!"" New topic
Author

JAAS- "No LoginModule found for ur jaas_configinfo!"

Mrunmai Halbe
Greenhorn

Joined: Apr 24, 2006
Posts: 4
PLZ help me out...
I have implemented an authentication code using JAAS.The login form is written as .JSP and have used MySQL as database.
The problem is when I run the code I get an error "No LoginModule found for jaas_configinfo" were "jaas_configinfo" is the module written in my configuration file which is as follows...

jaas_configinfo {
com.user.jaas_rdbms.authenticate.MyLoginModule Required debug="true" url= "jdbc:mysql://localhost:3306/userinfo?user=root&password=mrunmai" driver="com.mysql.jdbc.Driver";
};



and my JSP page is accepting the username and password from user and the related code is as follows...


try {
// Get the form's username & password fields
//
LoginContext lc= null;
String user = request.getParameter("username_text");
String pass = request.getParameter("password_text");

// Using the username/password to initialize the
// callback handler and then do the authentication.
//

MyCallbackhandler mcbh= new MyCallbackhandler(user,pass);
lc = new LoginContext("jaas_configinfo", mcbh);
lc.login();
.
.
.
when it comes to the line "lc=new LoginContext("jaas_congiginfo",mcbh);"
the exception "No LoginModule found for ur jaas_configinfo!" is generated..

I am using WSAD as the app. server and passing
"-Djava.security.auth.login.config=jaas_rdbms.config" as
Java VM arguments in the Environment Options of the Web-Server.

Don't understand whats wrong with that..
Plz help me out..

Thanks in advance ,
Mrunmai
Awais Bajwa
Ranch Hand

Joined: Jan 16, 2001
Posts: 191
Mrunmai,
Where did you place your jaas configuration file? make sure that it is in the WebSphere runtime's classpath.

Regards
Awais Bajwa
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JAAS- "No LoginModule found for ur jaas_configinfo!"
 
Similar Threads
JAAS and Tomcat container managed authentication
JAAS in Jboss
invoking JAAS from EJB
Callback Handlers
JAAS login servlet