httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chudamani Padhan <pchudamani...@gmail.com>
Subject [users@httpd] Re: REMOTE_USER is not available at the time of external function call in httpd RewriteMap
Date Mon, 01 Oct 2018 16:42:57 GMT
Got one solution to set basic authorization header for REMOTE_USER using
AuthBasicFake (as I was mainly looking for User, not password).

<Location /*>
AuthBasicFake %{REMOTE_USER}
</Location>

Thanks,
Chudamani

On Thu, Sep 20, 2018 at 5:11 PM Chudamani Padhan <pchudamani006@gmail.com>
wrote:

> Hi,
> I am trying to set HTTP basic auth header for an user which is already
> authenticated by external application. For doing that, we have to set
> base64 encoded of "username:dummy"  where password is any dummy value.  In
> ssl config, REMOTE_USER is getting captured properly in RequestHeader(Line
> 5) but not in RewriteRule (Line 3).  In line 3, I tried with REMOTE_USER,
> LA-U:REMOTE_USER, HTTP:REMOTE_USER. But all these variables are null. Am I
> missing any config here?
>
>
> ssl.conf
>
> Line 1- RewriteEngine on
> Line 2- RewriteMap base64map "prg:/opt/scripts/base64.pl"
> Line 3- RewriteRule .* -
> [E=AUTHN:${base64map:%{LA-U:REMOTE_USER}:%{LA-U:REMOTE_USER}},NE]
> Line 4- RequestHeader set Authorization "Basic %{AUTHN}e"
>
> Line 5- RequestHeader set X-Remote-User2 %{REMOTE_USER}s
>
> Thanks,
> Chudamani
>

Mime
View raw message