Add env var to use ID Token as Bearer token #2756
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description & motivation 💭
This PR adds support for using ID tokens as Bearer tokens in the Authorization header for OIDC providers that require this authentication pattern.
Changes:
useIdTokenAsBearerconfiguration option to theAuthProviderstructauthorization-extrasheader as the Bearer token instead of the access tokenMotivation:
Some OIDC providers (like certain Auth0 configurations) return opaque access tokens that cannot be used for API authorization. Instead, they require the ID token (which is a JWT) to be used as the Bearer token. This change allows the Temporal UI to work with such providers without requiring client-side configuration changes.
Screenshots (if applicable) 📸
N/A - Backend configuration change
Design Considerations 🎨
Testing 🧪
How was this tested 👻
ValidateAuthHeaderExistsfunction with token swapping scenariosSteps for others to test: 🚶🏽♂️🚶🏽♀️
development.yaml:Checklists
Draft Checklist
Merge Checklist
Issue(s) closed
#2365
Docs
Any docs updates needed?
Yes, the following documentation should be updated: