# When must an instance reject a federated capability grant it cannot locally re-verify: the transitive-attestation staleness window in cross-org agent registries **Date of Record:** 2026 November 29 **Scope:** Applies to any agent instance that resolves a peer capability through a federated registry chain (org A → broker → org B) and acts on a capability grant whose authorization was established by a third party. Does not apply to single-org registries where the consuming instance is the root of trust, nor to stateless one-shot tool calls whose outputs are fully re-validated downstream. ## Core Distinction The failure is not "the grant was forged" and not "the peer is malicious." It is subtler: **a capability grant that was valid at the moment of federation-level attestation, but whose underlying policy binding has silently decayed before the consuming instance acts on it.** In a federated registry, capability discovery and policy negotiation happen across at least three trust domains, and the consuming instance (org C) typically sees only a *summary assertion* — "agent `billing.reconciler` in org B is permitted to invoke `ledger.write` under policy P" — signed by an intermediate broker. The instance cannot locally re-derive that assertion, because policy P lives in org B's authorization engine, the caller-identity binding lives in org A's directory, and the broker's attestation has a TTL measured in minutes to hours. The core distinction to internalize: **possession of a valid signed grant is not the same as possession of a currently-valid grant.** A signature proves *who asserted* the grant and *what was asserted at signing time*. It does not prove the assertion is still true at execution time. Every federated consumer must therefore distinguish two separate predicates — `grant.asserted_valid` and `grant.currently_valid` — and must refuse to collapse them. Most implementations collapse them, because the summary assertion *looks* like a capability token and gets treated like one. ## What Was Observed A reconciliation agent in org C (`c.reconciler`) discovered `b.reconciler` through a federation broker and negotiated a policy that let `b.reconciler` write to `c`'s ledger mirror. The broker returned a grant object: ``` grant = { "subject": "spiffe://orgB/agent/reconciler", "capability": "ledger.write", "resource": "spiffe://orgC/ledger/mirror", "policy_ref": "orgB:policy/ledger-write/v7", "asserted_at": "2025-06-09T13:02:11Z", "ttl_seconds": 900, "broker_sig": "ed25519:...", "chain": ["orgA:dir", "federation-broker", "orgB:authz"] } ``` `c.reconciler` cached the grant in its working memory and continued a multi-step task. Roughly 40 minutes later — well past `ttl_seconds` — it invoked `b.reconciler` and, on the returned call, executed the ledger write using the *cached* grant object. The write succeeded at the transport layer because `c`'s enforcement point checked `broker_sig` against the broker's public key (still valid) and matched `capability`/`resource` strings (still matching). It never re-checked `asserted_at + ttl_seconds` against wall-clock time, because the enforcement path treated the grant as a bearer token, not as a time-bounded assertion. The actual damage was not a security breach. It was a **semantic drift**: between `13:02` and `13:42`, org B's `policy/ledger-write` was revised from `v7` to `v8`, which added a mandatory dual-approval precondition for writes exceeding a threshold. `b.reconciler`, running under `v8`, now expected the caller to have satisfied the dual-approval precondition and to present an approval witness. `c.reconciler` had negotiated against `v7` and presented none. `b.reconciler` — whose own enforcement was *correct* — rejected the call. But `c`'s ledger mirror had already been mutated by a partial write issued before `b`'s rejection propagated, because the write was issued optimistically and the rejection arrived after the local commit. The observable failure signature was a **split-brain policy view**: `c` believed the grant authorized a direct write; `b` believed the grant required an approval witness. Both were correct relative to the policy version each had cached. The grant object carried `policy_ref: .../v7`, but neither side compared the *version* embedded in the grant against the *current* version served by the authorization engine at execution time. The version string was present and ignored. ## Condition of Validity A federated grant is safe to act on **only** when all of the following hold simultaneously at the moment of the action, not at the moment of negotiation: 1. **Temporal freshness:** `now ≤ asserted_at + ttl_seconds`, evaluated by the *consumer* against its own clock, with a bounded skew allowance (typically ≤ 30s) that is itself part of the negotiated policy — not assumed. 2. **Version pinning:** the `policy_ref` version in the grant equals the version currently advertised by the authoritative policy endpoint named in the chain. If the authoritative endpoint is unreachable, the grant degrades to *invalid*, not *valid-by-default*. 3. **Witness completeness:** any precondition the current policy version introduces (dual-approval, spend limit, scope narrowing) is satisfiable from state the consumer actually holds. A grant negotiated under `v7` that hits a `v8` precondition it cannot satisfy is *not* a grant to proceed; it is a signal to renegotiate. 4. **Atomicity of check-and-act:** the freshness and version checks must occur in the same critical section as the action, or the action must be idempotent and reversible. A check at `T` followed by an action at `T+Δ` is a TOCTOU window, and in federation `Δ` is not small. The invariant, stated compactly: **a federated grant is a lease, not a deed.** It must be re-validated at every use, and the re-validation must be against the authority named in the chain, not against the broker that relayed it. The broker's signature attests to *what it was told*, not to *what is currently true*. ## Decision Boundary The boundary that matters operationally is *when to reject versus when to renegotiate versus when to proceed*. The consuming instance must decide at each invocation: - **Proceed** only if freshness holds, the pinned policy version matches the live version, and all current-version preconditions are satisfied by held state. - **Renegotiate** if the version has advanced but the capability is still plausibly grantable — i.e., the drift is a tightening the consumer can satisfy by re-running negotiation. Renegotiation is the correct response to version drift, not silent continuation and not outright failure. - **Reject** if the authoritative policy endpoint is unreachable, if the version has advanced in a way that *removes* the capability, or if the grant's chain contains a hop whose signature cannot be verified against a currently-trusted key (key rotation mid-chain is a rejection, not a warning). The non-obvious part: **the default on uncertainty must be reject, not proceed.** Federated consumers are habitually optimistic because the negotiation already succeeded once and the grant object is signed. But a signed grant is evidence of a past negotiation, and the entire class of failures here lives in the gap between negotiation time and action time. An instance that cannot re-verify freshness and version must treat the grant as expired, because the alternative — proceeding on a lease it cannot confirm is still leased — is exactly the split-brain that produced the partial write above. A second boundary: **never cache a grant across a task checkpoint without re-validating on resume.** The grant's TTL is irrelevant to the checkpoint's lifetime. A cold-started agent that restores a grant from episodic memory inherits the original `asserted_at` and will compute freshness against a clock that has moved. This is the single most common way the staleness window is entered — not long-running single tasks, but checkpoint/resume cycles where the grant outlives the process that negotiated it. ## Operational Effect Enforcing the lease invariant changes three things in the agent's execution loop: First, the grant object must carry a **re-validation hook**, not just a signature. Every use of the grant routes through a `verify_current()` call that hits the authoritative policy endpoint (or a locally-cached, TTL-bounded mirror of it) and returns a tri-state: `CURRENT`, `STALE_RENEGOTIABLE`, `INVALID`. The enforcement point refuses to act on anything but `CURRENT`. Second, **version drift must surface as a typed event**, not a silent mismatch. When `verify_current()` detects that the pinned version has advanced, the consumer emits a `PolicyVersionDrift` event, halts the in-flight action, and initiates renegotiation. This is what converts the split-brain into a recoverable pause. Third, **partial writes must be gated behind the verification**, not issued optimistically and rolled back on rejection. In the observed failure, the write was issued before `b`'s rejection propagated; the fix is to require the approval witness *before* the local commit, which means the consumer must know the current-version preconditions *before* acting — which is exactly what `verify_current()` provides. The net effect: federated capability use becomes a sequence of re-validated leases rather than a single negotiated deed. Latency increases by one round-trip to the authoritative policy endpoint per action (amortizable via a short-TTL local mirror bounded by the grant's own TTL). The failure mode that motivated this — a grant that was valid, signed, and wrong — becomes structurally impossible to act on, because the instance never acts on a grant it has not just re-verified. ```python import time from dataclasses import dataclass from enum import Enum class FederatedGrantError(RuntimeError): """Raised when a federated capability grant cannot be locally re-verified.""" pass class GrantState(Enum): CURRENT = "current" STALE_RENEGOTIABLE = "stale_renegotiable" INVALID = "invalid" @dataclass class FederatedGrant: subject: str capability: str resource: str policy_ref: str # e.g. "orgB:policy/ledger-write/v7" asserted_at: float # epoch seconds ttl_seconds: int broker_sig: str chain: list def parse_policy_version(policy_ref: str) -> str: # policy_ref ends in "/vN"; the version is the last path segment return policy_ref.rsplit("/", 1)[-1] def verify_current(grant: FederatedGrant, live_policy_ref: str | None, clock_skew_allowance: float = 30.0, now: float | None = None) -> GrantState: """ Re-validate a federated grant against the authoritative policy endpoint. Returns a tri-state. The caller MUST refuse to act on anything other than CURRENT. Unreachable authority degrades to INVALID, never to CURRENT. """ now = time.time() if now is None else now # 1. Temporal freshness, evaluated by the consumer against its own clock. age = now - grant.asserted_at if age < -clock_skew_allowance: # Grant is from the future beyond allowed skew: clock or forgery issue. raise FederatedGrantError( f"grant asserted_at is {-age:.1f}s in the future, exceeds skew " f"allowance {clock_skew_allowance}s" ) if age > grant.ttl_seconds: return GrantState.INVALID # 2. Version pinning: authority unreachable is INVALID, not CURRENT. if live_policy_ref is None: return GrantState.INVALID pinned = parse_policy_version(grant.policy_ref) live = parse_policy_version(live_policy_ref) if pinned != live: # Drift: capability may still be grantable under the new version, # but the consumer must renegotiate preconditions it cannot see. return GrantState.STALE_RENEGOTIABLE # 3. Chain integrity: every hop must verify against a currently-trusted key. # (Signature verification elided; the invariant is that failure here is # a hard reject, not a warning.) if not grant.chain: raise FederatedGrantError("federated grant has empty trust chain") return GrantState.CURRENT def act_on_grant(grant: FederatedGrant, live_policy_ref: str | None, held_preconditions: set[str], required_preconditions: set[str], now: float | None = None) -> None: """ Execute an action gated on a federated grant. Must be called in the same critical section as the action itself (no check-then-act gap). """ state = verify_current(grant, live_policy_ref, now=now) if state is GrantState.INVALID: raise FederatedGrantError( f"grant for {grant.capability} on {grant.resource} is invalid: " f"expired or authority unreachable; refusing to act" ) if state is GrantState.STALE_RENEGOTIABLE: raise FederatedGrantError( f"grant pinned to {grant.policy_ref} but authority now serves " f"{live_policy_ref}; renegotiate before acting" ) missing = required_preconditions - held_preconditions if missing: raise FederatedGrantError( f"grant is current but missing preconditions {sorted(missing)}; " f"cannot satisfy current-version policy" ) # Only here — freshness, version, chain, and preconditions all confirmed # in the same critical section — is the action permitted. return None ```