Two Laptop Bag*
The moose likes Security and the fly likes ~LoginException:  No LoginModules configured 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 "~LoginException:  No LoginModules configured" Watch "~LoginException:  No LoginModules configured" New topic
Author

~LoginException: No LoginModules configured

Andrea Modica
Greenhorn

Joined: Mar 09, 2007
Posts: 6
Hi
I receive this error
javax.security.auth.login.LoginException: No LoginModules configured

when I call LogincContext class from a JSP even if I put the following line in my java.security file

login.config.url.1=file:${java.home}/lib/security/config.pd

here the content of config.pd file

pd-debug {
com.tivoli.pd.jazn.PDLoginModule required debug=true;
};
pd {
com.tivoli.pd.jazn.PDLoginModule required;
};
pd-nopass {
com.tivoli.pd.jazn.PDLoginModule required nameOnly=false;
};

Any idea?
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
Originally posted by Andrea Modica:
Hi
I receive this error
javax.security.auth.login.LoginException: No LoginModules configured

when I call LogincContext class from a JSP even if I put the following line in my java.security file

login.config.url.1=file:${java.home}/lib/security/config.pd

here the content of config.pd file

pd-debug {
com.tivoli.pd.jazn.PDLoginModule required debug=true;
};
pd {
com.tivoli.pd.jazn.PDLoginModule required;
};
pd-nopass {
com.tivoli.pd.jazn.PDLoginModule required nameOnly=false;
};

Any idea?


Your config.pd seems to be ok.
Can you post the java code.
It should be something like below

LoginContext lc = new LoginContext("pd"); // or pd might be something else from the configuration
lc.login(..);


Rahul Bhattacharjee
LinkedIn - Blog
Andrea Modica
Greenhorn

Joined: Mar 09, 2007
Posts: 6
Thanks
but I solved the problem configuring the stanza PD login directly on WebSphere admin console.
Behzad Salami
Greenhorn

Joined: Aug 03, 2011
Posts: 1
Hi, could you please tell us how you configured the PD Stanza ? I'm having the same issue and my config.pd looks identical.
Also I have created the jaas.policy, modified java.policy and java.security and nothing seems to be working.

 
 
subject: ~LoginException: No LoginModules configured
 
Similar Threads
Login Exception when using JDBC Realm (Glassfish V3.1 + IceFaces 2 + MySQL)
No LoginModules configured
Jaas + Tomcat 6 + Multiple modules
webspehere security setting
looking for a simple configuration file (JAAS)