I am attempting to get a web application, running in Tomcat 6, to authorize a user that was authenticated by Apache.
I have configured Apache 2.4 to use Active Directory for user authentication (using a module from Centrify) and ProxyPass / ProxyPassReverse requests to Tomcat.
Now I am trying to figure out how to use those credentials in an application. Taking the Tomcat 6 manager app as an example, how do I go about changing it to recognize the authenticated user and check for a suitable role?
I'm assuming I have to change the Realm in server.xml, probably to JNDIRealm or JAASRealm, however, the documentation talks about a realm being 'a "database" or usernames and passwords.' Is that the right way to go?
I'm also assuming that I need to change login-config in web.xml, although I've no idea what values to use yet.
If someone could steer me in the right direction or suggest other avenues to explore, I would appreciate that.
BTW, I am also looking at trying to authenticate the user directly in Tomcat but was asked to look at the Apache proxy route for preference.