Solved

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

Posted on 2004-09-29
7
784 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Logparser is the smartest tool I have ever used in parsing IIS log files and there are many interesting things I wanted to share with everyone one of the  real-world  scenario from my current project. Let's get started with  scenario - How do w…
A phishing scam that claims a recipient’s credit card details have been “suspended” is the latest trend in spoof emails.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

707 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