Questions:
- Is there a concept of user & role that is general to Servlet Containers?
- If so, is there a container agnostic way to access those users and roles?
- If not, is there a way to access Tomcat Realm users & roles?
Background:
I would like to either get all users and their roles from the Java webapp context (Servlet Container) or, better yet, query the users and their roles directly.
I see that there are projects like Apache Directory which let you do this for LDAP if you know the connection string. However, I want to be agnostic to the technology serving up the users and roles.
Specifically, I'm on Tomcat and in the simplest scenario want to access the users & roles in a) tomcat-users.xml
b) any other configured Realm
in the context. However, I am really looking for a solution which isn't specific to Tomcat and it's Realms
.