No matter where I put %{REMOTE_USER}, I got NULL. Can you please tell me how I can configure NTLM Apache in order to get REMOTE_USER ?
RewriteEngine On
#RewriteCond %{LA-U:REMOTE_USER} (.+)
#RewriteRule . - [E=RU:%1]
#RequestHeader set X-Remote-User "%{RU}e" env=RU
#RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization},L]
RewriteRule . - [E=RU:%{LA-U:REMOTE_USER}]
RequestHeader set REMOTE_USER %{RU}e
ProxyPass "xxxx"
ProxyPassReverse "xxxxx"
AuthType NTLM
AuthName xxxxxxxxx
PythonAuthenHandler pyntlm
PythonOption Domain xxxxxxxxx
PythonOption BDC xxxxxxxxxxx
PythonOption PDC xxxxxxxxxxxxx
RequestHeader set REMOTE_USER %{REMOTE_USER}s
SetEnv proxy-chain-auth On
ProxyPassInterpolateEnv On
Header set Access-Control-Allow-Credentials "true"
Header set Access-Control-Allow-Headers "origin, authorization, accept, X- Requested-With, Content-Type, Content-Length"
EDIT: I even tried to hard code the RequestHeader but still does not work;
RequestHeader set X-Forwarded-User 'toto'
RequestHeader set REMOTE_USER 'toto'
RequestHeader set X-REMOTE-USER 'toto'
RequestHeader set X-Forwarded-For 'toto'