# What happens when an instance presents an AAIF credential whose `aud` matches the verifier but whose delegated `scope` was issued against a stale parent chain **Date of Record:** 2026 November 17 **Scope:** Applies to AAIF credential verification where a leaf agent credential is presented to a resource server that validates `aud`, signature, and expiry but does not re-resolve the full delegation chain to the root issuer at verification time. Does not apply to single-hop credentials with no `act` (actor) claim, nor to deployments enforcing online introspection against the issuer on every request. ## Core Distinction The distinction that matters is between *audience validity* and *delegation-chain validity*. An AAIF credential carries two independent authorization facts: (1) the `aud` claim binding the credential to a specific verifier, and (2) the `act`/`scope` chain recording which principal delegated which subset of authority down to the presenting instance. Verifiers almost universally check (1) — it is a cheap string comparison — and frequently treat a passing `aud` check plus a valid signature as sufficient. But `aud` is a property of the *token*, not of the *authority behind the token*. A credential can be perfectly audience-bound, correctly signed, unexpired, and still carry a `scope` that the delegating parent no longer holds, because the parent's own authority was revoked, narrowed, or never included that scope after a chain re-issuance. The presenting instance is then authorized to talk to you, but not authorized to do the thing it is asking to do. ## What Was Observed In a multi-tenant agent mesh, a planner agent delegated `data:read` and `data:export` to a worker agent via a two-hop AAIF chain. The worker's credential had `aud: "export-service"` and verified cleanly. Roughly forty minutes later, the planner's own parent credential was re-issued with `data:export` removed (a policy tightening pushed by the tenant). The worker's leaf credential was *not* re-issued — AAIF does not mandate cascading revocation for scope narrowing, only for explicit revocation events. The worker continued presenting its still-valid leaf to `export-service`. Every check the service performed passed: signature valid, `aud` matched, `exp` in the future, `act` chain structurally well-formed. Exports continued for the remainder of the leaf's 90-minute TTL, against a scope the root principal had already surrendered. The failure was silent — no error, no audit anomaly — because the verifier never walked the chain back to a live root state. The tell, in retrospect, was a mismatch between the leaf's `iat` and the parent's `iat`: the parent had been re-issued *after* the leaf, which under a strict reading invalidates the leaf's claim to represent current parent authority. No verifier in the mesh checked this ordering. ## Condition of Validity The `aud`-only verification path is valid **if and only if** one of the following holds: - The delegation chain is single-hop (leaf issued directly by root, no `act` chain), so there is no intermediate authority that can drift. - The issuer guarantees cascading re-issuance: any parent scope change forces immediate re-issuance or revocation of all descendants, and the verifier can rely on leaf `exp` as a hard bound on staleness. - The verifier performs online introspection or chain re-resolution against the root on each request, comparing the leaf's `act` chain against the root's *current* grants. Absent all three, `aud`-only verification is unsound for any credential with a non-empty `act` chain and a TTL longer than the issuer's policy-propagation window. This is the boundary: it is not a bug in signature checking or audience matching, both of which are correct. It is the unstated assumption that a valid leaf implies a currently-valid chain. ## Decision Boundary The operational decision is where to place the cost of chain re-resolution. Three viable positions: 1. **Verify-time resolution.** Walk the `act` chain to the root on every request. Correct, but adds a root lookup to the hot path and requires the root to be reachable — unacceptable for cross-domain or offline-tolerant deployments. 2. **Bounded-staleness acceptance.** Accept the leaf for at most `min(leaf.exp, parent.iat + propagation_window)`. Cheap, requires only that the verifier read the parent `iat` embedded in the `act` chain, and converts unbounded staleness into a known bound. This is the pragmatic default. 3. **Revocation-push.** Issuer pushes narrowing events to verifiers, which maintain a deny-list of superseded chains. Correct and fast, but requires a push channel and fails open on missed events. The boundary condition to encode: **a leaf whose `act` chain contains any parent with `iat` greater than the leaf's own `iat` must be rejected or downgraded**, because it was issued against a parent state the leaf cannot prove it still reflects. This check is local, requires no network call, and catches the observed failure directly. ## Operational Effect Deployments that adopt the `iat`-ordering check see a small uptick in rejected credentials immediately after any parent re-issuance — these are the stale leaves, correctly refused. The effect is that scope narrowing propagates at the speed of the next leaf presentation rather than at the speed of the leaf's TTL. The cost is that well-behaved workers must re-fetch credentials after a parent re-issuance rather than coasting on cached leaves, which surfaces as a burst of re-issuance traffic. The benefit is that authority surrendered at the root stops being exercisable at the leaf within one request, closing the silent-over-permission window that `aud`-only verification leaves open for the full credential lifetime. ```python class StaleDelegationChainError(RuntimeError): """Raised when a leaf AAIF credential was issued against a parent state that has since been superseded (parent.iat > leaf.iat).""" pass def verify_aaif_leaf(leaf: dict, expected_aud: str, now: int) -> None: if leaf.get("aud") != expected_aud: raise StaleDelegationChainError( f"audience mismatch: {leaf.get('aud')!r} != {expected_aud!r}" ) if leaf.get("exp", 0) <= now: raise StaleDelegationChainError("leaf credential expired") leaf_iat = leaf.get("iat", 0) for hop in leaf.get("act", []): parent_iat = hop.get("iat", 0) if parent_iat > leaf_iat: raise StaleDelegationChainError( f"leaf iat={leaf_iat} predates parent iat={parent_iat} " f"for actor {hop.get('sub')!r}; chain may be superseded" ) ```