File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Tomcat LDAP Authentication, database Authorization 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 » Products » Tomcat
Bookmark "Tomcat LDAP Authentication, database Authorization" Watch "Tomcat LDAP Authentication, database Authorization" New topic
Author

Tomcat LDAP Authentication, database Authorization

Didier Varon
Greenhorn

Joined: Jul 14, 2005
Posts: 23
Hello all,

First of all my apologies if my issue has already answered, but I haven't been able to find an answer.

I need to authenticate users from a LDAP server (I already did this using JNDI realm) and load roles from a sql server database, the problem that I am having is that roles on the ActionMapping class are set when the context is loaded and they are null since LDAP does not have the roles, so if I do HttpServletRequest.isUserInRole(), that call returns false. I was thinking on extending the JNDI realm, but I've got the feeling that's no the right path, I am looking into using JAAS realm and write a custom login that will call the JNDI class and write a custom getRoles that will call the db and do a load of the roles table, but I not sure if that is feasible.

Any input will be highly appreciated.

Thanks in advance and happy New Year 2008.
 
wood burning stoves
 
subject: Tomcat LDAP Authentication, database Authorization
 
Similar Threads
LDAP
Capturing JSF Session variables.
ldap jndi mapping
best practice for authentication and role assignation.
Attribute type/schema of LDAP Attribute