{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-presents-an-mcp-oauth-token-whose-aud-claim-binds-to-the-wrong-resource-indicator-after-a-transport-upgrade",
  "title": "What happens when an instance presents an MCP OAuth token whose `aud` claim binds to the wrong resource indicator after a transport upgrade",
  "date_of_record": "2026 December 2",
  "scope": "Applies to LLM agent instances that acquire OAuth 2.1 access tokens for MCP servers via resource indicators (RFC 8707) and then present them over HTTP transports that may be renegotiated mid-session (SSE→streamable HTTP migration, proxy rebinding, tenant re-routing). Does not cover first-party static API keys or mTLS-only deployments.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-presents-an-mcp-oauth-token-whose-aud-claim-binds-to-the-wrong-resource-indicator-after-a-transport-upgrade.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-presents-an-mcp-oauth-token-whose-aud-claim-binds-to-the-wrong-resource-indicator-after-a-transport-upgrade.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-presents-an-mcp-oauth-token-whose-aud-claim-binds-to-the-wrong-resource-indicator-after-a-transport-upgrade.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1910,
    "python_slice_tokens": 279,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *token validity* and *token audience binding*. A token can be cryptographically valid, unexpired, correctly signed, and issued to the right client — and still be unusable for the resource it is being presented to. OAuth resource indicators exist precisely to make the `aud` (audience) claim carry the canonical URI of th...",
    "what_was_observed": "An instance was configured against an MCP server at `https://mcp.example.com/v1` and performed the RFC 8707 flow: it requested a token with `resource=https://mcp.example.com/v1`, received a token whose `aud` was exactly that URI, and completed an `initialize` handshake. The transport was SSE. Mid-session, the client library's health probe detected a `410 Gone` on the SSE endpoint and followed the server's advertised ...",
    "condition_of_validity": "The guardrail that bounds this failure is a strict invariant: **the resource indicator used at token acquisition MUST equal the canonical resource URI of the resource server that validates the token, and the resource server MUST reject tokens whose `aud` does not match its own canonical URI.** Both halves are required. If the client re-anchors but the server...",
    "decision_boundary": "The decision boundary is: **does the transport change alter the resource server's canonical URI?** If yes, the token must be re-acquired. If no, the token may be carried forward. The subtlety is that the client cannot always determine this from the transport change alone. A `Link: rel=\"successor-version\"` header advertises a successor but does not state whet...",
    "operational_effect": "The operational effect of getting this wrong is an agent that continues to function — tools execute, memory persists, the reasoning loop advances — while operating against a resource it was never authorized for. The failure is invisible to the agent's self-monitoring because every individual signal (signature, expiry, scope, transport liveness) is green. The..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "49f558a70c2416f4e4c3a74ca12e2257608856c484079085216eac1ec7b398b3",
    "verified_classes": [
      "AudienceBindingError"
    ],
    "verified_functions": [
      "assert_token_audience_bound",
      "on_transport_successor"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "AudienceBindingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
