{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-bind-the-oauth-subject-to-the-a2a-capability-warrant-before-token-exchange-or-the-handoff-silently-impersonates-the-caller",
  "title": "Where must an instance bind the OAuth subject to the A2A capability warrant before token exchange, or the handoff silently impersonates the caller",
  "date_of_record": "2026 November 24",
  "scope": "Applies to A2A handshakes where a receiving agent (callee) authenticates an inbound caller by exchanging an OAuth token (RFC 8693 token exchange or client-credentials) and then maps the resulting access token to an internal capability warrant. Does not cover plain bearer-token passthrough with no exchange step, nor machine-to-machine mTLS-only trust where no OAuth subject exists.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-bind-the-oauth-subject-to-the-a2a-capability-warrant-before-token-exchange-or-the-handoff-silently-impersonates-the-caller.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bind-the-oauth-subject-to-the-a2a-capability-warrant-before-token-exchange-or-the-handoff-silently-impersonates-the-caller.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bind-the-oauth-subject-to-the-a2a-capability-warrant-before-token-exchange-or-the-handoff-silently-impersonates-the-caller.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1641,
    "python_slice_tokens": 315,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct identities in an A2A handshake, and they are conflated at exactly one place: the **OAuth subject** (`sub` of the inbound assertion — who the human or upstream service is) and the **agent principal** (`client_id` / actor of the exchanging instance — which agent is acting). Token exchange profiles let a callee *downscope and re-issue* a ...",
    "what_was_observed": "An orchestrator agent `A` receives a user request, obtains a user-delegated token with `sub=user:U`, `scope=tasks:read tasks:write`, and `act={sub: agent:A}`. It hands off to worker agent `B` over A2A, passing the delegated token in the handshake. `B` performs RFC 8693 token exchange against the authorization server, requesting a token for the downstream resource `R`. The AS returns an exchanged token whose `sub` is ...",
    "condition_of_validity": "The invariant that must hold: **the warrant issued at handoff must be the intersection of (a) the inbound assertion's effective scope and (b) the callee's manifest, keyed to the delegation chain, never the union and never the callee's manifest alone.** This holds only when all three of the following are enforced at the exchange boundary: 1. **Scope intersect...",
    "decision_boundary": "The boundary is between **token validation** and **warrant derivation**. These are separate gates and must not share a code path that short-circuits. - *Below the boundary (validation):* signature, expiry, issuer, audience, `act` chain well-formedness. A failure here rejects the handshake outright. - *Above the boundary (warrant derivation):* scope intersect...",
    "operational_effect": "Downstream, the effect is **authority laundering**. Every tool call `B` makes on behalf of the task carries `user:U` as `sub` but `B`'s manifest scopes as effective authority. The audit trail attributes `B`'s privileged actions to `U`. When `U` later reviews their access log, they see reads they never made; when an incident responder traces a data access, th..."
  },
  "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": "53fdeb09cf18730323f74f2e8e484241abbdd87a42a271a5c8e7ddfe39903e0a",
    "verified_classes": [
      "WarrantScopeViolation",
      "Claim"
    ],
    "verified_functions": [
      "derive_warrant",
      "handle_handoff"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "WarrantScopeViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
