Skip to content

refactor(mcp): share protected resource metadata discovery - #3955

Draft
aheritier wants to merge 1 commit into
fix/3879-dcr-scope-propagationfrom
fix/3879-prm-helper-extraction
Draft

refactor(mcp): share protected resource metadata discovery#3955
aheritier wants to merge 1 commit into
fix/3879-dcr-scope-propagationfrom
fix/3879-prm-helper-extraction

Conversation

@aheritier

Copy link
Copy Markdown
Collaborator

Stacked on #3881.

Extracts duplicated RFC 9728 protected-resource metadata fetch/decode/defaulting from managed and docker-agent-driven unmanaged OAuth into a shared helper. Runtime fallback remains disabled, while explicit ordered fallback support is enabled for forthcoming standalone CLI work.

Adds deterministic local tests covering exact candidates/GET/order, hard stops (invalid JSON and non-200 responses including 204), 404 exhaustion, metadata preservation, and no downstream OAuth activity after hard errors. Clarifies the RequestedScopes comment.

@aheritier aheritier added area/mcp MCP protocol, MCP tool servers, integration kind/refactor PR refactors code without behavior change labels Aug 9, 2026
@aheritier
aheritier force-pushed the fix/3879-prm-helper-extraction branch from 7a6a2a8 to 424cda1 Compare August 10, 2026 20:28
Extract the duplicated RFC 9728 protected-resource-metadata fetch/decode
logic from the managed and unmanaged OAuth flows into a single
fetchProtectedResourceMetadata helper, keeping the existing
supplied-origin-default and 404-tolerant behavior. The helper accepts
optional fallback candidate URLs for the standalone CLI discovery flow
without changing runtime callers.
@aheritier
aheritier force-pushed the fix/3879-prm-helper-extraction branch from 424cda1 to 6898c31 Compare August 10, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/mcp MCP protocol, MCP tool servers, integration kind/refactor PR refactors code without behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant