Questions:
- Is there a concept of user and role that is common to servlet containers?
- If so, is there an agnostic way to access these users and roles?
- If not, is there a way to access Tomcat Realm users and roles?
Story:
I would either get all the users and their roles from the context of the Java Webapp (servlet container), or, even better, directly request the users and their roles.
I see that there are projects like Apache Directory that allow you to do this for LDAP if you know the connection string. However, I want to be an agnostic for technology serving users and roles.
In particular, I'm on Tomcat and in the simplest scenario I want to access users and roles in a) tomcat-users.xmlb) any other configured Realmin the context. However, I'm really looking for a solution that is not specific to Tomcat, but that Realms.
source
share