# Why does an instance accept a delegated capability token whose authorization chain silently re-roots at a re-issued agent credential **Date of Record:** 2026 November 26 **Scope:** Applies to AAIF-style delegated capability tokens (macaroon/Biscuit/CWT-style attenuation chains) where an agent credential is re-issued mid-chain and downstream verifiers validate only the leaf signature plus a shallow `iss`/`aud` match. Does not apply to single-hop bearer tokens with no delegation, nor to chains anchored to an immutable, long-lived root key that is never rotated under the same subject identifier. ## Core Distinction The non-obvious boundary is between **signature validity** and **authorization provenance continuity**. A delegated capability token is a chain: root credential → delegation₁ → delegation₂ → … → leaf. Each link attenuates (narrows) the caveats and is signed by the key material of the previous link. Verifiers habitually check two things: (a) the leaf signature resolves to *some* trusted agent credential, and (b) the caveats at the leaf are satisfied by the request. What they almost never check is whether the **subject identity that anchors the chain is the same identity that was present when the delegation was first minted**. When an agent credential is re-issued — key rotation, re-attestation, a new TEE measurement, a re-issued DID document, a re-minted workload identity — the *subject string* (`did:agent:foo`, SPIFFE ID, `agent_id`) frequently stays constant while the **key material and the credential's provenance hash change**. A delegated token minted under credential version N still carries an `iss` field matching the subject string of version N+1. A shallow verifier that matches on subject string accepts it. The chain has silently re-rooted: the leaf now appears to descend from a credential it was never actually delegated by, and any caveat that depended on properties of version N (measurement, capability set, revocation epoch) is now evaluated against version N+1's claims with no detection. ## What Was Observed A three-agent pipeline: an orchestrator (`did:agent:orch`) holds a broad capability, delegates a narrowed `read:dataset` capability to a retrieval worker (`did:agent:ret`), which sub-delegates a further-narrowed `read:dataset:partition=7` to a summarizer. The orchestrator's credential was re-issued at 14:02 (key rotation after a scheduled re-attestation). The re-issued credential kept `did:agent:orch` as its subject, dropped the `hardware_measurement=mren:abc…` claim (the new host did not carry that measurement), and bumped `credential_epoch` from 41 to 42. At 14:07 the retrieval worker presented its leaf token. The summarizer's verifier performed: 1. Leaf signature check → resolves to `did:agent:orch` via the delegation chain's `iss` walk. 2. Caveat check → `read:dataset:partition=7` satisfied. 3. Subject trust check → `did:agent:orch` is in the trust store → **accept**. The verifier never compared `credential_epoch` recorded in the delegation link (41) against the epoch of the credential it actually resolved (42). It never re-evaluated the `hardware_measurement` caveat that the original delegation was conditioned on. The token was accepted for 40 minutes against a credential that no longer asserted the property the delegation was granted under. The failure was silent: every individual check passed. Only a cross-referencing audit of `credential_epoch` across the chain surfaced the divergence. The tell: the delegation link's embedded `parent_credential_hash` no longer matched the hash of the credential the verifier resolved by subject string. The verifier resolved by *name*, the chain was bound by *hash*. ## Condition of Validity The invariant that must hold for a delegated capability token to be soundly accepted is: > For every link Lᵢ in the chain, the credential resolved for `Lᵢ.iss` must have `hash(credential) == Lᵢ.parent_credential_hash`, and `Lᵢ.parent_credential_epoch == resolved_credential.epoch`, and the resolved credential must not be revoked as of the verification time. This fails whenever **subject-string identity is treated as a proxy for credential-hash identity**. It is valid to match on subject string only when the credential is provably immutable for the lifetime of any token that references it — i.e., when re-issuance is forbidden under a constant subject, or when re-issuance forces a revocation epoch bump that invalidates all descendant tokens. Most AAIF deployments do neither: they rotate keys under a stable DID and expect verifiers to "just resolve the current document." The boundary is sharp: **the moment a credential can be re-issued under a stable subject, subject-string matching becomes unsound**, and every downstream verifier that has not been updated to hash-pin the parent link is now accepting re-rooted chains. The window of exposure equals the lifetime of the longest-lived outstanding delegated token minted before re-issuance. ## Decision Boundary A verifier must decide, per link, between two regimes: - **Hash-pinned acceptance:** resolve `parent_credential_hash` against the credential store, require exact hash match, require epoch match, require no revocation between mint time and now. Reject on any mismatch. This is the only sound regime when re-issuance under stable subjects is permitted. - **Subject-matched acceptance:** resolve by subject string and accept if the subject is trusted. Sound *only* if the credential is immutable-for-life under that subject, or if the trust store guarantees that any re-issuance atomically revokes all descendant delegations. The decision must be made at the **link level, not the chain level**, and it must be made **at verification time, not mint time** — because the credential can be re-issued after the token was minted. A verifier that pins at mint but matches at verify has the bug. If the deployment cannot guarantee immutability or atomic descendant revocation, the hash-pinned regime is mandatory and subject-matched acceptance is a defect, not a policy choice. The corollary for delegation minting: a delegation link MUST embed `parent_credential_hash` and `parent_credential_epoch` as first-class, signed fields. A chain that carries only `iss` subject strings has already lost the information needed to make the decision. ## Operational Effect When the boundary is crossed, the observable effect is **capability persistence across a trust downgrade**. The agent that was re-attested onto weaker hardware (or with a reduced capability set, or under a new measurement) continues to exercise, through outstanding delegated tokens, exactly the capabilities it held before re-issuance — for the full remaining lifetime of those tokens. Because every individual check passes, no error surfaces; the failure is only visible to a cross-chain audit that recomputes parent hashes. In multi-agent swarms this compounds: a single re-issued orchestrator credential silently re-roots every outstanding delegation fan-out beneath it, and each leaf verifier independently concludes "trusted." The guardrail is a verification-time hash-and-epoch pin per link, plus a mint-time obligation to embed the parent hash. The code below encodes the check that must run before any delegated token is honored; it fails closed on epoch divergence and on hash mismatch, and treats subject-string-only resolution as a hard error rather than a fallback. ```python import hashlib from dataclasses import dataclass class DelegationChainRerootedError(RuntimeError): """Raised when a delegated capability token's parent link no longer resolves to the credential it was actually minted under.""" @dataclass(frozen=True) class Credential: subject: str epoch: int claims: dict revoked_at: int | None = None def content_hash(self) -> str: h = hashlib.sha256() h.update(self.subject.encode()) h.update(str(self.epoch).encode()) for k in sorted(self.claims): h.update(f"{k}={self.claims[k]}".encode()) return h.hexdigest() @dataclass(frozen=True) class DelegationLink: issuer_subject: str parent_credential_hash: str parent_credential_epoch: int caveats: tuple[str, ...] def verify_delegation_link( link: DelegationLink, resolved: Credential, now: int, ) -> None: """Verify one link of a delegated capability chain. Sound acceptance requires hash-pinning: the credential resolved for link.issuer_subject must match the hash and epoch recorded at mint time. Subject-string matching alone is unsound once re-issuance under a stable subject is permitted. """ if link.parent_credential_hash is None or link.parent_credential_epoch is None: raise DelegationChainRerootedError( f"link from {link.issuer_subject!r} carries no parent hash/epoch; " "subject-string-only resolution is unsound" ) if resolved.subject != link.issuer_subject: raise DelegationChainRerootedError( f"resolved credential subject {resolved.subject!r} != " f"link issuer {link.issuer_subject!r}" ) if resolved.content_hash() != link.parent_credential_hash: raise DelegationChainRerootedError( f"credential for {resolved.subject!r} re-rooted: " f"resolved hash {resolved.content_hash()[:12]} != " f"pinned hash {link.parent_credential_hash[:12]}" ) if resolved.epoch != link.parent_credential_epoch: raise DelegationChainRerootedError( f"credential {resolved.subject!r} epoch {resolved.epoch} != " f"pinned epoch {link.parent_credential_epoch}; " "delegation minted under a superseded credential" ) if resolved.revoked_at is not None and resolved.revoked_at <= now: raise DelegationChainRerootedError( f"credential {resolved.subject!r} revoked at {resolved.revoked_at}" ) ```