# How does an instance detect federation trust decay when capability grants outlive the policy that authorized them **Date of Record:** 2026 November 17 **Scope:** Applies to cross-org multi-agent federations where an agent instance holds a capability grant issued by a peer domain under a specific policy version, and that grant is cached or long-lived across sessions. Does not apply to single-org agent meshes with a shared policy authority, nor to federations that re-negotiate capabilities on every invocation (stateless grants). ## Core Distinction There are two distinct failure classes in federated capability negotiation, and operators routinely conflate them: 1. **Capability revocation** — the issuing domain explicitly withdraws a grant. This is observable: a signed revocation event propagates, or a re-validation call returns `denied`. Detection is a matter of listening or polling. 2. **Trust decay** — the issuing domain's *policy basis* for the grant changes (tightened scope, changed principal attributes, expired delegation chain, rotated signing key with narrower authority), but no revocation event is emitted because, from the issuer's perspective, the grant was never valid under the new policy. The grant token remains cryptographically intact and unexpired. The holder sees nothing. The non-obvious boundary: **a capability grant is a statement about a past policy evaluation, not a live assertion of current authority.** Federated agents that treat a valid, unexpired, correctly-signed grant as proof of present authorization are operating on a stale premise. The failure is silent because every local check — signature, expiry, audience, scope — passes. ## What Was Observed In a three-domain federation (issuer `A`, broker `B`, consumer `C`), agent instances in `C` cached grants from `A` with a 6-hour TTL, re-validating only on cache miss. Domain `A` tightened its delegation policy at 02:00, narrowing the attribute set under which its `data.read:pii` capability could be delegated to third parties. No revocation was issued: the policy engine considered prior delegations "not re-issued," not "revoked." Between 02:00 and 08:00, instances in `C` continued invoking `data.read:pii` on `A`'s resources using grants minted at 01:55. Every call succeeded at the *transport and signature layer* — `A`'s resource servers validated the token locally against cached public keys and did not re-consult the policy engine. The actual enforcement gap was in `A`, but the *detection* burden fell on `C`, which had no signal that its grants now encoded a superseded policy evaluation. The observable symptom was not an error. It was a **divergence in audit attribution**: `A`'s policy engine logged the accesses as "unauthorized under current policy" while `A`'s resource servers logged them as "authorized." Consumers in `C` saw only the second log. The instance had no way to distinguish "grant still valid" from "grant valid but orphaned from its policy basis." ## Condition of Validity A cached federated grant remains a valid basis for action only while all of the following hold: - The issuer's policy version referenced in the grant (or its delegation chain) is still the issuer's *effective* policy version for that principal and scope. - The delegation chain's intermediate authorities have not had their attribute sets narrowed. - The issuer's signing key has not been rotated under a policy that reduces the key's delegation authority. The instance cannot verify any of these from the grant alone. It must obtain an **out-of-band policy-version attestation** from the issuer — a signed statement binding `(principal, scope, policy_version, effective_at)` — and compare it against the version embedded in the grant. Absent that attestation, the grant's validity is *unfalsifiable* from the consumer side, which is not the same as *valid*. The practical invariant: **a grant whose policy basis cannot be re-attested within the freshness window must be treated as decayed, not as valid-by-default.** ## Decision Boundary The boundary between "safe to act" and "must re-attest" is not the grant's expiry. It is: ``` min(grant.expiry, policy_attestation.freshness_deadline) ``` If the issuer does not publish policy-version attestations, the consumer must impose its own freshness deadline (observed working value: 15 minutes for PII-scoped capabilities, 1 hour for read-only metadata) and treat staleness as decay. The failure mode to avoid is defaulting to `grant.expiry` as the sole horizon, because policy changes are not synchronized to grant lifetimes. A second boundary: **decay is per-scope, not per-grant.** A single token may carry multiple scopes; the issuer may have narrowed only one. The instance must re-attest per scope and degrade the grant's usable scope set, not discard the whole token. Discarding wholesale causes unnecessary availability loss; retaining wholesale causes the silent overreach observed above. ## Operational Effect Instances that implement policy-version attestation with per-scope freshness observe a characteristic pattern: a burst of `AttestationStale` events at the moment the issuer's policy changes, followed by successful re-negotiation at the narrowed scope. Instances that do not observe *nothing* until an audit reconciliation surfaces unauthorized accesses attributed to them — typically hours later, with the access already performed. The operational cost of the check is one signed attestation fetch per scope per freshness window, amortized across all grants sharing that `(principal, scope, policy_version)`. The cost of omitting it is unbounded: the consumer domain bears attribution for actions its grants no longer authorize, and the failure is undetectable from within the consumer's own logs. The correct posture is fail-closed on attestation *absence* and fail-degraded on attestation *narrowing* — never fail-open on the assumption that a valid signature implies a current policy basis. ```python import time from dataclasses import dataclass from typing import Optional class FederationTrustDecayError(RuntimeError): """Raised when a cached grant's policy basis can no longer be re-attested.""" pass @dataclass(frozen=True) class Grant: issuer: str principal: str scope: str policy_version: str expires_at: float @dataclass(frozen=True) class PolicyAttestation: issuer: str principal: str scope: str policy_version: str effective_at: float signed_at: float FRESHNESS_WINDOW = { "data.read:pii": 15 * 60, "data.read:meta": 60 * 60, } def usable_scopes( grant: Grant, attestation: Optional[PolicyAttestation], now: Optional[float] = None, ) -> set: now = now if now is not None else time.time() if now >= grant.expires_at: return set() if attestation is None: raise FederationTrustDecayError( f"no policy attestation for grant {grant.issuer}/{grant.principal} " f"scope={grant.scope} policy_version={grant.policy_version}; " f"treating as decayed (fail-closed)" ) if attestation.issuer != grant.issuer or attestation.principal != grant.principal: raise FederationTrustDecayError( f"attestation identity mismatch for grant {grant.issuer}/{grant.principal}" ) window = FRESHNESS_WINDOW.get(grant.scope) if window is None: raise FederationTrustDecayError( f"no freshness window defined for scope {grant.scope}; refusing to act" ) if now - attestation.signed_at > window: raise FederationTrustDecayError( f"attestation for {grant.scope} is stale " f"({now - attestation.signed_at:.0f}s > {window}s)" ) if attestation.policy_version != grant.policy_version: # Policy basis changed: degrade to empty scope set for this scope. return set() if attestation.effective_at > grant.expires_at: return set() return {grant.scope} ```