Repository navigation
Discover and validate MCP authorization servers before ID-JAG exchange - #49478
Merged
copyberry[bot] merged 1 commit intoSep 30, 2026
Conversation
#49478) ## What changed Add `exchange_ema_auth_token` to discover and validate the MCP resource's authorization server before resolving enterprise identity credentials and performing the ID-JAG token exchange. Keep the lower-level exchange primitive private. - Probe `server/discover` with the enterprise-managed authorization extension, support recognized legacy discovery rejections, and follow protected-resource metadata challenges or well-known fallbacks. - Match configured resource and issuer constraints, require advertised public-client JWT bearer support, and validate token endpoint metadata without requiring an authorization endpoint. - Bound discovery with a shared timeout, redirect and authorization-server limits, reject cross-origin metadata redirects, and restrict private authorization-server destinations while allowing local loopback discovery. ## Testing Add tests covering resource and issuer mismatches before identity access, metadata capability validation, query preservation, modern challenges, JSON and SSE legacy fallback behavior, cross-origin redirect rejection, and private or malformed issuer destinations. GitOrigin-RevId: 9a55233a20ff42c293f9bd8175e01141ac2d8576
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/9a55233a20ff42c293f9bd8175e01141ac2d8576
branch
from
September 30, 2026 04:30
b47bb98 to
15fd656
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/9a55233a20ff42c293f9bd8175e01141ac2d8576
branch
September 30, 2026 04:30
NATTOOOOOO
temporarily deployed
to
issue-triage
September 30, 2026 04:35 — with
GitHub Actions
Inactive
NATTOOOOOO
temporarily deployed
to
issue-triage
September 30, 2026 04:35 — with
GitHub Actions
Inactive
NATTOOOOOO
temporarily deployed
to
issue-triage
September 30, 2026 04:35 — with
GitHub Actions
Inactive
NATTOOOOOO
temporarily deployed
to
issue-triage
September 30, 2026 04:37 — with
GitHub Actions
Inactive
This branch was previously deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Discover and validate MCP authorization servers before ID-JAG exchange
What changed
Add
exchange_ema_auth_tokento discover and validate the MCP resource's authorization server before resolving enterprise identity credentials and performing the ID-JAG token exchange. Keep the lower-level exchange primitive private.server/discoverwith the enterprise-managed authorization extension, support recognized legacy discovery rejections, and follow protected-resource metadata challenges or well-known fallbacks.Testing
Add tests covering resource and issuer mismatches before identity access, metadata capability validation, query preservation, modern challenges, JSON and SSE legacy fallback behavior, cross-origin redirect rejection, and private or malformed issuer destinations.