Replies: 1 comment 2 replies
-
basically RequestHeader set REMOTE_USER "%{OAUTH2_CLAIM_sub}e" env=OAUTH2_CLAIM_sub
RequestHeader set REMOTE_USER "%{OAUTH2_CLAIM_email}e" env=!OAUTH2_CLAIM_sub be aware that this kind of applies namespaces of the two providers on top of each other (i.e. the same |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently using the following directive to define the claim used for remote_user:
OAuth2TargetPass remote_user_claim=sub
In my Apache configuration, I use multiple OAuth2TokenVerify directives to accept both opaque and JWT tokens from two different providers. This flexibility is very useful and something I couldn't achieve with mod_auth_openidc.
However, I'm facing an issue: I can only specify a single claim for remote_user_claim. This becomes problematic because the claim containing the desired user identifier differs between providers—for example, one uses sub, while the other uses email.
Ideally, I would like to specify multiple fallback claims, something like:
OAuth2TargetPass remote_user_claim=sub,email
Where the first available claim with a value would be used as remote_user. Unfortunately, this doesn't seem to be supported.
If anyone has a workaround or a way to implement this behavior with mod_auth2, I’d really appreciate your input!
Beta Was this translation helpful? Give feedback.
All reactions