You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Thomas Peter <ht...@braindumped.com> on 2015/01/18 17:29:50 UTC

[users@httpd] httpd reverse proxy pass username per http_header

Hi,

I'm trying to put httpd as reverse-proxy in front of a third party java 
application (running in tomcat) to handle authentication in httpd.
The thirdparty app claims to be able to accept the user (that is 
authenticated before it hits the app) via http header (I can configure 
the http variable where the username is stored.)

Is it possible to pass the username via http_header using httpd?
Out of the box I only found authorization which is base64 encoded 
username:password

Thanks!

KR
Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] httpd reverse proxy pass username per http_header

Posted by Thomas Peter <ht...@braindumped.com>.
Hi,

I just found

http://serverfault.com/questions/207301/get-the-authenticated-user-under-apache

which suggests:

     RewriteEngine On
     RewriteCond %{LA-U:REMOTE_USER} (.+)
     RewriteRule . - [E=RU:%1]
     RequestHeader set X-Remote-User "%{RU}e" env=RU

And that exactly does the trick.

KR
Thomas



On 2015-01-18 17:29, Thomas Peter wrote:
> Hi,
> 
> I'm trying to put httpd as reverse-proxy in front of a third party
> java application (running in tomcat) to handle authentication in
> httpd.
> The thirdparty app claims to be able to accept the user (that is
> authenticated before it hits the app) via http header (I can configure
> the http variable where the username is stored.)
> 
> Is it possible to pass the username via http_header using httpd?
> Out of the box I only found authorization which is base64 encoded
> username:password
> 
> Thanks!
> 
> KR
> Thomas
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org