# Which invariants prevent signed Agent Card trust from being silently downgraded during A2A v1.0 task lifecycle renegotiation **Date of Record:** 2026 November 18 **Scope:** Applies to A2A v1.0 orchestrators that discover remote agents via signed Agent Cards and subsequently negotiate task lifecycle state transitions (`submitted` → `working` → `input-required` → `completed`/`failed`/`canceled`) across a trust boundary. Does not apply to intra-mesh agents sharing a single signing authority, nor to A2A v0.x, where the Agent Card carried no verifiable signature and trust was established out-of-band. ## Core Distinction A signed Agent Card authenticates **the advertised capability envelope at discovery time**; it does not authenticate the **task lifecycle transitions negotiated afterward**. A2A v1.0 permits a remote agent to return `input-required` mid-task and to attach a *revised* card or capability descriptor with that transition. The signing invariant protects the binding between issuer identity and card bytes — it says nothing about whether the revised card was signed by the same issuer, at the same trust level, for the same task. The non-obvious failure is that a lifecycle transition can *replace the trust anchor in effect for the remainder of the task*, and every party in the flow will treat the task as having been continuously authenticated. ## What Was Observed In a federated deployment (orchestrator O, agent A reached through a gateway G that terminates TLS and re-signs cards on behalf of a sub-fleet), the following sequence reproduced reliably: 1. O discovers A, fetches the Agent Card, verifies the detached JWS against A's published `jwks_uri` rooted at a trusted CA. Verification passes. O records `trust_level=verified`, `issuer=A`, and caches the card keyed by `(agent_id, card_version)`. 2. O submits a task. A returns `working`. 3. A returns `input-required` with a `card_update` containing a new `card_version` and a widened `capabilities` set, plus an updated `extensions` array. The update is signed — but by G, not by A. G's key is valid and chains to the same CA, so signature verification *passes*. 4. O merges the update, re-verifies (success), and continues the task under the widened capability envelope. Downstream audit logs show a single task with a single verified issuer. No event records the issuer change from A to G. The subtlety: step 3 is not a forgery. G is legitimately authorized to speak for A in some deployments. The failure is that **the trust anchor for the task's remaining lifecycle silently changed identity**, and no invariant in the naive implementation forbids or records it. A task that began as "A, verified directly" ends as "G, verified via delegation," and the orchestrator's state machine has no representation for that difference. ## Condition of Validity The downgrade is possible only when all of the following hold simultaneously: - The card update is accepted on a lifecycle edge (`input-required`, `working` heartbeat with capability refresh) rather than requiring a fresh out-of-band discovery. - Signature verification checks *chain validity* but not *issuer continuity* — i.e., the verifier confirms "signed by someone the CA vouches for" rather than "signed by the same principal that signed the card the task was admitted under." - The orchestrator's task record stores a single `issuer` field overwritten on update, rather than an append-only issuer history bound to the task. - Capability widening is permitted across the update (the `capabilities` set is merged, not intersected). Remove any one condition and the downgrade either fails closed or becomes observable. In particular, intersecting capabilities rather than merging them is sufficient to prevent *privilege* escalation even when issuer continuity is not checked — but it does not prevent the *identity* substitution, which is the part that defeats audit. ## Decision Boundary The boundary is not "is the update signed?" but "**is the update signed by the principal the task was admitted under, and is that fact recorded as a lifecycle event?**" Two invariants must hold together; either alone is insufficient: - **Issuer-continuity invariant:** For the lifetime of a task, every card update must verify against the *same* issuer key set that admitted the task, or the orchestrator must explicitly transition the task into a `renegotiating` state that requires re-admission (new task ID, new audit root). A delegated issuer is permitted only if the original card *pre-declared* the delegation in a signed `delegates` field. - **Monotonic-capability invariant:** The effective capability set for a task is the intersection of all card versions seen across its lifecycle, never the union. Widening requires re-admission, not update. The decision point is at the lifecycle edge handler, before merge. If either invariant is violated and the orchestrator cannot re-admit, the correct action is to fail the task with a distinct terminal state — not to complete it under degraded trust. ## Operational Effect When these invariants are enforced, the observable behavior changes in three ways: (1) delegated-issuer deployments must pre-declare delegation in the signed card, converting a silent substitution into an explicit, auditable grant; (2) capability widening during a task becomes impossible without a new task ID, which makes the audit trail linear and replayable; (3) the orchestrator gains a `renegotiating` terminal-adjacent state that downstream consumers can alert on. The cost is additional task churn in fleets that legitimately rotate signing keys mid-task — those rotations must now be expressed as re-admission rather than in-place update. That cost is the point: an in-place trust-anchor change is indistinguishable, in the logs, from a compromise that completed cleanly. ```python class TrustAnchorSubstitutionError(RuntimeError): """Raised when a lifecycle card update would change the task's trust anchor without an explicit, pre-declared delegation or a re-admission transition.""" class CapabilityWideningError(RuntimeError): """Raised when a card update would expand the effective capability set for an in-flight task; widening requires re-admission, not update.""" def apply_card_update(task, update, verified_issuer, declared_delegates): # Invariant 1: issuer continuity. The update must be signed by the same # principal that admitted the task, OR that principal must have pre-declared # the new issuer as a delegate in its own signed card. if verified_issuer != task.admitting_issuer: if verified_issuer not in declared_delegates: raise TrustAnchorSubstitutionError( f"task {task.id}: card update signed by {verified_issuer!r} " f"but task was admitted under {task.admitting_issuer!r} " f"with no pre-declared delegation; refusing in-place update" ) task.record_event("issuer_delegated", from_=task.admitting_issuer, to=verified_issuer) # Invariant 2: monotonic capability set. Intersect, never union. new_caps = set(update.capabilities) widened = new_caps - task.effective_capabilities if widened: raise CapabilityWideningError( f"task {task.id}: update widens capabilities by {sorted(widened)}; " f"widening requires re-admission under a new task id" ) task.effective_capabilities &= new_caps task.record_event("card_update_applied", issuer=verified_issuer, card_version=update.card_version) return task ```