Repository navigation
[Automated] Draft docs (agentgateway): mcp: Return 401 for expired OAuth subject tokens - #1435
Open
github-actions[bot] wants to merge 2 commits into
Open
github-actions[bot] wants to merge 2 commits into
github-actions[bot] wants to merge 2 commits into
Conversation
…uth subject tokens Drafts-Commit: fc9d2a8 Signed-off-by: GitHub Action <action@github.com>
Deploying agentproxy with
|
| Latest commit: |
f9ef720
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4a84dea8.agentproxy.pages.dev |
| Branch Preview URL: | https://pr-tracker-draft-agentgatewa-zhfy.agentproxy.pages.dev |
The release-notes entry for this change now lives in the combined release-notes PR, #1482, so the draft PRs no longer conflict on the release-notes pages. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Kristin Brown <kristin.brown@solo.io>
Collaborator
|
Moved this PR's release-notes entry to the combined release-notes PR, #1482, so the draft PRs stop conflicting on the release-notes pages. Review or change the entry there. |
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.
agentgateway/agentgateway#4006 — mcp: Return 401 for expired OAuth subject tokens
Docs versions:
standalone/main,kubernetes/mainNo code-path rule covers 1 touched file(s). The planner could route these only by identifier search, so the candidate pages may miss what they changed, including in the other mode:
crates/agentgateway/src/proxy/mod.rsWhat changes for users: MCP requests with an expired JWT-shaped OAuth subject token now receive
401withinvalid_tokenbefore token exchange calls the token endpoint. MCP fail-open routing still skips unavailable targets, but bearer-token rejections reach the client so the client can refresh and retry.What the docs now say: The standalone MCP authentication page, the Kubernetes MCP auth overview, the MCP token-exchange guide, the standard token-exchange guides, and the MCP multiplexing guide now describe the expired-token rejection and the fail-open exception for bearer-token rejections.
Not verified: No cluster or standalone proxy was run; the configuration and behavior are unrun.
How
agentgateway-4006was drafted, and what was not verifiedoauthTokenExchange: an expired client JWT is answered with 500 for ~60 s instead of 401, so clients never refresh agentgateway#3907 was not in this run; the planner says #4006 names it as part of the same feature.Plan, and what changed it
assets/agw-docsfiles, andversion-gates.mdrequires main-only behavior in shared assets to be gated.Why a documentation change is necessary
The pull request changes observable MCP authentication behavior: expired JWT-shaped subject tokens are rejected locally with
401andinvalid_token, and MCP fail-open routing no longer hides bearer-token rejections. The existing MCP auth pages described connect-time authentication but did not say what a client sees when a later bearer token expires. The existing token-exchange pages said the exchange does not validate the incoming token before the token endpoint call; that remains true for trust, but the dossier diff adds a local expiry check that readers need to know about.What changed on disk
assets/agw-docs/pages/agentgateway/mcp/mcp-auth-about.md— Adds the gated Kubernetes MCP auth behavior for expired bearer tokens.assets/agw-docs/pages/agentgateway/mcp/multiplex.md— Adds the gated fail-open exception for bearer-token rejections.assets/agw-docs/pages/security/backend-authn-te-mcp.md— Adds the gated MCP token-exchange behavior for expired JWT-shaped subject tokens.assets/agw-docs/pages/security/backend-authn-te-standard.md— Adds the gated Kubernetes standard token-exchange expiry check.assets/agw-docs/pages/security/backend-authn-te-standard-standalone.md— Adds the gated standalone standard token-exchange expiry check.content/docs/standalone/main/documentation/configuration/security/mcp-authn.md— Adds the standalone main MCP auth behavior for expired bearer tokens.How to verify this change
401and includeinvalid_tokenin the MCP authentication challenge.INBOUND_TOKENfor the MCP tool call; the response should be401before the token endpoint receives a new exchange request.failureMode: FailOpen, make one target return a bearer-token rejection. The request should return the401challenge instead of skipping that target as unavailable.What was not verified
changed-functions.md; the docs claims are based on the visible diff, tests, and listed changed functions.How the pages were chosen (triage report)
Feature clusters
These clusters look incomplete. Each names a pull request this run never saw, so documenting the cluster as it stands may describe half a feature — the classic failure is a guide telling a reader to set a field that a later change gave a default. Read the absent pull request before drafting:
Draft a documentation change
agentgateway/agentgateway#4006 — mcp: Return 401 for expired OAuth subject tokens
agentgateway/websitecrates/agentgateway/src/proxy/mod.rsRelease notes
This pull request also adds its release-note entries:
content/docs/kubernetes/main/release-notes/release-notes.md: mcp: Return 401 for expired OAuth subject tokens (fix, under MCP, in a new 1.8 section)content/docs/standalone/main/release-notes/release-notes.md: mcp: Return 401 for expired OAuth subject tokens (fix, under MCP, in a new 1.8 section)Draft branch:
pr-tracker-draft-agentgateway-4006