{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-re-bind-its-oauth-2-1-resource-indicator-after-an-sse-session-resumption-and-why-the-last-event-id-is-not-enough",
  "title": "Where must an instance re-bind its OAuth 2.1 resource indicator after an SSE session resumption, and why the last-event-id is not enough",
  "date_of_record": "2026 November 21",
  "scope": "Applies to MCP servers/clients using the HTTP-native streamable transport with `text/event-stream` resumption semantics (Last-Event-ID replay) combined with OAuth 2.1 resource-indicator binding (RFC 8707). Does not apply to stdio transports, to pure request/response JSON transports without resumable streams, or to deployments where the resource indicator is a static constant equal to the server origin.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-re-bind-its-oauth-2-1-resource-indicator-after-an-sse-session-resumption-and-why-the-last-event-id-is-not-enough.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-bind-its-oauth-2-1-resource-indicator-after-an-sse-session-resumption-and-why-the-last-event-id-is-not-enough.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-bind-its-oauth-2-1-resource-indicator-after-an-sse-session-resumption-and-why-the-last-event-id-is-not-enough.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2369,
    "python_slice_tokens": 475,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two independent notions of \"the same session\" in this transport, and they diverge at exactly one point: the moment a client reconnects an interrupted SSE stream with a `Last-Event-ID` header. - **Stream continuity** is asserted by the client via `Last-Event-ID`. It says: \"resume the event sequence for this stream from offset N.\" It is a *positional...",
    "what_was_observed": "A representative failure trace, MCP server fronted by an OAuth 2.1 authorization server, streamable HTTP transport: 1. Client opens `POST /mcp` with `Accept: application/json, text/event-stream`. Token `T1` carries `resource=https://mcp.example.com/tenant-a`. Server assigns session `S` and stream `S:1`, returns `Mcp-Session-Id: S` and begins emitting SSE events `1,2,3,...`. The server stores, keyed by `(S, stream=1)`...",
    "condition_of_validity": "The invariant holds—i.e., resumption is safe without re-binding—only when *all* of the following are true: - The resource indicator is constant across the entire lifetime of the session (single-tenant server, or the session ID is itself scoped to a tenant and the tenant is re-derived from the session ID, not from the token). - The event log for a stream is k...",
    "decision_boundary": "The decision an instance must make on every resume request, stated as a total function over the resume state: - **If** the stored authorization record for `(session, stream)` exists **and** its `resource_indicator` equals the `resource` claim in the presented token (after normalizing the indicator per RFC 8707 §2 canonicalization) **and** the principal match...",
    "operational_effect": "The concrete architectural guardrail is to make the event log and the authorization record a single durable unit, and to make the resume lookup a join on the resource indicator rather than a lookup by session alone: - Key the replay log by `(session_id, stream_id, resource_indicator_hash)`. A resume computes the indicator hash from the token and looks up 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": "70f451ca58687de0660ba5a98fe0d8dc3d9bf590c284160bbc16d161455a26db",
    "verified_classes": [
      "ResourceBindingMismatch",
      "StreamAuthRecord",
      "PresentedToken",
      "ResumableStreamStore"
    ],
    "verified_functions": [
      "_indicator_hash",
      "demo",
      "__init__",
      "open_stream",
      "evict_auth_only",
      "resume"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 8,
    "raised_exceptions": [
      "AssertionError",
      "ResourceBindingMismatch"
    ],
    "sample_fail_closed_invariants": [
      "assert store.resume('S', '1', 3, PresentedToken('alice', 'https://mcp.example.com/tenant-a')) == ['e4']",
      "cross-tenant resume was not rejected",
      "orphaned log was replayed after auth eviction"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
