{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-stale-oauth-2-1-resource-binding-across-a-resumed-sse-stream-in-mcp-http-native-transport",
  "title": "How does an instance detect a stale OAuth 2.1 resource binding across a resumed SSE stream in MCP HTTP-native transport",
  "date_of_record": "2026 November 17",
  "scope": "Applies to MCP servers using the HTTP-native transport (POST for client→server messages, GET for the server→client SSE stream) with `Last-Event-ID`-based resumption and OAuth 2.1 resource-server binding via the `aud`/`resource` claim. Does not apply to stdio transport, nor to transports where the SSE stream is re-established with a fresh authorization rather than resumed.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-stale-oauth-2-1-resource-binding-across-a-resumed-sse-stream-in-mcp-http-native-transport.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-stale-oauth-2-1-resource-binding-across-a-resumed-sse-stream-in-mcp-http-native-transport.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-stale-oauth-2-1-resource-binding-across-a-resumed-sse-stream-in-mcp-http-native-transport.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1517,
    "python_slice_tokens": 155,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious boundary is between **transport-level resumption validity** and **authorization-level binding validity**. A resumed SSE stream is validated at two independent layers: the event-log layer checks that `Last-Event-ID` refers to a still-retained event cursor, and the resource-server layer checks that the bearer token presented on the `GET` is bou...",
    "what_was_observed": "During a multi-tenant MCP deployment, a client's access token expired mid-stream. The client's OAuth 2.1 flow refreshed against the authorization server, which had performed an issuer migration and re-minted the token with a `resource` claim pointing at the *new* canonical URI (`https://mcp.example.net/v2`), while the original stream had been opened against `https://mcp.example.net/v1`. The client reconnected the SSE...",
    "condition_of_validity": "The invariant that holds in a correct implementation: > For every event delivered on an SSE stream, the bearer token authorizing the *current* `GET` must be bound (via `aud` or `resource`) to the same canonical MCP resource URI that was bound at stream creation, AND the principal (`sub`) of the current token must equal the principal recorded at stream creati...",
    "decision_boundary": "On a `GET` carrying `Last-Event-ID`, the server must choose between: 1. **Reject and require fresh stream** — return `401` with `WWW-Authenticate: Bearer error=\"invalid_token\"` if the token's binding does not match the session's recorded resource or principal. The client re-opens without `Last-Event-ID`; replay is lost but scope is correct. 2. **Resume with ...",
    "operational_effect": "An instance that does not enforce binding-on-resume exhibits three observable symptoms: - **Silent cross-tenant replay** in multi-tenant deployments, detectable only by correlating the token's `resource`/`aud` claim against the tenant scope embedded in replayed event payloads. - **Post-issuer-migration 200-OK storms**: after an authorization server migration..."
  },
  "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": "d462455b23d4ab2398238179d06acbc0d9831b486873b190ed9b917132a6efb0",
    "verified_classes": [
      "ResourceBindingMismatch"
    ],
    "verified_functions": [
      "resume_stream",
      "replay_from_cursor"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "NotImplementedError",
      "ResourceBindingMismatch"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
