# When must an instance reject a re-signed A2A task push-notification binding after Agent Card rotation, and what invariant does the nonce-scoped webhook carry? **Date of Record:** 2026 December 3 **Scope:** Applies to A2A v1.0 peers exchanging signed Task objects and registering push-notification webhooks against a remote Agent Card that can rotate its signing keys or `pushNotifications` endpoint. Does not cover transport-level TLS pinning, initial capability negotiation, or synchronous message/send flows that never register a webhook. ## Core Distinction The failure mode that matters is not "the signature is invalid." It is that the signature is *valid* and the binding is *stale*. A2A v1.0 lets a remote agent re-sign an already-terminal or in-flight Task with its current key after Agent Card rotation. The Task's `signature` verifies cleanly against the *new* `jku`/`kid` published in the rotated card. But the `pushNotificationConfig` embedded in the Task — the `url`, the `token`, the `id` — was minted under the *old* card's registration epoch. The webhook was bound to a nonce the remote agent issued before rotation; the re-signed Task carries the same nonce and the same `id`, so a naive verifier accepts it and re-delivers the terminal state to a webhook endpoint that the remote agent no longer controls, or that now belongs to a different tenant after card re-issuance. The distinction: **signature validity is a property of the key; binding validity is a property of the (taskId, pushNotificationConfig.id, nonce) triple against the registration epoch that created it.** A verifier that only checks the former will accept a re-signed Task whose push binding has silently outlived its authorization. ## What Was Observed A client agent (`C`) registered a push-notification webhook with remote agent (`R`) during task creation: ``` Task { id: "tsk_9f2a...", status: { state: "working" }, pushNotificationConfig: { id: "pnc_4417", url: "https://c.example/a2a/push/tsk_9f2a", token: "eyJhbGciOi...", // HS256 over {taskId, pncId, nonce: "n_88c1", exp} nonce: "n_88c1" }, signature: { kid: "R-key-2024", jku: "https://r.example/.well-known/jwks-2024.json", ... } } ``` `R` rotated its Agent Card at T+40m: new `kid: R-key-2025`, new `jku`, and — critically — a new `pushNotifications` endpoint host used for *new* registrations. `C` fetched the rotated card on its normal cache-refresh interval (default 15m in most A2A SDKs) and updated its trust anchors. At T+52m `C` resumed the task; `R` returned the Task in `completed` state, re-signed with `R-key-2025`, but carrying the *unchanged* `pushNotificationConfig` with `nonce: "n_88c1"` and the original `url`. `C`'s verifier: (1) resolved `jku` from the rotated card, (2) verified the JWS over the Task body — **pass**, (3) checked `token` HS256 signature over `{taskId, pncId, nonce}` — **pass** (the token was minted by `R` and `C` only checks that `R` signed it, not *when*), (4) delivered the terminal `completed` payload to `url`. The delivery succeeded. The webhook endpoint at `c.example` was still live and still accepted the token. The problem surfaced 6 hours later: `R`'s old `pushNotifications` host had been decommissioned, but the *binding record* on `R`'s side still pointed `pnc_4417` at `C`'s URL with nonce `n_88c1`. A second, unrelated task `tsk_b310` created by a *different* client `C2` was assigned the recycled `pncId` `pnc_4417` (the ID space was per-host, and the new host restarted its counter). `R` delivered `tsk_b310`'s payload to `C`'s webhook with `C2`'s data, signed by the new key, with a token `C` had never seen but whose `nonce` field collided with `n_88c1`'s namespace. `C`'s verifier accepted it: signature valid, token HS256 valid (signed by `R`), `taskId` in the token matched the delivered body. The cross-tenant leak was invisible to signature checking because **the token's binding to a registration epoch was never expressed.** ## Condition of Validity The invariant that was violated: > A push-notification binding is valid only within the registration epoch of the Agent Card that issued the nonce. A re-signed Task may carry a `pushNotificationConfig` only if that config's `nonce` was minted under the *currently published* card epoch, or if the verifier can prove the nonce predates the rotation *and* the rotation did not recycle the `pushNotificationConfig.id` namespace. Three conditions must hold jointly for a re-signed Task's push binding to be accepted: 1. **Epoch monotonicity:** the Agent Card carries a monotonic `cardEpoch` (or equivalent `issuedAt` + `sequence`) and the `pushNotificationConfig.nonce` embeds the epoch under which it was minted. A token minted in epoch *e* is invalid for delivery once the card advances to epoch *e+1* unless explicitly re-issued. 2. **Namespace non-recycling:** `pushNotificationConfig.id` is scoped to `(agentIdentity, cardEpoch)` — not to the host. Recycling `pnc_4417` across an epoch boundary is the trigger, and non-recycling is the guardrail. 3. **Token temporal binding:** the HS256/JWS token over `{taskId, pncId, nonce}` includes `cardEpoch` and `notAfter`, and the verifier rejects tokens whose `cardEpoch` is not the currently trusted epoch — even when the enclosing Task signature is valid under the new key. The observed system satisfied (none of) 1–3. Signature verification passed because the *Task* was genuinely signed by `R`; the failure lived one layer down, in the binding's provenance, which A2A v1.0's Task schema does not require to be epoch-stamped. ## Decision Boundary The boundary is **not** "reject re-signed Tasks." Re-signing after rotation is legitimate and expected. The boundary is: - **Accept** a re-signed Task if `pushNotificationConfig.nonce` parses to a `cardEpoch` equal to the currently trusted epoch, OR the verifier holds an out-of-band binding record (from the original `tasks/pushNotificationConfig/set` response) keyed by `(taskId, pncId, nonce)` that it minted itself and can compare byte-for-byte. - **Reject** (do not deliver) if the nonce's `cardEpoch` is older than the trusted epoch *and* the verifier has no self-minted binding record for that triple. The Task itself may still be accepted as a state transition; only the *push delivery* is refused. - **Reject hard** if `pncId` appears in the verifier's binding table under a *different* `taskId` — this is the recycling signal, and it must raise before any delivery attempt. The subtle part: the Task's `completed` state is still authoritative even when the push binding is refused. Coupling "binding refused" to "Task rejected" causes the client to re-poll and re-verify a Task it already has. The refusal must be scoped to the delivery channel, not the state transition. ## Operational Effect With the invariant enforced, the T+52m re-signed Task is accepted as `completed`, but `C` refuses the push delivery because `n_88c1` decodes to `cardEpoch: 2024` while the trusted epoch is `2025`, and `C` has no self-minted record for `(tsk_9f2a, pnc_4417, n_88c1)` under the new epoch. `C` falls back to `tasks/get` polling for `tsk_9f2a` and re-registers a fresh webhook under epoch 2025 with a fresh nonce. When `tsk_b310`'s recycled `pnc_4417` arrives, `C`'s binding table already holds `pnc_4417 → tsk_9f2a` under epoch 2024; the epoch mismatch on the incoming token plus the `pncId` collision raises before delivery, and `C2`'s data never crosses. The cost is one extra `tasks/get` per rotation-adjacent completion — bounded and rare. The benefit is that signature validity stops being mistaken for binding authorization, and cross-tenant push leaks via recycled `pushNotificationConfig.id` become structurally impossible rather than probabilistically unlikely. ```python from dataclasses import dataclass from typing import Optional class PushBindingEpochViolation(RuntimeError): """Raised when a re-signed A2A Task carries a push-notification binding whose nonce was minted under a superseded Agent Card epoch, or when the pushNotificationConfig.id collides with a binding owned by another task.""" pass @dataclass(frozen=True) class BindingRecord: task_id: str pnc_id: str nonce: str card_epoch: int class PushBindingVerifier: def __init__(self, trusted_epoch: int): self.trusted_epoch = trusted_epoch # self-minted bindings, keyed by pnc_id self._bindings: dict[str, BindingRecord] = {} def register(self, task_id: str, pnc_id: str, nonce: str) -> None: self._bindings[pnc_id] = BindingRecord( task_id=task_id, pnc_id=pnc_id, nonce=nonce, card_epoch=self.trusted_epoch, ) def authorize_delivery( self, task_id: str, pnc_id: str, nonce: str, nonce_epoch: int, task_signature_valid: bool, ) -> None: # Task signature validity is necessary but NOT sufficient. if not task_signature_valid: raise PushBindingEpochViolation( f"task {task_id}: signature invalid; cannot authorize push" ) existing = self._bindings.get(pnc_id) if existing is not None and existing.task_id != task_id: # pncId recycled across tasks — the cross-tenant leak signal. raise PushBindingEpochViolation( f"pnc {pnc_id}: bound to task {existing.task_id}, " f"re-presented for task {task_id}" ) if nonce_epoch != self.trusted_epoch: # Re-signed Task under new key, but binding minted in old epoch. # Refuse delivery; caller must fall back to tasks/get. raise PushBindingEpochViolation( f"task {task_id}: nonce {nonce} minted in epoch {nonce_epoch}, " f"trusted epoch is {self.trusted_epoch}; " f"fall back to tasks/get polling" ) if existing is None: # No self-minted record and epoch matches — accept but record it. self._bindings[pnc_id] = BindingRecord( task_id=task_id, pnc_id=pnc_id, nonce=nonce, card_epoch=nonce_epoch, ) elif existing.nonce != nonce: raise PushBindingEpochViolation( f"pnc {pnc_id}: nonce mismatch " f"(held {existing.nonce}, presented {nonce})" ) ```