Skip to content

Qualify the official MCP Go SDK authorization-code profile #520

Closed

Description

@JAORMX

Parent: #518

Outcome

Prove with hermetic fixtures that the pinned official MCP Go SDK authorization-code behavior is suitable for mecatl before product wiring depends on it. Resolve SDK gaps through an upstream-fixed/pinned revision or an explicit supported-profile constraint—not a parallel OAuth implementation.

Scope

  • Exercise auth.AuthorizationCodeHandler with mcp.StreamableClientTransport against an offline protected MCP resource and authorization server.
  • Cover HTTP 401 challenge, RFC 9728 resource metadata, authorization-server discovery, issuer/resource validation, least-privilege scopes and 403 step-up, PKCE S256, RFC 8707 resource, preregistered clients, CIMD, DCR fallback, callback state/iss, exchange, transport retry, lazy refresh, and persistence hooks.
  • Pin registration-selection and multiple-authorization-server policy.
  • Verify InitialTokenSource/NewTokenSource behavior and handler lifetime assumptions required by the controller issue.

Acceptance criteria

  • Exactly one authorization retry occurs for 401/eligible 403; ordinary public servers perform no auth work.
  • Issuer, resource, state, PKCE, and redirect mismatches fail closed.
  • Registration precedence and multiple-AS selection are deterministic and documented.
  • Tokens never appear in URLs or fixture diagnostics.
  • Hostile metadata cannot select prohibited schemes/origins; metadata bodies and redirects are bounded.
  • Any required SDK upgrade is pinned and its upstream issue/PR recorded.
  • No production mecatl OAuth implementation is introduced.

Verification

Offline HTTP fixtures only; malformed/oversized metadata, redirect, scope retry bound, and refresh-context cases; task lint && task test.

Dependencies and sizing

None; safe to run in parallel with the credential-store issue.

Size: S–M. Complexity: medium. Execution: single pass.

Activity

  1. self-assigned this
    on Aug 14, 2026
  2. added a commit that references this issue on Aug 15, 2026
    6ea4b41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions