Retrieving authenticated user name - Tomcat 4.1.30 with IIS 5.0 using Windows Integrated Authentication
Posted on 2004-09-29
JK2 - isapi redirector connecting IIS to Tomcat
Windows 2000 Active Directory
IIS is setup with virtual directories to access the examples JSP and servlets. The virtual directory is setup to have WINDOWS INTEGRATED AUTHENTICATION.
The user requests go to the IIS server, IIS server authenticates the user against the Active Directory and routes the request to tomcat using the JK2 isapi dll.
What is working, is that I am able to access and run the example JSPs and servlets going through IIS without any problems. I have also tested out the authentication from different domains and it is working correctly.
The problem: I need to get a handle to the "user" that logged in (the user who went through authentication and is accessing the application). I have printed out all the header elements in the request and do not see an entry of the logged in user. I have tried setting "request.tomcatAuthentication=false" in the jk2.properties files and that did not make any difference.
Question: How do I get the authenticated user from the request in Tomcat? Are there some specific defn. I need to set in jk2.properties file to make the logged in user id visible in Tomcat? Any help would be much appreciated.
My jk2.properties file is given below
# socket config
# IIS will do the WINDOWS INTEGRATED AUTHENTICATION