Solved

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

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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

First of all, clustering IIS is something you should rarely consider doing. In almost all cases, Microsoft Network Load Balancing (NLB) (http://technet.microsoft.com/en-us/library/cc758834(WS.10).aspx) is a much better solution when you need to p…
Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

920 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

17 Experts available now in Live!

Get 1:1 Help Now