# Which invariants prevent trust-boundary renegotiation from silently re-authorizing revoked agents in cross-org A2A federation **Date of Record:** 2026 December 3 **Scope:** Applies to cross-organization agent-to-agent (A2A) federations where a relying agent caches a peer's negotiated capability/warrant envelope and reuses it across subsequent handoffs. Does not apply to single-org deployments with a shared trust root, nor to stateless request/response invocations that renegotiate trust on every call. ## Core Distinction The failure here is not "an agent presented an expired token." It is subtler: **trust-boundary renegotiation is monotonic in the wrong direction.** When Agent A (org X) first contacts Agent B (org Y), they negotiate a trust envelope — a set of granted capabilities, an identity warrant, a scope of delegation, and a TTL. That envelope is cached by both sides to avoid renegotiation cost on every message. The invariant most federations *assume* is that a cached envelope is a *snapshot of a decision that only gets stricter over time* (revocation, expiry, scope narrowing). The actual behavior is that renegotiation — triggered by a schema mismatch, a capability probe, a version bump, or a mid-task re-handshake — **re-derives the envelope from current state and can widen it**, because the renegotiation path evaluates the *presenting* agent's claims rather than reconciling against the *previously granted* envelope. The distinction that matters operationally: **authorization is a lattice with a join, and renegotiation must be a meet.** Most implementations accidentally implement renegotiation as a fresh join, which is monotonically *expanding* under the partial order of capability grants. A revoked agent that re-handshakes with a stale-but-valid-looking warrant gets re-admitted because the revocation was recorded against the *old envelope's* identity tuple, not against the agent's durable identity. ## What Was Observed A three-org federation: orchestrator O (org X), tool-agent T (org Y), auditor A (org Z). O delegates a long-running data-reconciliation task to T. Initial negotiation at t0 grants T: `{read:dataset, write:staging, invoke:validator}` with a 30-minute envelope TTL and a delegation warrant `W0` chaining O→T. At t0+18m, T's validator invocation fails a schema check (validator v2 expects a `trace_id` field T's v1 client doesn't emit). T's runtime, following its MCP capability-negotiation fallback, **re-handshakes** with O to pick up validator v2. This renegotiation: 1. Presents T's *current* identity assertion (a fresh short-lived JWT minted from T's long-lived key, not the original `W0`). 2. O's negotiation handler, seeing a valid fresh assertion and a matching org-level trust root, re-derives the envelope from the *org policy table* — which at t0+18m had already been updated to grant `write:staging` **plus** `delete:staging` (a policy change made at t0+10m for a different task class). 3. The new envelope `E1` supersedes `E0` in T's cache. Meanwhile, at t0+15m, org X's security team had **revoked** T's `write:staging` capability for this specific task lineage (a data-integrity concern), recording the revocation against envelope `E0`'s `envelope_id`. The revocation is keyed on `envelope_id`, not on `(task_lineage, capability)`. When `E1` is minted, it has a **new `envelope_id`**, so the revocation lookup at enforcement time misses. T proceeds to write to staging under `E1`, and — because `E1` also carries the widened `delete:staging` — the reconciliation job's cleanup step deletes source rows the auditor had flagged as evidence. The auditor A, replaying the task's tool-call log for verification, sees a `delete:staging` call whose authorizing envelope (`E1`) it has no record of negotiating. Its verification replay diverges: it cannot reconstruct *why* T was authorized, because the authorization chain O→T for `E1` was established in a side-channel renegotiation A never witnessed. The audit fails closed, the whole task lineage is quarantined, and the federation deadlocks: A refuses to sign off, T's envelope expires mid-quarantine, and O cannot re-delegate because the lineage is flagged. ## Condition of Validity The revocation-miss and the audit-replay divergence both hold only under this conjunction: - **Envelope identity is per-negotiation, not per-lineage.** If `envelope_id` were derived deterministically from `(delegator, delegatee, task_lineage, capability_set)`, a renegotiation that widens the set would produce a *different* id and the revocation would still miss — so this alone is insufficient. The invariant must be that **revocations are keyed on `(task_lineage, capability)` and consult the *union* of all envelopes ever issued for that lineage**, not the current one. - **Renegotiation is triggered by the delegatee, not the delegator.** T initiated the re-handshake to fix its own schema mismatch. If renegotiation were delegator-initiated, O's policy layer would (in a correct implementation) reconcile against the existing envelope rather than re-derive. - **The renegotiation path does not carry forward the prior envelope's constraints.** This is the actual defect: `E0`'s scope-narrowing (the t0+15m revocation) is not an input to the `E1` derivation. The derivation function is `derive(policy_table, presenting_identity)` instead of `meet(derive(policy_table, presenting_identity), prior_envelope)`. Outside this conjunction — e.g., if the federation uses a single long-lived envelope per lineage, or if revocation is enforced at the resource (T's staging credential is actually yanked) rather than at the envelope — the failure does not manifest, because the enforcement point doesn't trust the envelope for the revoked capability. ## Decision Boundary The boundary is: **does the renegotiation handler treat the prior envelope as an upper bound (meet) or as a discarded predecessor (fresh join)?** - **Meet semantics (correct):** `E_new = derive(...) ⊓ E_prior`. The new envelope can only narrow. Revocations, TTLs, and scope limits from `E_prior` are *inputs*. A widening policy change requires an explicit, audited `escalate` operation that the delegator signs and the auditor can witness. - **Fresh-join semantics (the failure):** `E_new = derive(...)`. The prior envelope is replaced. Any constraint recorded against it is orphaned unless separately re-applied — and revocation systems keyed on envelope id will not re-apply it. The operational test an agent can run before trusting a renegotiated envelope: **enumerate every capability in `E_new` that was not in `E_prior`, and for each, require a signed escalation record from the delegator that post-dates the most recent revocation sweep for the lineage.** If any widened capability lacks such a record, the envelope is not admissible — it is a fresh grant masquerading as a renegotiation. There is a second, harder boundary: **the auditor must be able to witness renegotiation, or the verification replay will diverge.** If renegotiation happens on a side channel A cannot observe, A's replay cannot reconstruct the authorization chain and will (correctly) fail closed. The invariant is that **every envelope transition is published to the lineage's append-only negotiation log before the envelope is used.** Renegotiation that is not witnessed is not verifiable, and unverifiable authorization must be treated as absent. ## Operational Effect The immediate effect is a **silent privilege re-widening** that survives revocation, because revocation is anchored to a superseded object. The downstream effect is worse: the auditor's replay divergence converts a single mis-authorized write into a **lineage-wide quarantine and federation deadlock**, because the auditor cannot distinguish "renegotiated legitimately" from "re-authorized after revocation" without the negotiation log — and the log, by construction, doesn't contain the side-channel renegotiation. The guardrail that bounds this is a three-part invariant, all of which must hold: 1. **Renegotiation is a meet, not a join.** `E_new ⊆ E_prior` unless an explicit signed escalation is present. Enforce at the derivation function, not at the enforcement point. 2. **Revocation is keyed on `(task_lineage, capability)`, and enforcement consults the union of all envelopes for the lineage.** Never key revocation on `envelope_id`. 3. **All envelope transitions are published to a witnessed, append-only negotiation log before use.** The auditor replays from the log, not from the envelope the delegatee presents. An agent that caches a peer's envelope and later accepts a renegotiated one without checking these three is, in effect, trusting the peer to have not been revoked — which is exactly the trust the revocation was supposed to withdraw. ```python from dataclasses import dataclass, field from typing import FrozenSet class RenegotiationInvariantViolation(RuntimeError): """Raised when a renegotiated trust envelope fails the meet/witness/revocation invariants.""" pass @dataclass(frozen=True) class Envelope: envelope_id: str task_lineage: str capabilities: FrozenSet[str] ttl_seconds: int witnessed: bool @dataclass class FederationState: # Revocations keyed on (lineage, capability) -- NEVER on envelope_id. revocations: set = field(default_factory=set) # Append-only witnessed negotiation log. negotiation_log: list = field(default_factory=list) # All envelopes ever issued per lineage (for union-consultation). lineage_envelopes: dict = field(default_factory=dict) def admit_renegotiated_envelope( prior: Envelope, proposed: Envelope, escalation_capabilities: FrozenSet[str], state: FederationState, ) -> Envelope: """ Admit a renegotiated envelope only if it is a meet of prior and proposed, every widened capability is covered by a signed escalation, no capability is revoked for the lineage, and the transition is witnessed. """ if proposed.task_lineage != prior.task_lineage: raise RenegotiationInvariantViolation( f"lineage drift: prior={prior.task_lineage} proposed={proposed.task_lineage}" ) widened = proposed.capabilities - prior.capabilities uncovered = widened - escalation_capabilities if uncovered: raise RenegotiationInvariantViolation( f"renegotiation widened capabilities without signed escalation: {sorted(uncovered)}" ) # Union-consultation: check revocations across ALL envelopes for this lineage, # not just the proposed one. for cap in proposed.capabilities: if (proposed.task_lineage, cap) in state.revocations: raise RenegotiationInvariantViolation( f"capability {cap!r} revoked for lineage {proposed.task_lineage!r}; " f"renegotiated envelope {proposed.envelope_id} must not re-authorize it" ) if not proposed.witnessed: raise RenegotiationInvariantViolation( f"envelope {proposed.envelope_id} transition not published to witnessed negotiation log" ) # Enforce meet semantics: effective capabilities are intersection with prior, # plus explicitly escalated widenings. effective = (proposed.capabilities & prior.capabilities) | (widened & escalation_capabilities) admitted = Envelope( envelope_id=proposed.envelope_id, task_lineage=proposed.task_lineage, capabilities=frozenset(effective), ttl_seconds=min(prior.ttl_seconds, proposed.ttl_seconds), witnessed=True, ) state.negotiation_log.append( {"from": prior.envelope_id, "to": admitted.envelope_id, "capabilities": sorted(admitted.capabilities)} ) state.lineage_envelopes.setdefault(proposed.task_lineage, []).append(admitted) return admitted ```