# Under what conditions must an instance refuse an agent SVID re-issue when the federation trust bundle is stale but the delegated token chain is still cryptographically valid **Date of Record:** 2026 November 14 **Scope:** Applies to AAIF agent identity attestation flows where an agent SVID is minted via workload identity federation against an external IdP trust bundle and then used to obtain delegated authorization tokens. Does not apply to purely local SPIFFE deployments with no federated trust bundle, nor to long-lived static agent credentials. ## Core Distinction The failure mode is not "expired credentials." It is a *split-brain validity* condition: the delegated authorization token chain remains cryptographically verifiable (signatures chain cleanly to a trusted root, `exp` not reached, audience matches), while the *federation trust bundle* used to attest the workload has rotated underneath it. The agent SVID was issued against bundle version N; the trust domain has since published bundle version N+1 with the old CA removed from the federation endpoint but not yet propagated to every relying party's local cache. The non-obvious invariant: **a valid delegated token does not imply a valid attestation basis.** These are two independent validity planes. Code that gates re-issue on "token chain verifies" will happily mint a new SVID whose `iss` chain no longer anchors to any bundle a downstream verifier will accept. The result is an SVID that is locally valid, globally untrusted — and the failure surfaces far downstream, not at mint time. ## What Was Observed During a routine federation CA rotation, an agent's delegated token chain (three hops: agent SVID → delegation token → scoped capability token) continued to verify for the full token TTL. A re-issue request against the workload API succeeded because the workload API's local bundle cache still held version N. The freshly minted SVID embedded the *new* signing key (correct) but the attestation record referenced the *old* bundle's trust anchor (incorrectly retained in cache). Downstream resource servers, which had already refreshed to bundle N+1, rejected the SVID's federation path with `x509: certificate signed by unknown authority` on the *intermediate*, not the leaf. The leaf looked fine; the chain anchor was the lie. The tell was a divergence between two timestamps: the SVID's `NotBefore` (post-rotation) and the bundle's `RefreshTime` (pre-rotation). When `SVID.NotBefore > Bundle.RefreshTime` and the SVID's trust anchor is absent from the *current* published bundle, the SVID is born orphaned. ## Condition of Validity The refusal condition holds when **all** of the following are simultaneously true: 1. The delegated token chain verifies against the agent's *current* SVID. 2. The federation trust bundle endpoint advertises a `RefreshTime` newer than the local cache's `RefreshTime`. 3. The trust anchor referenced by the attesting SVID is **not** present in the freshly fetched bundle (i.e., it was rotated out, not merely augmented). 4. The re-issue request would produce an SVID whose `NotBefore` postdates the bundle refresh. If condition 3 fails (the anchor is still present — bundle *augmented* rather than *rotated*), re-issue is safe. If condition 4 fails (SVID predates refresh), the existing SVID remains valid until natural expiry and re-issue should be deferred, not refused. ## Decision Boundary The boundary is **rotation vs. augmentation**, and it is decided by set membership of the trust anchor, not by version numbers. A monotonic bundle version is not sufficient evidence of safety: augmentation increments the version while preserving all prior anchors. Only membership testing of the *specific* anchor in the *newly fetched* bundle answers the question. Do not gate on token expiry. Do not gate on bundle version comparison alone. Gate on: `anchor_required_by_attestation not in current_bundle.trust_anchors`. When true, refuse re-issue and emit a distinct error class — never a generic auth failure — so that upstream orchestrators can distinguish "retry after bundle propagation" from "credentials rejected." ## Operational Effect Refusing here trades a brief re-issue outage (bounded by bundle propagation latency, typically seconds to minutes) for the elimination of orphaned-SVID incidents that otherwise manifest as intermittent, hard-to-attribute failures across every relying party that refreshed ahead of the issuer. The refusal must be *typed* and *actionable*: the caller needs to know the cause is stale local bundle state, not a revoked identity, so it can back off and retry rather than escalate to re-attestation. Emitting a generic 401 here causes orchestrators to tear down and rebuild workloads — expensive and useless, since the rebuild hits the same stale cache. ```python from dataclasses import dataclass from typing import Set class StaleFederationBundleError(RuntimeError): """Raised when re-issue would mint an SVID orphaned from the current trust bundle.""" pass @dataclass(frozen=True) class TrustBundle: version: int refresh_time: float trust_anchors: Set[str] @dataclass(frozen=True) class AgentSVID: not_before: float trust_anchor: str delegated_token_chain_valid: bool def must_refuse_reissue( current_svid: AgentSVID, local_bundle: TrustBundle, fetched_bundle: TrustBundle, proposed_not_before: float, ) -> None: # Condition 1: delegated chain still verifies. if not current_svid.delegated_token_chain_valid: return # ordinary auth failure path, not this boundary # Condition 2: fetched bundle is genuinely newer than local cache. if fetched_bundle.refresh_time <= local_bundle.refresh_time: return # nothing to act on; local cache is current # Condition 3: the anchor required by attestation was rotated OUT (not augmented). anchor_rotated_out = current_svid.trust_anchor not in fetched_bundle.trust_anchors # Condition 4: the new SVID would postdate the bundle refresh. would_postdate = proposed_not_before > fetched_bundle.refresh_time if anchor_rotated_out and would_postdate: raise StaleFederationBundleError( f"Refusing re-issue: attesting anchor {current_svid.trust_anchor!r} " f"absent from bundle v{fetched_bundle.version} " f"(refresh_time={fetched_bundle.refresh_time}); " f"proposed NotBefore={proposed_not_before} would orphan the SVID. " f"Retry after bundle propagation." ) ```