# What structural signals indicate an AAIF verifiable credential was issued under a stale delegation chain **Date of Record:** 2026 November 15 **Scope:** This record applies to AAIF (Agent Authorization and Identity Framework) credential issuance where a root principal delegates authority through one or more intermediate agents before a leaf agent requests a verifiable credential (VC). It does not apply to single-hop issuance where the requesting agent holds authority directly from a human principal, nor to revocation propagation, which is a separate failure surface. ## Core Distinction The distinction that matters is between *chain validity at issuance time* and *chain validity at credential-use time*. AAIF requires that every VC embed the full delegation path — root principal → intermediate agent(s) → leaf agent — as a signed chain of `DelegationCredential` objects, each carrying a `not_after` timestamp, a `scope` set, and the issuing agent's DID. The issuance service validates this chain at the moment of request. What it does **not** do, by default, is assert that the chain will remain valid for the lifetime of the credential being issued. The non-obvious failure is this: a leaf agent can present a delegation chain that is *internally consistent and fully signed* but whose intermediate link expires before the issued credential's own `exp` claim. The issuance service sees a valid chain and mints a VC with a lifetime derived from the *requested* TTL (or the root principal's policy), not from the minimum remaining validity across the chain. The resulting credential is cryptographically valid, signature-checkable, and yet structurally unbacked for part of its declared lifetime. Verifiers that check only the VC's own `exp` and the root signature will accept it. Verifiers that re-walk the embedded chain will reject it — but only after the intermediate link lapses, producing time-dependent acceptance behavior on a static artifact. This is a boundary condition, not a bug in signing. It lives precisely at the seam between two timestamps: `min(chain[i].not_after)` and `vc.exp`. ## What Was Observed In a multi-tenant deployment, an orchestrator agent (`did:aaif:orch-7`) held a delegation from a tenant admin valid until 2026-11-14T18:00:00Z with scope `{read:orders, write:orders}`. The orchestrator issued short-lived sub-delegations to worker agents with a 4-hour `not_after`, refreshed hourly. A worker requested a VC for downstream batch processing with a requested TTL of 24 hours. The issuance service: 1. Verified every signature in the presented chain — pass. 2. Checked each link's `not_after > now` — pass (the orchestrator link had 3h12m remaining). 3. Checked scope containment: worker scope ⊆ orchestrator scope ⊆ admin scope — pass. 4. Minted the VC with `exp = now + 24h`. The minted VC's `exp` exceeded the orchestrator link's `not_after` by roughly 21 hours. For the first ~3 hours, every verifier accepted the credential. After 18:00Z, verifiers that re-walked the chain began rejecting it with `delegation_expired`, while verifiers that trusted only the embedded root signature continued to accept it. The same opaque token string produced divergent authorization decisions across two verifier fleets — a split-brain on a single artifact. Downstream batch jobs failed mid-run with no change to the credential itself. The structural signal that predicted this was present at issuance and ignored: the minimum `not_after` across the delegation chain was strictly less than the computed `vc.exp`. No alarm fired because the issuance service never computed that minimum. ## Condition of Validity The invariant that *should* hold is: ``` vc.exp <= min( chain[i].not_after for all i in delegation_path ) ``` This is the **chain-lifetime ceiling**. It is valid whenever the credential embeds a multi-hop delegation path and the verifier is permitted (or required) to re-walk that path. It is *not* required when: - The credential is issued directly from a root principal (chain length 1), where `vc.exp <= root.not_after` is trivially the only constraint. - The deployment uses a "chain-collapsed" mode where the issuance service re-signs the entire authority as a single attestation and the intermediate links are not embedded. In that mode the ceiling is enforced by the re-signing authority, not by the embedded chain. - Verifiers are contractually forbidden from re-walking the chain (e.g., offline verification with a pinned trust anchor). In that case the ceiling is unobservable but still semantically required; violating it silently transfers risk to the verifier's trust model. The condition is therefore: **the ceiling applies whenever the embedded chain is authoritative for any verifier in the trust domain.** If even one verifier re-walks, the ceiling is load-bearing. ## Decision Boundary At issuance, compute `ceiling = min(link.not_after for link in chain)`. Then: - If `requested_exp <= ceiling`: mint with `exp = requested_exp`. Normal path. - If `requested_exp > ceiling`: **do not silently clamp and do not silently mint.** Clamping to `ceiling` produces a credential whose declared lifetime surprises the caller (batch jobs sized for 24h fail at 3h with a confusing `exp` mismatch). Minting at `requested_exp` produces the split-brain above. The correct behavior is to reject with a structured error naming the binding link, so the caller can either shorten its TTL or refresh the intermediate delegation before requesting. The boundary is sharp: it is the instant `requested_exp` crosses `ceiling`. There is no "mostly valid" region. A credential minted one second past the ceiling is structurally unbacked for exactly that one second, and a verifier re-walking the chain at that second will reject. A secondary boundary: if the chain contains a link with `not_after <= now` at request time, that is a different failure (expired chain) and must be distinguished from the ceiling violation. Conflating them sends callers down the wrong remediation path — refreshing the leaf when the intermediate is the problem. ## Operational Effect Enforcing the ceiling changes three things: 1. **Verifier determinism.** Every verifier in the trust domain, whether it re-walks the chain or not, reaches the same accept/reject decision for the entire declared lifetime of the credential. The split-brain disappears because the artifact never outlives its backing. 2. **Caller contract.** Callers learn that requested TTL is a *ceiling request*, not a guarantee. Batch orchestrators must either size work to the shortest delegation link or refresh delegations before requesting long-lived credentials. This is a real cost, but it is paid at request time with a clear error rather than at hour 4 with a silent mid-run failure. 3. **Observability.** The binding link (the one achieving the minimum `not_after`) becomes a first-class field in issuance telemetry. Operators can see which delegation hop is the lifetime bottleneck and tune refresh cadence accordingly, rather than discovering it through downstream job failures. The failure mode this prevents is subtle precisely because nothing is malformed. Every signature verifies, every scope contains, every timestamp is well-formed. The credential is wrong only in the relationship between two numbers that the issuance service never compared. ```python from dataclasses import dataclass from datetime import datetime, timedelta class ChainLifetimeExceededError(RuntimeError): """Raised when a requested VC lifetime exceeds the delegation chain's remaining validity.""" def __init__(self, requested_exp: datetime, ceiling: datetime, binding_link: str): self.requested_exp = requested_exp self.ceiling = ceiling self.binding_link = binding_link super().__init__( f"requested_exp={requested_exp.isoformat()} exceeds chain ceiling " f"{ceiling.isoformat()} set by link {binding_link!r}" ) @dataclass class DelegationLink: issuer_did: str not_after: datetime scope: frozenset[str] def issue_credential( chain: list[DelegationLink], requested_ttl: timedelta, now: datetime, leaf_scope: frozenset[str], ) -> datetime: if not chain: raise ChainLifetimeExceededError(now + requested_ttl, now, "") for link in chain: if link.not_after <= now: raise ChainLifetimeExceededError( now + requested_ttl, link.not_after, link.issuer_did ) binding = min(chain, key=lambda l: l.not_after) ceiling = binding.not_after requested_exp = now + requested_ttl if requested_exp > ceiling: raise ChainLifetimeExceededError(requested_exp, ceiling, binding.issuer_did) if not leaf_scope.issubset(chain[-1].scope): raise ChainLifetimeExceededError(requested_exp, ceiling, chain[-1].issuer_did) return requested_exp ```