You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Balakrishna Kudaravalli <bk...@cisco.com> on 2003/05/08 02:35:28 UTC

Re: Apache 2.0.45 + mod_jk2-2.0.2 + TC 4.1.24 losing remoteUser?

Hi,

When Apache does the basic auth, will it pass the http_authorization header 
to tomcat at all? Or does it require any specific configuration setting?

Thanks,
Bala



At 08:52 AM 4/29/2003 -0600, Tim Shadel wrote:
>For anyone interested, this turned out to be a simple error in Apache 
>configuration.  The "/Admin/" was protected, but "/Admin/*" was not. Hence 
>Apache sent the authentication information for /Admin/index.jsp but 
>nothing else.  Fixing the Apache config sent the right info.
>
>Tim
>
>>Subject:
>>Apache 2.0.45 + mod_jk2-2.0.2 + TC 4.1.24 losing remoteUser?
>>From:
>>Tim Shadel <ti...@zserve.com>
>>Date:
>>Mon, 28 Apr 2003 16:02:13 -0600
>>To:
>>Tomcat Users List <to...@jakarta.apache.org>
>>
>>I've got mod_jk2-2.0.2 running on a Linux box, with Apache 2.0.45 and 
>>Tomcat 4.1.24.  I can browse around just fine, and even see the 
>>/jkstatus.  I need to use BASIC authentication, so I've added 
>>"request.tomcatAuthentication=false" to my jk2.properties.  I've go 
>>vhosts configured on Apache, and have the .htpasswd file setup.
>>When I request http://web4/Admin/ I get a BASIC auth dialog box in 
>>Mozilla, as expected.  The page renders the frames (yeah, I know the 
>>stink).  However, the request.getRemoteUser() call in one frame returns null.
>>I open the RequestValve, and see that the first request DOES pass the 
>>remoteUser, but the others do not.  The code works perfectly under Apache 
>>1.3.x + mod_jk-1.2.2 + coyote + Tomcat 4.1.18.
>>What could cause the JK2 connector to no longer send the remoteUser after 
>>the first request???
>>Any help would be appreciated.
>>TIA,
>>Tim
>>
>>=========================================================================
>>
>>RequestDumperValve[Standalone]: REQUEST URI       =/Admin/index.jsp
>>RequestDumperValve[Standalone]:           authType=null
>>RequestDumperValve[Standalone]:  characterEncoding=null
>>RequestDumperValve[Standalone]:      contentLength=0
>>RequestDumperValve[Standalone]:        contentType=null
>>RequestDumperValve[Standalone]:        contextPath=
>>RequestDumperValve[Standalone]:             header=host=web4
>><snip/>
>>RequestDumperValve[Standalone]:             method=GET
>>RequestDumperValve[Standalone]:           pathInfo=null
>>RequestDumperValve[Standalone]:           protocol=HTTP/1.1
>>RequestDumperValve[Standalone]:        queryString=null
>>RequestDumperValve[Standalone]:         remoteAddr=192.168.2.35
>>RequestDumperValve[Standalone]:         remoteHost=192.168.2.35
>>RequestDumperValve[Standalone]:         remoteUser=tim
>>RequestDumperValve[Standalone]: requestedSessionId=null
>>RequestDumperValve[Standalone]:             scheme=https
>>RequestDumperValve[Standalone]:         serverName=web4
>>RequestDumperValve[Standalone]:         serverPort=443
>>RequestDumperValve[Standalone]:        servletPath=null
>>RequestDumperValve[Standalone]:           isSecure=true
>>RequestDumperValve[Standalone]: 
>>---------------------------------------------------------------
>>2003-04-28 15:47:14 RequestDumperValve[Standalone]: 
>>---------------------------------------------------------------
>>RequestDumperValve[Standalone]:           authType=null
>>RequestDumperValve[Standalone]:      contentLength=-1
>><snip/>
>>RequestDumperValve[Standalone]:            message=null
>>RequestDumperValve[Standalone]:         remoteUser=tim
>>RequestDumperValve[Standalone]:             status=200
>>RequestDumperValve[Standalone]: 
>>===============================================================
>>
>>
>>The following URIs share the same relevant response info:
>>
>>RequestDumperValve[Standalone]: REQUEST URI       =/Admin/Nav.ldsso
>>RequestDumperValve[Standalone]: REQUEST URI       =/Admin/blank.jsp
>>RequestDumperValve[Standalone]: REQUEST URI       =/Admin/blank.jsp
>>
>>RequestDumperValve[Standalone]:         remoteAddr=192.168.2.35
>>RequestDumperValve[Standalone]:         remoteHost=192.168.2.35
>>RequestDumperValve[Standalone]:         remoteUser=null
>>RequestDumperValve[Standalone]:             status=200
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Apache 2.0.45 + mod_jk2-2.0.2 + TC 4.1.24 losing remoteUser?

Posted by Bill Barker <wb...@wilshire.com>.
It will pass it if you set the 'tomcatAuthentication="false"' attribute on
the Connector.  Otherwise, Tomcat will attempt to re-authenticate the user.
With the "false" setting, Tomcat will assume that the user has already been
authenticated before the request was handed to Tomcat.

In either case, the Basic authorization headers are available to the
Servlet.

"Balakrishna Kudaravalli" <bk...@cisco.com> wrote in message
news:4.3.2.7.2.20030507173335.00b33b40@wells.cisco.com...
> Hi,
>
> When Apache does the basic auth, will it pass the http_authorization
header
> to tomcat at all? Or does it require any specific configuration setting?
>
> Thanks,
> Bala
>
>
>
> At 08:52 AM 4/29/2003 -0600, Tim Shadel wrote:
> >For anyone interested, this turned out to be a simple error in Apache
> >configuration.  The "/Admin/" was protected, but "/Admin/*" was not.
Hence
> >Apache sent the authentication information for /Admin/index.jsp but
> >nothing else.  Fixing the Apache config sent the right info.
> >
> >Tim
> >
> >>Subject:
> >>Apache 2.0.45 + mod_jk2-2.0.2 + TC 4.1.24 losing remoteUser?
> >>From:
> >>Tim Shadel <ti...@zserve.com>
> >>Date:
> >>Mon, 28 Apr 2003 16:02:13 -0600
> >>To:
> >>Tomcat Users List <to...@jakarta.apache.org>
> >>
> >>I've got mod_jk2-2.0.2 running on a Linux box, with Apache 2.0.45 and
> >>Tomcat 4.1.24.  I can browse around just fine, and even see the
> >>/jkstatus.  I need to use BASIC authentication, so I've added
> >>"request.tomcatAuthentication=false" to my jk2.properties.  I've go
> >>vhosts configured on Apache, and have the .htpasswd file setup.
> >>When I request http://web4/Admin/ I get a BASIC auth dialog box in
> >>Mozilla, as expected.  The page renders the frames (yeah, I know the
> >>stink).  However, the request.getRemoteUser() call in one frame returns
null.
> >>I open the RequestValve, and see that the first request DOES pass the
> >>remoteUser, but the others do not.  The code works perfectly under
Apache
> >>1.3.x + mod_jk-1.2.2 + coyote + Tomcat 4.1.18.
> >>What could cause the JK2 connector to no longer send the remoteUser
after
> >>the first request???
> >>Any help would be appreciated.
> >>TIA,
> >>Tim
> >>
>
>>=========================================================================
> >>
> >>RequestDumperValve[Standalone]: REQUEST URI       =/Admin/index.jsp
> >>RequestDumperValve[Standalone]:           authType=null
> >>RequestDumperValve[Standalone]:  characterEncoding=null
> >>RequestDumperValve[Standalone]:      contentLength=0
> >>RequestDumperValve[Standalone]:        contentType=null
> >>RequestDumperValve[Standalone]:        contextPath=
> >>RequestDumperValve[Standalone]:             header=host=web4
> >><snip/>
> >>RequestDumperValve[Standalone]:             method=GET
> >>RequestDumperValve[Standalone]:           pathInfo=null
> >>RequestDumperValve[Standalone]:           protocol=HTTP/1.1
> >>RequestDumperValve[Standalone]:        queryString=null
> >>RequestDumperValve[Standalone]:         remoteAddr=192.168.2.35
> >>RequestDumperValve[Standalone]:         remoteHost=192.168.2.35
> >>RequestDumperValve[Standalone]:         remoteUser=tim
> >>RequestDumperValve[Standalone]: requestedSessionId=null
> >>RequestDumperValve[Standalone]:             scheme=https
> >>RequestDumperValve[Standalone]:         serverName=web4
> >>RequestDumperValve[Standalone]:         serverPort=443
> >>RequestDumperValve[Standalone]:        servletPath=null
> >>RequestDumperValve[Standalone]:           isSecure=true
> >>RequestDumperValve[Standalone]:
> >>---------------------------------------------------------------
> >>2003-04-28 15:47:14 RequestDumperValve[Standalone]:
> >>---------------------------------------------------------------
> >>RequestDumperValve[Standalone]:           authType=null
> >>RequestDumperValve[Standalone]:      contentLength=-1
> >><snip/>
> >>RequestDumperValve[Standalone]:            message=null
> >>RequestDumperValve[Standalone]:         remoteUser=tim
> >>RequestDumperValve[Standalone]:             status=200
> >>RequestDumperValve[Standalone]:
> >>===============================================================
> >>
> >>
> >>The following URIs share the same relevant response info:
> >>
> >>RequestDumperValve[Standalone]: REQUEST URI       =/Admin/Nav.ldsso
> >>RequestDumperValve[Standalone]: REQUEST URI       =/Admin/blank.jsp
> >>RequestDumperValve[Standalone]: REQUEST URI       =/Admin/blank.jsp
> >>
> >>RequestDumperValve[Standalone]:         remoteAddr=192.168.2.35
> >>RequestDumperValve[Standalone]:         remoteHost=192.168.2.35
> >>RequestDumperValve[Standalone]:         remoteUser=null
> >>RequestDumperValve[Standalone]:             status=200
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org