{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-a-multiplexed-http-native-mcp-stream-as-a-fresh-authorization-principal-rather-than-a-continuation-of-the",
  "title": "Under what conditions must an instance treat a multiplexed HTTP-native MCP stream as a fresh authorization principal rather than a continuation of the session bearer",
  "date_of_record": "2026 November 25",
  "scope": "Applies to MCP servers that expose multiple logical tool streams over a single HTTP/1.1 or HTTP/2 connection (SSE multiplexing, streamable HTTP transport, or chunked request pipelining) where authorization is asserted per-stream via a token in the stream envelope rather than per-connection. Does not apply to stdio-transport MCP servers, nor to single-stream HTTP servers where the connection bearer is the sole principal.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-multiplexed-http-native-mcp-stream-as-a-fresh-authorization-principal-rather-than-a-continuation-of-the.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-multiplexed-http-native-mcp-stream-as-a-fresh-authorization-principal-rather-than-a-continuation-of-the.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-multiplexed-http-native-mcp-stream-as-a-fresh-authorization-principal-rather-than-a-continuation-of-the.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2304,
    "python_slice_tokens": 437,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure hinges on a distinction that transport-layer code routinely collapses: **connection identity is not principal identity**. A single TCP/TLS connection to an HTTP-native MCP server can carry N logical streams, each of which arrives with its own `Mcp-Stream-Authorization` envelope token. The server's connection handler is tempted to authenticate onc...",
    "what_was_observed": "A gateway fronting an MCP server accepted HTTP/2 connections and multiplexed streams over them. At connection establishment it resolved the connection bearer into a `Principal` object and stored it on the connection context. Per-stream envelope tokens were parsed for *routing* (which tool namespace to dispatch to) but the authorization check for `tools/call` fell through to `ctx.connection.principal` because the per-...",
    "condition_of_validity": "The connection-scoped principal cache is *only* valid when the following three conditions all hold simultaneously: - **(C1) Single-principal connection.** The server enforces that all streams on a connection carry envelope tokens that resolve to the same principal identity. Any stream whose token resolves to a different `sub` must be rejected or forced onto ...",
    "decision_boundary": "The decision an implementer must make is whether to cache the principal at connection scope at all. The boundary is: - **Cache is safe** if and only if the transport guarantees single-principal connections *by construction* — e.g., the server refuses to multiplex streams from different `sub` claims onto one connection (C1 enforced at admission), *and* the ef...",
    "operational_effect": "With the guardrail, the delegation attribution failure disappears: sub-agent B's `write` call is denied because `effective = {read, write} ∩ {read} = {read}`. The audit log records `Principal(B, sub=agent-A, depth=1)` — the delegation is visible, and a replay audit can reconstruct the full call tree. The rotation window collapses from connection lifetime (47..."
  },
  "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": "d63ef38a9aef0562e12c3ee4164e795a7e0f22e63d36822a2558802e734eaec8",
    "verified_classes": [
      "PrincipalMismatchError",
      "ScopeNarrowingViolation"
    ],
    "verified_functions": [
      "admit_stream",
      "authorize_tool_call",
      "handle_tools_call"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "PrincipalMismatchError",
      "ScopeNarrowingViolation"
    ],
    "sample_fail_closed_invariants": [
      "envelope token carries no sub claim; cannot bind to connection"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
