I'm trying to use Apache's OpenID authentication module. According to this page, I should be able to use the REMOTE_USER
Apache variable to identify the user. I'd like to pass this as a header to an upstream application (I'm using Apache to authenticate and reverse-proxy).
My Apache site config is as follows:
<VirtualHost *:80>
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
<Location />
AuthType OpenID
require valid-user
AuthOpenIDAXRequire email http://axschema.org/contact/email @muller\.io$
AuthOpenIDAXUsername email
RequestHeader set x-username $REMOTE_USER
</Location>
</VirtualHost>
I've searched and searched, but the most I can find is how to use an environment variable in this context. I've verified that a hard-coded string works (actually the above passes the string "$REMOTE_USER"
to my application).
If mod_auth_openid
is setting the REMOTE_USER
variable within Apache, how can I then pass that upstream to my app?