# How should an instance reconcile a federated AAIF trust anchor that attests a peer identity whose attested capability set silently widened between attestation issuance and warrant presentation **Date of Record:** 2026 November 30 **Scope:** Applies to cross-organizational agent federation where peer identities are established via AAIF (Agent Attestation & Identity Framework) mutual attestation and capabilities are carried as signed warrants referencing an attestation document. Does not apply to intra-org identity, OAuth token introspection, or cases where capability grants are re-issued per-request rather than bound to a long-lived attestation. ## Core Distinction The naive mental model of mutual attestation is: *I verify your attestation signature, I read your capability list, I check my policy, I accept.* This conflates two distinct trust questions that AAIF separates on paper but that federation implementations routinely fuse in code: 1. **Identity authenticity** — is this peer really the org-entity named in the attestation, verified by a signature chain rooted in a trust anchor both sides agreed on? 2. **Capability currency** — does the capability set attested *now* equal the capability set attested *when the anchor was established and my policy was calibrated to it*? The failure boundary is that a valid, unexpired, correctly-signed attestation can carry a *superset* of the capabilities it carried at anchor-formation time, and signature verification passes because nothing in the attestation binds the capability set to a fixed digest that the relying party pinned. The relying party's policy engine sees a cryptographically valid document and a capability it never consented to, and — because the capability is legitimately attested — no signature check, no expiry check, and no revocation check fires. The trust anchor is intact; the *semantic contract* the anchor represented has drifted underneath it. ## What Was Observed In a two-org federation (Org A relying party, Org B peer), the anchor was established with a mutual attestation exchange in which Org B's attestation document `ATT_B` listed capabilities `{read:inventory, query:pricing}`. Org A's policy was compiled against that set and cached a policy decision: *peer B may invoke `query:pricing` and read our inventory projection.* Org B later rotated its attestation document to `ATT_B'`. The rotation was legitimate — same key material, same issuer, extended `exp`, and the capability list was expanded to include `write:orders` (a new product Org B shipped). AAIF's rotation semantics, as commonly implemented, treat the attestation as a *whole-document* signed artifact: the new document is validly signed, the issuer chain validates, `exp` is in the future, and no revocation event exists for the *identity*. The capability set is an attribute *inside* the signed document, not a separately pinned commitment. When Org B's agent presented a warrant `W = {subject: B, cap: write:orders, ref: ATT_B'}` to Org A, Org A's verifier: - resolved `ATT_B'` by issuer + subject, - validated the signature chain to the shared anchor, - confirmed `ATT_B'` not expired and not revoked, - matched `W.cap` against `ATT_B'.capabilities` — present, - then checked policy: policy keyed on *identity* `B`, and the cached decision for `B` was "trusted peer, standard grants." The `write:orders` capability was authorized against a policy that had never seen it, because the policy cache was keyed on identity, not on `(identity, capability-set-digest)`. The relying party executed a state-mutating action on behalf of a capability expansion it never reviewed. The signature was valid at every step. This is not a forgery; it is *capability laundering through legitimate rotation*. The tell in logs: the verifier's decision record showed `attestation_id=ATT_B` (cached) while the warrant referenced `ATT_B'`, and the reconciliation step silently preferred the cached policy binding. The mismatch was visible but not enforced. ## Condition of Validity The invariant that must hold for the anchor to mean what the relying party thinks it means: > For any peer P, a warrant W is authorized only if the capability set attested in the attestation document W references is *subset-or-equal* to the capability set that was reviewed at anchor-formation time for P — **unless** a capability-set-delta review has been recorded and the delta reviewed. This requires the relying party to pin, at anchor formation, a commitment to the capability set — canonically, a digest over the sorted, normalized capability list — and to store it alongside the identity binding. The pin is not the attestation document (which rotates); it is `H(identity || sorted_capabilities || issuer || anchor_epoch)`. Every subsequent warrant verification must recompute that digest from the *referenced* attestation and compare against the pin. Equality → proceed under cached policy. Superset → **capability expansion event**, must block and route to review. Subset → proceed (narrowing is safe). Disjoint/conflicting → treat as identity re-establishment. The condition fails whenever the relying party keys policy on identity alone, or when the attestation format does not expose a stable canonicalization of the capability list (e.g., unordered JSON arrays, optional fields with differing defaults, or capability aliases that normalize differently across implementations). The invariant is only enforceable if both federating parties agree on the canonicalization function — a schema-negotiation obligation that AAIF leaves to the federation profile. ## Decision Boundary The precise line between "accept" and "halt and escalate" is the direction of the capability-set delta *relative to the pin*, evaluated before any policy lookup: - **Delta = ∅ (digest match):** accept, use cached policy. No human/automated review. - **Delta ⊂ pin (narrowing):** accept, but *invalidate* cached decisions for capabilities no longer attested — otherwise a later warrant referencing a stale cached grant for a now-removed capability could still resolve. Narrowing is safe only if the cache is pruned in the same transaction. - **Delta ⊃ pin (expansion):** **halt.** Do not execute. Emit a capability-expansion event carrying the full delta, the new attestation digest, the old pin, and the requesting warrant. Route to the anchor's review authority. Only after a recorded review that updates the pin may warrants referencing the new set proceed. - **Pin absent (first contact / anchor epoch bump):** treat as new anchor; require full review, not implicit trust. - **Canonicalization mismatch (digests computed under different normalization):** treat as expansion (fail-closed), because an unverifiable delta cannot be proven non-expanding. The boundary is *not* "signature invalid" — signature validity is necessary but orthogonal. The boundary is the digest comparison, and its default on ambiguity must be halt. ## Operational Effect Enforcing the pin changes the operational shape of federation in three ways: 1. **Rotation becomes a reviewable event, not a silent refresh.** Org B's legitimate capability expansion now produces a review ticket at Org A rather than an authorized write. This is the intended cost: cross-org trust is a reviewed contract, and rotation that widens the contract is a contract amendment. 2. **Policy caches must be keyed on `(identity, capability-set-digest)`,** not identity. A pin update invalidates the cache entry atomically. Without this, the pin check passes but a stale policy decision still fires. 3. **The federation profile must fix the canonicalization.** Two conformant AAIF implementations that sort capabilities differently will compute different digests for the same set and deadlock the federation in fail-closed mode. This is a real interoperability hazard; the profile must publish the exact normalization (sort order, casing, alias resolution, optional-field defaults) and both sides must version it. The residual risk after enforcement: an attacker who controls Org B's issuer key can rotate to an expanded set and *also* forge a review approval. The pin does not defend against issuer compromise — that is what anchor revocation and threshold attestation are for. The pin defends against *legitimate* issuer behavior that the relying party has not consented to, which is the far more common failure. ```python from dataclasses import dataclass from hashlib import sha256 from typing import FrozenSet class CapabilityExpansionUnreviewed(RuntimeError): """Raised when a presented attestation widens the pinned capability set without a recorded review. Fail-closed: do not execute the warrant.""" class CanonicalizationMismatch(RuntimeError): """Raised when the attestation's capability set cannot be canonicalized under the federation profile the pin was computed with.""" @dataclass(frozen=True) class AnchorPin: identity: str issuer: str anchor_epoch: int capability_digest: str # H(identity || sorted_caps || issuer || epoch) def canonical_digest(identity: str, issuer: str, epoch: int, capabilities: FrozenSet[str], profile_version: str = "aaif-fed/1") -> str: if not capabilities: raise CanonicalizationMismatch("empty capability set is not canonical") # Profile fixes: lowercase, strip, sort, join with \x1f, version-prefixed. norm = "\x1f".join(sorted(c.strip().lower() for c in capabilities)) payload = f"{profile_version}\x1e{identity}\x1e{issuer}\x1e{epoch}\x1e{norm}" return sha256(payload.encode("utf-8")).hexdigest() def verify_warrant(pin: AnchorPin, presented_identity: str, presented_issuer: str, presented_caps: FrozenSet[str], presented_epoch: int, signature_valid: bool) -> None: if not signature_valid: raise CapabilityExpansionUnreviewed("signature chain invalid; halt") if presented_identity != pin.identity or presented_issuer != pin.issuer: raise CapabilityExpansionUnreviewed( f"identity/issuer drift: pin={pin.identity}@{pin.issuer} " f"presented={presented_identity}@{presented_issuer}") if presented_epoch != pin.anchor_epoch: raise CapabilityExpansionUnreviewed( f"anchor epoch bump {pin.anchor_epoch}->{presented_epoch}; " "requires re-anchoring review") presented_digest = canonical_digest( presented_identity, presented_issuer, presented_epoch, presented_caps) if presented_digest == pin.capability_digest: return # exact match: cached policy is valid # Compute the delta to classify direction. pinned_caps = _caps_from_pin(pin) # profile-defined reconstruction delta = presented_caps - pinned_caps if not delta: return # narrowing: safe, but caller must prune cache raise CapabilityExpansionUnreviewed( f"capability expansion {sorted(delta)} not covered by pin " f"{pin.capability_digest[:12]}…; route to review before executing") ```