DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12196>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12196

request.getRemoteUser() returns null for AJP request with remote username

           Summary: request.getRemoteUser() returns null for AJP request
                    with remote username
           Product: Tomcat 4
           Version: 4.1.9
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Connector:Coyote JK 2
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


In Tomcat 4.1.9beta, request.getRemoteUser() no longer returns the remoteUser 
provided via AJP.

Setup:
    Sun JDK 1.3.1
    Tomcat 4.1.9
    mod_jk
    Microsoft IIS
    Win2K

I added a line

    request.org.apache.jk.common.HandlerRequest.tomcatAuthentication = false 

to my conf/jk2.properties file, but although this does set the
tomcatAuthentication property on HandlerRequest, the remote user is
not propagated to the HttpServletRequest that the servlet eventually
receives.

The discontinuity turned out to be in
org.apache.coyote.tomcat4.CoyoteRequest where getRemoteUser is
returning the userPrincipal property, which has not been set. I
modified my getRemoteUser to return
coyoteRequest.getRemoteUser().toString() and this fixed my problem,
but perhaps there is a better fix, perhaps making a modification in
CoyoteAdapter.postParseRequest?

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to