Skip to content

feat(mcp): add generic workload token exchange grants - #305

Merged
danielkov merged 2 commits into
mainfrom
feat/mcp-token-exchange
Oct 23, 2026
Merged

danielkov merged 2 commits into
mainfrom
feat/mcp-token-exchange

Conversation

@danielkov

Copy link
Copy Markdown
Contributor

Summary

Add generic RFC 8693 token exchange to MCP workload authentication while retaining RFC 7523 JWT bearer and issuer discovery as defaults. Both grants use the shared acquisition session, with optional audience, scope, and bounded non-secret extension parameters.

Technical details

Explicit endpoint trust

An opt-in explicit mode pins an operator-configured HTTPS token endpoint without requiring discovery. This mode accepts JWT source files up to 16 KiB; discovery keeps its 8 KiB limit and issuer-origin checks. MCP still binds its configured resource to the HTTPS server URL, while shared acquisition supports absolute resource URIs for other consumers.

Token handling

Token exchange requests an OAuth access token and requires a Bearer response with the corresponding issued token type. Missing exchange expiry disables caching instead of inventing a lifetime. Rotation-aware reads, serialized renewal, acquisition-specific invalidation, and the existing no-redirect, no-fallback, and no-MCP-replay behavior are preserved.

@kit-code-agent kit-code-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found. The changes look good to merge.

Took 9 min 6 sec

@danielkov
danielkov merged commit 0dac3d9 into main Oct 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant