We use LDAP to authenticate and authorize users on a tomcat server, but now need to remove the passwords from LDAP and switch over to kerberos authentication.
Now we would like to authenticate the users using kerberos (works already fine) and on success, retrieve the assigned roles for the logged in user from the LDAP DB.
My naive hope would be to use e.g. a simple self made realm and/or WSDLs security-constrain/-roles mechanisms to a) authenticate using the JAAS realm and on success b) pass over to the JNDI realm to retrieve the roles from the LDAP DB for the authenticated user.
I could find many fragments for some of the needed steps (retrieve roles, simple home made realms, …), but no easy to follow example and I'm still not sure if this approach is appropriate at all (especially since I'm pretty new to this topic(s)!).
SpnegoAuthenticatorandActiveDirectoryRealm. I do plan to release that as open source on sf.net. - Michael-O