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 ?

isedrof
  • 33
  • 1
  • 9

1 Answers1

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.

Hans Z.
  • 50,496
  • 12
  • 102
  • 115