Running httpd 2.4.6 on CentOS 7 as a reverse proxy for Splunk with SSO.
This works with no proxying:
RewriteCond %{LA-U:REMOTE_USER} "user" [NC]
RewriteRule ^.*$ - [F,L]
The above does NOT work with proxying. I would like to match an authenticated user via basic auth. The X-Remote-User header is being passed to Splunk (SSO debug confirms this).
I have tried using several headers like HTTP_X_REMOTE_USER but still no joy. I don't know enough to see what's going on via ProxyPass etc. Have checked trace rewrite log and enabled forensic log but nothing. Seems the variable is not known in the proxy rewrite environment and the entire block is skipped.
Is my approach wrong? Can I do this another way?
ProxyRequests Off
ProxyPreserveHost Of
ProxyPass /sh https://127.0.0.1:8000/sh
ProxyPassReverse /sh https://127.0.0.1:8000/sh
RewriteEngine On
RequestHeader set X-Remote-User %{REMOTE_USER}s
RewriteCond %{LA-U:REMOTE_USER} "user" [NC]
RewriteRule ^.*$ - [F,L]