Solved

Retrieving authenticated user name - Tomcat 4.1.30 with IIS 5.0 using Windows Integrated Authentication

Posted on 2004-09-29
7
778 Views
Last Modified: 2007-12-19
Environment:
IIS 5.0
Tomcat 4.1.30
JK2 - isapi redirector connecting IIS to Tomcat
Windows 2000 Active Directory

Setup:
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
channelSocket.port=8009
channelSocket.address=127.0.0.1
channelSocket.maxPort=port+10
# IIS will do the WINDOWS INTEGRATED AUTHENTICATION
request.tomcatAuthentication=false

-SP
0
Comment
Question by:spanaval
  • 2
  • 2
7 Comments
 
LVL 14

Accepted Solution

by:
alimu earned 250 total points
ID: 12185959
If you are using ASP it's: Request.ServerVariables("LOGON_USER")

The only thing I could find on this http://lists.evolt.org/archive/Week-of-Mon-20040209/155375.html where someone is having a similar issue.  They were referred to the samba site: http://jcifs.samba.org/src/docs/ntlmhttpauth.html

it may be a good idea to post a minimal point question containing a url link to this one in the "Web Servers" forum - you might pickup more people with tomcat/jk2 experience and someone may have done this before.
0
 
LVL 37

Assisted Solution

by:meverest
meverest earned 250 total points
ID: 12187649
String userName = request.getRemoteUser();
0
 
LVL 14

Expert Comment

by:alimu
ID: 12551051
Hi spanaval,
Can you please provide some feedback to advise whether this resolved your problem or not?

If this is fixed up or you've found your own answer could you close off your question please?
If you're not sure how, here's the options: http://www.experts-exchange.com/help.jsp#hs5
Thanks!
AJ
0
 
LVL 37

Expert Comment

by:meverest
ID: 13359222
suggest split alimu, meverest.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Debug Tools to analyse IIS process: This article focus on taking memory dumps from IIS to determine which code is taking more time and to analyse which calls hangs/causes more CPU usage. To take dumps,download the following. Install1: To st…
Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question