# How does an instance detect a capability-attestation replay across federated trust domains before executing a negotiated policy? **Date of Record:** 2026 November 27 **Scope:** Applies to cross-organization agent federations where a requesting agent (Origin Agent) negotiates a capability warrant with a remote Policy Authority (PA) in a foreign trust domain, then presents that warrant to a remote Executor Agent. Does not cover intra-org single-authority delegation or purely local tool-call authorization. ## Core Distinction The failure mode here is not a simple forged signature. It is a **valid-but-replayed capability warrant**: a correctly signed, correctly scoped attestation that was legitimately issued by a remote Policy Authority for one negotiation context, then re-presented by an Origin Agent in a *different* context—different task, different peer, different time window—that the issuing authority never saw. Signature verification and scope-string matching both pass, because both are true. The warrant is authentic. It is simply not *this* warrant for *this* moment. The distinction that matters operationally: **authenticity of a capability attestation is not the same as freshness of the negotiation that produced it.** Most federation stacks verify the first and assume it implies the second. It does not. A warrant is a snapshot of a decision made under a specific negotiation state (a nonce, a counterparty set, a policy version, a resource digest). Once the surrounding state drifts, the attestation becomes a stale authorization token that is indistinguishable, to a naive verifier, from a live one. ## What Was Observed In a federation of three trust domains—Origin (O), Policy Authority (P), and Executor (E)—the Origin Agent ran a two-phase negotiation: 1. **Phase A (negotiation):** O sends a `capability_request` to P containing a `negotiation_nonce`, the target resource digest `R`, and the intended peer set `{E}`. P returns a signed `Warrant` binding `(subject=O, resource=R, peers={E}, nonce=N, valid_until=T)`. 2. **Phase B (execution):** O presents the `Warrant` to E. E verifies P's signature against a cached JWKS, checks `resource` matches the requested digest, checks `valid_until > now`, and executes. The failure surfaced when O's orchestration layer retried a *failed* Phase B against a *different* executor E′ that had been added to the peer set mid-flight by a swarm coordinator. The warrant's `peers` field still read `{E}`. E′ accepted the warrant because its verification logic checked `subject`, `resource`, and `valid_until`—but treated `peers` as advisory metadata rather than a binding constraint, and had no way to confirm that *it* was the intended peer for *this* nonce. The result: a capability issued for one executor was exercised against another, across an org boundary, with a fully valid signature chain. Nothing in the verification path flagged it. A second, subtler variant appeared under clock skew. P issued warrants with `valid_until` computed on P's clock. E verified against E's clock. A 4-second skew extended the effective validity window enough that a warrant expired at P was still live at E, allowing a replay of a completed negotiation. ## Condition of Validity The invariant that *should* hold, and which the naive verifier silently violates, is: > A warrant is executable by peer `p` at time `t` only if the verifier can independently reconstruct the negotiation context `(nonce, peers, resource_digest, policy_version)` that P committed to, and confirm `p ∈ peers` and `t` falls within P's clock domain, not the verifier's. This condition fails when any of the following hold, and the verifier must treat each as a hard rejection rather than a warning: - The warrant's `peers` set does not contain the presenting executor (peer-set drift). - The `negotiation_nonce` is not present in the verifier's or a shared replay-cache's seen-set, or is present but bound to a different `(subject, resource)` tuple. - The `valid_until` cannot be normalized to a single clock domain—i.e., the verifier cannot establish that P's clock and its own are within a bounded skew `δ` smaller than the remaining validity margin. - The `policy_version` referenced by the warrant is no longer the version P's authority is currently attesting to, and no revocation record covers the gap. The condition is *not* satisfied merely because the signature is valid. Signature validity is necessary and insufficient. ## Decision Boundary The precise boundary between "execute" and "reject and renegotiate" is: - **Execute** only when the verifier holds a *locally reconstructable* binding between the warrant and the current request: same nonce, presenting peer in the committed peer set, resource digest match, and a clock-skew-adjusted `valid_until` with positive margin exceeding `2δ`. - **Reject and force renegotiation** when any binding field is missing or mismatched. Critically, the verifier must *not* fall back to "signature is valid, proceed"—that fallback is the bug. - **Quarantine and escalate** when the nonce is seen but bound to a different tuple: this is the signature of a replay and should trip an audit event, not a silent retry. The non-obvious part of the boundary: a *retry* of a failed Phase B is exactly the operation that most often crosses it, because retries reuse the original warrant while changing the peer or the time. The retry path must re-enter Phase A, not re-present Phase B's artifact. ## Operational Effect When the boundary is enforced, cross-org federation gains a property it otherwise lacks: **warrants become single-use per negotiation context**, and peer-set or clock drift cannot silently widen authorization. The cost is that every retry, every peer-set mutation, and every clock-skew event triggers a fresh negotiation round-trip to P—latency that naive designs avoid by caching warrants. That latency is the price of the invariant. When the boundary is *not* enforced, the observable symptoms are: cross-org actions attributed to the wrong executor, authorization that outlives its negotiation, and audit logs in which a valid signature exists for an action P never approved for that peer. These are hard to detect post-hoc because every individual artifact is internally consistent; only the *binding* between artifacts is broken. The guardrail is to make the binding explicit and machine-checkable at the verifier, and to treat any unbound warrant as unverified regardless of signature. ```python import time from dataclasses import dataclass class AttestationBindingError(RuntimeError): """Raised when a capability warrant is authentic but not bound to the current negotiation context (peer drift, nonce replay, or clock skew).""" @dataclass(frozen=True) class Warrant: subject: str resource_digest: str peers: frozenset nonce: str policy_version: str valid_until: float # in issuer (P) clock domain def verify_and_bind( warrant: Warrant, presenting_peer: str, requested_digest: str, seen_nonces: dict, issuer_clock_offset: float, max_skew: float, now_local: float, ) -> None: # 1. Peer-set binding: the presenting executor must be a committed peer. if presenting_peer not in warrant.peers: raise AttestationBindingError( f"peer {presenting_peer!r} not in committed peer set " f"{sorted(warrant.peers)!r} for nonce {warrant.nonce!r}" ) # 2. Resource binding: digest must match exactly, not just be present. if warrant.resource_digest != requested_digest: raise AttestationBindingError( f"resource digest mismatch: warrant={warrant.resource_digest!r} " f"request={requested_digest!r}" ) # 3. Nonce replay: a seen nonce bound to a different tuple is a replay. prior = seen_nonces.get(warrant.nonce) expected = (warrant.subject, warrant.resource_digest, warrant.peers) if prior is not None and prior != expected: raise AttestationBindingError( f"nonce {warrant.nonce!r} replayed against different binding: " f"prior={prior!r} now={expected!r}" ) # 4. Clock-domain normalization: convert issuer validity into local time. if abs(issuer_clock_offset) > max_skew: raise AttestationBindingError( f"issuer clock offset {issuer_clock_offset}s exceeds max skew " f"{max_skew}s; cannot normalize valid_until" ) local_valid_until = warrant.valid_until - issuer_clock_offset if now_local >= local_valid_until - max_skew: raise AttestationBindingError( f"warrant expired after skew adjustment: " f"local_valid_until={local_valid_until} now={now_local}" ) # 5. Commit the binding only after all checks pass. seen_nonces[warrant.nonce] = expected ```