You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Martin <we...@mg77.net> on 2003/04/09 13:20:14 UTC

Auth via getRemoteUser from Apache

I've seen lots of hits to exactly this problem in all sorts of archives, but
nowhere did I find a corresponding solution that actually helped. Am hoping someone
can offer a simple fix here, this shouldn't be that hard...

Running: Tomcat 4.1.24, Apache 2.0.44.

I want to call "request.getRemoteUser()", and pickup the username which Apache
authenticated via standard BASIC authentication.

If I build a test .jsp which spits out both getRemoteUser, and getHeader("Authorization"),
the first returns null, the 2nd returns the normal B64 encoded string.

Why doesn't getRemoteUser work?

I get exactly the same behaviour regardless of which connector I'm running. Have tried:
mod_proxy
mod_jk 1.2.0, 1.2.1, 1.2.2.
mod_jk2 2.0.2.

This setup works exactly as expected running Tomcat 4.1.14 with mod_jk 1.2.0.
Whats changed in the later version? What config option do I set?
"tomcatAuthentication=false" in the CoyoteConnector does nothing for me...

Any hints?

-Martin.

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


Re: Auth via getRemoteUser from Apache

Posted by Martin <we...@mg77.net>.
Never mind...I was either searching the wrong archives,
or wasn't patient enough.

Sticking this into jk2.properties gets me where I want to be:
request.tomcatAuthentication=false

...could really be more clearly documented somewhere...

-MG.

On Wed, Apr 09, 2003 at 09:20:14PM +1000, Martin wrote:
> I've seen lots of hits to exactly this problem in all sorts of archives, but
> nowhere did I find a corresponding solution that actually helped. Am hoping someone
> can offer a simple fix here, this shouldn't be that hard...
> 
> Running: Tomcat 4.1.24, Apache 2.0.44.
> 
> I want to call "request.getRemoteUser()", and pickup the username which Apache
> authenticated via standard BASIC authentication.
> 
> If I build a test .jsp which spits out both getRemoteUser, and getHeader("Authorization"),
> the first returns null, the 2nd returns the normal B64 encoded string.
> 
> Why doesn't getRemoteUser work?
> 
> I get exactly the same behaviour regardless of which connector I'm running. Have tried:
> mod_proxy
> mod_jk 1.2.0, 1.2.1, 1.2.2.
> mod_jk2 2.0.2.
> 
> This setup works exactly as expected running Tomcat 4.1.14 with mod_jk 1.2.0.
> Whats changed in the later version? What config option do I set?
> "tomcatAuthentication=false" in the CoyoteConnector does nothing for me...
> 
> Any hints?
> 
> -Martin.

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


Re: Auth via getRemoteUser from Apache

Posted by Jacob Kjome <ho...@visi.com>.
did you add the following to jk2.properties?

request.tomcatAuthentication=false

That is required to grab the authentication if you are doing the BASIC Auth 
via Apache instead of Tomcat.


Jake

At 09:20 PM 4/9/2003 +1000, you wrote:
>I've seen lots of hits to exactly this problem in all sorts of archives, but
>nowhere did I find a corresponding solution that actually helped. Am 
>hoping someone
>can offer a simple fix here, this shouldn't be that hard...
>
>Running: Tomcat 4.1.24, Apache 2.0.44.
>
>I want to call "request.getRemoteUser()", and pickup the username which Apache
>authenticated via standard BASIC authentication.
>
>If I build a test .jsp which spits out both getRemoteUser, and 
>getHeader("Authorization"),
>the first returns null, the 2nd returns the normal B64 encoded string.
>
>Why doesn't getRemoteUser work?
>
>I get exactly the same behaviour regardless of which connector I'm 
>running. Have tried:
>mod_proxy
>mod_jk 1.2.0, 1.2.1, 1.2.2.
>mod_jk2 2.0.2.
>
>This setup works exactly as expected running Tomcat 4.1.14 with mod_jk 1.2.0.
>Whats changed in the later version? What config option do I set?
>"tomcatAuthentication=false" in the CoyoteConnector does nothing for me...
>
>Any hints?
>
>-Martin.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org