0

I'm working with apache module mod_auth_openidc. and i'm trying to concat some variables in order to send it to my application.

OIDCScope "profile email openid offline_access"
OIDCRemoteUserClaim  sub


<Location "/app2">
  AuthType openid-connect
  Require valid-user
  ProxyPass   "http://192.168.10.237/myapp"
  ProxyPassReverse  "http://192.168.10.237/myapp"

  RewriteEngine On
  RewriteRule .* - [E=PROXY_USER:%{LA-U:REMOTE_USER}] 
  RequestHeader set REMOTE_USER  %{PROXY_USER}e

</Location>

</VirtualHost>

My application display the HTTP header attributs enter image description here

The purpose is to concat "sub" and "email" values and put them together in REMOTE_USER variable.

any siggestions please ?

1 Answer 1

1

You can use something like:

RequestHeader set REMOTE_USER  "%{PROXY_USER}e:%{OIDC_CLAIM_email}e"

since the email claim - if it exists - will have been propagated in the OIDC_CLAIM_email environment variable.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks ! i tried this : RewriteRule .* - [E=PROXY_USER:%{HTTP:OIDC_CLAIM_email}] and it works

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.