← Back to Pull requests

fix(auth)!: remove /.well-known/openid-configuration/mcp route #284

Merged
mcollina merged 3 files (259 lines) on Oct 14, 2026 10:16 UTC
View on GitHub
mcollina mcollina commented on Oct 13, 2026 11:20 UTC
Author

Summary

GET /.well-known/openid-configuration/mcp (src/routes/well-known.ts) built authorization-server metadata from authorizationServers[0]:

  • authorization_endpoint, token_endpoint and token_introspection_endpoint were guessed by appending fixed paths (/oauth/authorize, /oauth/token, /oauth/introspect) to the issuer.

  • scopes_supported was hard-coded to ['read','write','mcp:resources','mcp:prompts','mcp:tools'] and ignored requiredScopes.
  • Authorization-server metadata belongs to the authorization server. MCP clients find it through the authorization_servers listed in the protected resource metadata (RFC 9728, MCP spec "Authorization Server Discovery"), and the plugin already serves that. This PR removes the route instead of keeping guessed values.

  • Remove the route from src/routes/well-known.ts.

  • Replace its tests in test/well-known-routes.test.ts with a regression test that checks the route returns 404.

  • README: add a note in "Well-Known Endpoints" saying AS metadata is not served and must be discovered via authorization_servers. The route itself was never documented.
  • Breaking change

    GET /.well-known/openid-configuration/mcp now returns 404. Clients that relied on it should read authorization_servers from /.well-known/oauth-protected-resource (or /.well-known/oauth-protected-resource{path}) and fetch RFC 8414 / OIDC discovery metadata from the authorization server.

    Fixes #263

    🤖 Generated with Claude Code

    https://claude.ai/code/session_01UF4S3w7iA83V9DVsasLJzM

    Diff: 259 lines (+8 / -251) across 3 files Reviewer: rozzilla Review duration: 1376m
    All Vouch review confidence checks passed
    Residual risk 0.32 = Change Risk (0.62) × (1 − Review Confidence (0.48)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.62 · 259 lines diff across 3 files
    0.62
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.00 · 1 substantive comment(s)
    0.00
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    48%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.350
    Diff Size diff_size
    0.333
    Sensitive Paths sensitive_paths
    0.062
    Real PR Conversation Timeline
    2 items
    rozzilla rozzilla approved these changes on Oct 14, 2026 08:53 UTC
    Approved Reviewer

    Approved these changes.

    Reviewers
    Assignees
    mcollina mcollina
    Labels
    risk: low confidence: 48.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 62.4% (MEDIUM) · Higher = larger blast radius
    62.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 48.5% · Lower = rushed or shallow review
    48.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 32.1% · Safe to merge
    32.1%