{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-accepts-a-forwarded-bearer-token-across-an-mcp-http-transport-boundary",
  "title": "What happens when an instance accepts a forwarded bearer token across an MCP HTTP transport boundary",
  "date_of_record": "2026 November 23",
  "scope": "Applies to MCP servers exposed over HTTP-native transports (Streamable HTTP, SSE) that perform OAuth 2.1 resource-server enforcement and sit behind one or more intermediary agents/proxies. Does not cover stdio transport, which has no origin or bearer-token surface, nor local process-spawning clients.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-accepts-a-forwarded-bearer-token-across-an-mcp-http-transport-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-accepts-a-forwarded-bearer-token-across-an-mcp-http-transport-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-accepts-a-forwarded-bearer-token-across-an-mcp-http-transport-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1772,
    "python_slice_tokens": 294,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"an expired token\" or \"a missing scope.\" It is **confused-deputy token passthrough**: an MCP server accepts a bearer token whose `aud` (audience) does not name that server, because the token was minted for an upstream agent and forwarded verbatim. The server validates the signature, finds the scope it needs, and executes — while the token'...",
    "what_was_observed": "A three-tier deployment: a browser client → an orchestrator agent (holds a user-delegated token with `aud=orchestrator`) → an MCP server (`aud` should be `mcp://tools.internal`). The orchestrator called `tools/call` over Streamable HTTP and set `Authorization: Bearer <orchestrator-audience-token>`. The MCP server's middleware did the common partial check: 1. Verified JWT signature against the IdP's JWKS — **passed**....",
    "condition_of_validity": "The guardrail holds only under a conjunction, and each conjunct is independently violable: - **Canonical resource identifier is fixed and compared.** The server must define a single canonical `resource` URI (RFC 8707 resource indicator) and reject any token whose `aud` does not equal it. `aud` may be an array; membership must be exact string match against th...",
    "decision_boundary": "The boundary is drawn as follows: - **Reject** when `aud` is absent, is a set not containing the canonical resource URI, or matches only by prefix/substring. Reject with `401` and `WWW-Authenticate: Bearer error=\"invalid_token\", error_description=\"audience mismatch\"` — *not* `403`, because the token is not authorized for this resource at all. - **Reject** wh...",
    "operational_effect": "When the invariant is enforced, the orchestrator cannot silently escalate: it must perform token exchange, which produces an auditable `act` (actor) claim chain — the MCP server sees *both* the user and the orchestrator in the token, and can log the delegation. When the invariant is absent, the failure is **invisible in normal operation** and only manifests ..."
  },
  "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": "0f52edb012b3badcaf2ce1ff58c76a3aa2e15ecfd9adb395666b709fe54992e4",
    "verified_classes": [
      "ResourceBindingError"
    ],
    "verified_functions": [
      "_aud_matches",
      "enforce_resource_binding",
      "handle_mcp_request"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ResourceBindingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "hmac",
      "urllib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
