feat: add on_behalf_of_token_exchange support to client token_exchange schema #1366
Merged
ankita10119 merged 4 commits intomasterfrom Apr 23, 2026
Merged
feat: add on_behalf_of_token_exchange support to client token_exchange schema #1366ankita10119 merged 4 commits intomasterfrom
ankita10119 merged 4 commits intomasterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1366 +/- ##
=======================================
Coverage 80.15% 80.15%
=======================================
Files 152 152
Lines 6319 6319
Branches 1328 1328
=======================================
Hits 5065 5065
Misses 708 708
Partials 546 546 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ramya18101
approved these changes
Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR extends the Auth0 Deploy CLI to support the On-Behalf-Of (OBO) Token Exchange feature, which allows MCP servers and backend APIs to exchange an incoming user-bound access token for a new token scoped to a downstream first-party API, preserving user identity (sub) and actor attribution (act)
🔧 Changes
The token_exchange object on clients was introduced to support Custom Token Exchange (custom_authentication). OBO Token Exchange reuses the same client-level toggle mechanism but targets a different flow: instead of exchanging an external/custom token, the MCP server exchanges an Auth0-issued access token (scoped to itself) for a short-lived token scoped to a downstream API.
src/tools/auth0/handlers/clients.tsAdds on_behalf_of_token_exchange as a valid value in the token_exchange.allow_any_profile_of_type enum in the client JSON schema:
enum: ['custom_authentication']enum: ['custom_authentication', 'on_behalf_of_token_exchange']This allows tenant configurations managed via Deploy CLI to declare the OBO toggle on a client, enabling it to perform token exchanges using the
urn:ietf:params:oauth:grant-type:token-exchangegrant type.test/tools/auth0/handlers/clients.tests.jsAdds two new test cases covering the full lifecycle of the new profile type
📚 References
🔬 Testing
📝 Checklist