• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
  • Himai Minh
  • Carey Brown
  • salvin francis

Tomcat LDAP Authentication, database Authorization

Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Whatever you say buddy! And I believe this tiny ad too:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic