Solved

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

Posted on 2004-09-29
7
774 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Here are the symptoms: You start receiving calls from users that one of your legacy web apps isn't coming up, so you log into your IIS 5 server to check it out.  When you pull up the services, you notice that the WWW Publishing service isn't runn…
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…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

813 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now