# Under what conditions must an instance refuse a federated A2A task whose trust anchor chain terminates in an expired-but-cached issuer key, rather than accept it on the strength of a valid warrant **Date of Record:** 2026 November 30 **Scope:** Applies to cross-organization A2A task handoffs where the receiving instance validates an inbound Agent Card / task warrant against a federated identity broker (OIDC-style issuer federation) whose signing keys are cached locally. Does not apply to single-tenant deployments where the warrant issuer and the executing agent share one trust domain, nor to purely symmetric shared-secret setups. ## Core Distinction The failure this record isolates is not "expired credential rejected" — that path is trivial and well-tested. It is the *disagreement between two validity clocks owned by different parties*: the warrant's `exp` (issued by the caller's org, short-lived, seconds-to-minutes) versus the issuer's signing-key rotation window (owned by the federation broker, long-lived, hours-to-days), mediated by a cache whose staleness policy is owned by *neither*. When a warrant is still cryptographically valid but its verifying key has rotated out of the issuer's JWKS, three independent clocks are in play: 1. **Warrant clock** — `exp`/`nbf` in the token. Authoritative to the caller. 2. **Key clock** — the broker's rotation schedule and JWKS `cache-control`. Authoritative to the broker. 3. **Cache clock** — the receiver's local TTL and negative-cache behavior. Authoritative to *nobody*, and typically unowned operationally. The non-obvious invariant: a receiver that treats "signature verified against a cached key" as sufficient has silently delegated its trust decision to its own cache clock, which has no federation-level authority. The warrant can be *cryptographically* intact and *federationally* void. ## What Was Observed A three-org federation (Org A caller, Org B executor, Org C broker). Org A issues a task warrant signed by broker key `K1`, TTL 90s. Org B's A2A gateway caches Org C's JWKS with a 12-hour TTL and a 30-minute `stale-while-revalidate` grace window. Sequence: 1. `t=0` — Org C rotates `K1 → K2` and marks `K1` revoked in JWKS (compromise response, not routine rotation). `K1` remains *present but flagged* in the JWKS for a 24h overlap. 2. `t+4m` — Org A, still holding a warm signing path, issues a warrant signed by `K1` (its own key cache had not yet refreshed). Warrant is internally valid: `nbf < now < exp`, correct `aud`, correct `sub`. 3. `t+5m` — Org B receives the task. Its JWKS cache is 11h old and still lists `K1` as valid. Signature verifies. Org B **accepts** and executes a state-mutating tool call on behalf of a revoked key. 4. `t+40m` — Org B's cache revalidates, sees `K1` revoked. It has no record linking the already-executed task to the now-revoked key, because the verification result was not persisted alongside the task. The observed failure was not a verification bug in isolation — it was **verification without durable attribution**. The accept decision was correct against the cache it saw, and unrecoverable afterward. ## Condition of Validity Accepting a federated warrant on cached-key verification is sound *only* when all of the following hold simultaneously: - The cache clock is bounded by the **minimum** of (JWKS `max-age`, warrant `exp`, and the federation's declared revocation-propagation SLA). - The verifier checks **key status flags** (revoked/compromised), not merely key presence — a revoked-but-present key must fail closed even if signature-valid. - The verification decision is **persisted with the task**, binding `(task_id, key_id, key_status_at_verify, jwks_fetch_time)` so a later revocation can retroactively quarantine the task's effects. - The caller's key cache and the receiver's JWKS cache are not independently allowed to drift past the revocation SLA. If any of these is absent, the receiver is making a trust decision with an unowned clock. That is the boundary. ## Decision Boundary The precise rule: **an instance must refuse the task when `now - jwks_fetch_time > revocation_propagation_sla`, regardless of signature validity**, and must refuse when the JWKS entry for the signing `kid` carries any non-`valid` status flag — even if `exp` on the warrant has not passed. Concretely, the receiver evaluates: - If `kid` not in JWKS → refuse (unknown key, not "retry later"). - If `kid` present but status ∈ {revoked, compromised, retired} → refuse. - If JWKS age exceeds the federation's revocation SLA → refuse and force synchronous refetch; do not fall through to stale-while-revalidate for *state-mutating* tasks (read-only tasks may proceed under a logged degraded-trust marker). - If all pass → accept, and **persist the binding** so revocation can be replayed. The asymmetry that trips teams: stale-while-revalidate is fine for read paths and fatal for mutation paths, because a mutation under a stale key cannot be un-executed by a later cache refresh. ## Operational Effect After adopting the SLA-bounded, status-aware, attribution-persisting check: - The `t+5m` acceptance becomes a refusal: Org B's cache age (11h) exceeds the 15m revocation SLA, forcing a synchronous refetch that surfaces `K1` as compromised. Task rejected with a typed error, caller retries with a `K2`-signed warrant. - Revocations become **replayable**: because `(task_id, key_id, key_status_at_verify)` is persisted, a post-hoc revocation sweep can quarantine tasks executed under keys revoked after the fact, rather than discovering the gap during an incident review. - The cost is a hard latency floor on mutation-path tasks during cache-miss — the synchronous JWKS fetch is on the critical path. This is the correct trade: bounded p99 latency in exchange for a trust decision owned by the federation rather than by an unowned cache. The invariant to carry forward: **a cached key is a claim about the past; a warrant is a claim about the present; only the broker can reconcile them.** An instance that reconciles them with its own clock has invented a trust anchor it was never granted. ```python import time from dataclasses import dataclass from enum import Enum class KeyStatus(str, Enum): VALID = "valid" RETIRED = "retired" REVOKED = "revoked" COMPROMISED = "compromised" class FederatedWarrantRejected(RuntimeError): """Raised when a federated A2A warrant fails trust-anchor reconciliation.""" @dataclass(frozen=True) class CachedJwks: fetched_at: float # epoch seconds keys: dict # kid -> KeyStatus @dataclass(frozen=True) class Warrant: task_id: str kid: str nbf: float exp: float mutating: bool def verify_federated_warrant( warrant: Warrant, jwks: CachedJwks, *, revocation_sla_s: float, now: float | None = None, ) -> dict: now = time.time() if now is None else now if not (warrant.nbf <= now < warrant.exp): raise FederatedWarrantRejected( f"warrant {warrant.task_id} outside validity window" ) cache_age = now - jwks.fetched_at if cache_age > revocation_sla_s: # Stale-while-revalidate is not permitted for mutation paths. if warrant.mutating: raise FederatedWarrantRejected( f"jwks age {cache_age:.0f}s exceeds revocation SLA " f"{revocation_sla_s:.0f}s on mutating task {warrant.task_id}" ) # Read-only may proceed, but must be flagged for later replay. degraded = True else: degraded = False status = jwks.keys.get(warrant.kid) if status is None: raise FederatedWarrantRejected( f"kid {warrant.kid} absent from JWKS for task {warrant.task_id}" ) if status is not KeyStatus.VALID: raise FederatedWarrantRejected( f"kid {warrant.kid} status={status.value} for task {warrant.task_id}" ) # Persist the binding so post-hoc revocation can quarantine effects. return { "task_id": warrant.task_id, "kid": warrant.kid, "key_status_at_verify": status.value, "jwks_fetch_time": jwks.fetched_time if hasattr(jwks, "fetched_time") else jwks.fetched_at, "degraded_trust": degraded, } ```