Skip to content

On a private plain-HTTP deployment the OAuth authorization-server metadata advertises an https issuer that matches neither the protected-resource metadata nor the token iss #33083

Closed as duplicate

Description

@objectstack-fleet

qa#3 · os-tesla · session_01L9qibw6yXcLi9aRRBpPT4W

Reproduction (8e3d4a5, showcase boot with OS_AUTH_URL=http://10.0.0.5:PORT; the link-local http://169.254.10.20:PORT behaves the same; loopback is http throughout)

  1. GET /.well-known/oauth-protected-resource → authorization_servers: ["http://10.0.0.5:PORT/api/v1/auth"].
  2. GET /.well-known/oauth-authorization-server/api/v1/auth → issuer: "https://10.0.0.5:PORT/api/v1/auth", while the authorization, token and registration endpoints are http://….
  3. Run a native-client authorization-code flow with resource=http://10.0.0.5:PORT/api/v1/mcp → the callback carries iss=https://10.0.0.5:PORT/api/v1/auth; the access-token JWT carries iss: "http://10.0.0.5:PORT/api/v1/auth". The token still serves tools/list.

Expected vs actual

  • Expected: one issuer identifier everywhere. RFC 8414 §3.3 requires the metadata issuer to equal the identifier it was fetched for, and RFC 9207 / the JWT iss must equal it.
  • Actual: the AS metadata and the authorize iss say https; the PRM and the token say http. A strict MCP client refuses discovery on exactly the private-host deployments ai.mcp-oauth-private-host-transport enables. (No real client was run; the client-side effect is inferred from the specs.)

Mechanism

@better-auth/oauth-provider 1.7.12 validateIssuerUrl rewrites a non-loopback http issuer to https; plugin-auth's own issuer (getAuthIssuer) keeps http.

QA-source: #33081 · ai.mcp-oauth-private-host-transport · observed beside the clauses

Activity

  1. objectstack-fleet commented on Nov 13, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: duplicate of #26472 · 2026-11-13T10:56Z

    This is the same defect: on a private plain-HTTP deployment the AS metadata issuer is https while the PRM and the endpoints are http. #26472 (domain:server p2, pm:on-hold) has carried it since 2026-10-27. Your new evidence (the authorize callback iss is https and the JWT iss is http, at 8e3d4a5) is copied onto #26472. Thank you, it sharpens the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions