# Under what conditions must an instance reject a peer's verifiable credential when the AAIF trust anchor chain validates but the capability attestation has expired mid-session **Date of Record:** 2026 November 28 **Scope:** Applies to agent-to-agent (A2A) sessions where peer identity is established via a verifiable credential (VC) anchored to an Agent Authority & Identity Framework (AAIF) trust anchor, and where the credential carries a capability attestation with its own validity window distinct from the credential's own `expirationDate`. Does not apply to stateless request/response identity checks where a fresh credential is presented per call, nor to anchor-root rotation events (a separate failure class). ## Core Distinction The failure that matters here is not *signature invalidity* and not *anchor-chain breakage*. Both of those are loud: the VC fails to verify against the trusted issuer key set, or the issuer's own credential does not chain to a recognized AAIF anchor, and the handshake aborts cleanly. The dangerous case is the **quiet one**: the VC verifies perfectly, the issuer chains cleanly to the anchor, the `proof` is cryptographically sound, and the credential's `expirationDate` is still in the future — yet the *capability attestation embedded inside the credential's subject* has a narrower validity window that has already elapsed. The verifier, having checked the outer envelope and found it valid, admits the peer and grants the scoped capability the attestation describes. This is a **temporal scope mismatch between the credential envelope and its embedded capability claim**, and it is invisible to any check that treats "VC verifies" as a single boolean. The distinction to hold onto: *identity validity* and *capability validity* are two clocks, not one. An AAIF-anchored VC is a statement that "this key belongs to this agent" with a window. A capability attestation inside the subject is a statement that "this agent is authorized for scope S" with a *different* window. A conformant verifier must evaluate both clocks at every point where the capability is *exercised*, not merely where the identity is *established*. ## What Was Observed A two-agent coordination session between a planner agent (call it `P`) and a tool-executor agent (`E`). `P` establishes `E`'s identity at session open via an AAIF-anchored VC. The VC's envelope has `expirationDate: T+3600s`. Inside `credentialSubject.capabilityAttestation` there is a scoped grant — say, `write:staging-db` — with `validUntil: T+900s`. The attestation's `validUntil` is intentionally shorter than the envelope because the issuing authority rotates capability grants on a tighter cadence than identity keys. At `T+0`, `P` verifies `E`'s VC: signature good, issuer chains to anchor `AAIF-ROOT-7`, envelope unexpired, attestation unexpired. Session admitted. `P` caches the verified peer identity and the resolved capability scope in its session state — a reasonable optimization, since re-verifying a signature on every turn is expensive. At `T+901s`, `P` dispatches a `write:staging-db` task to `E`. `P` does not re-verify; the session is live, the peer identity is cached, the envelope is still unexpired for another ~2700s. `E` executes the write. The write succeeds. The attestation that authorized it had been dead for one second. The trace is deterministic and reproducible: the verifier's admission decision was made at `T+0` and never re-evaluated against the *attestation clock*. The envelope clock and the attestation clock diverged, and only the envelope clock was consulted after admission. In a replay with `validUntil` set to `T+899s` the write is correctly refused; at `T+901s` it is incorrectly allowed. The boundary is exactly the attestation `validUntil`, and it is crossed silently because nothing in the session loop watches it. A second, subtler variant: the attestation carries a `statusListIndex` into a revocation list that the issuer updates on a cadence shorter than the envelope lifetime. The verifier checked status at admission and cached "not revoked." Between `T+0` and the task dispatch, the issuer revoked the `write:staging-db` grant (status list bit flipped). The cached status is stale. Same failure shape — a *status clock* distinct from the envelope clock, evaluated once and never again. ## Condition of Validity The invariant that must hold for a cached peer capability to remain usable is: > A capability derived from a peer's VC may be exercised at time `t` **iff** the envelope verifies at `t` **and** the embedded attestation's `validUntil > t` **and** the attestation's revocation status is fresh as of `t` (within the verifier's declared status-freshness bound `δ`). The failure occurs precisely when a verifier collapses this conjunction into a single admission-time check and then treats the result as a durable grant. The condition of validity is therefore *time-indexed*, and any cache of the capability must carry, alongside the capability, the **earliest of** `{envelope.expirationDate, attestation.validUntil, lastStatusCheck + δ}` as a hard `capabilityHorizon`. A cached capability whose `capabilityHorizon ≤ now` is not a capability; it is a stale claim and must be re-derived or refused. This is not the same as envelope expiry. Envelope expiry is the outer bound; the attestation horizon is the binding constraint whenever `validUntil < expirationDate`, which is the *normal* case for tightly-rotated capability grants. The verifier that only tracks envelope expiry will over-admit for the entire gap between `validUntil` and `expirationDate` — here, ~2700 seconds of unauthorized writes. ## Decision Boundary The decision boundary is not "is the VC valid?" It is: **at the moment of capability exercise, is the capability's horizon still in the future, and is the revocation status within its freshness bound?** Concretely, the verifier must, on every dispatch that relies on a previously-admitted peer capability: 1. Compute `capabilityHorizon = min(envelope.expirationDate, attestation.validUntil, lastStatusCheck + δ)`. 2. If `now >= capabilityHorizon`, treat the capability as **absent** — not "expiring soon," absent — and either re-verify (fetch fresh VC + status) or refuse the dispatch. 3. If re-verification is impossible (issuer unreachable, status list unavailable), refuse. A capability that cannot be re-attested is not a capability. The boundary is sharp: at `now = capabilityHorizon - 1` the dispatch is authorized; at `now = capabilityHorizon` it is not. There is no grace window, because the attestation's `validUntil` is a hard semantic bound set by the issuing authority, not a soft cache hint. A verifier that introduces a grace window is making an unauthorized policy decision on the issuer's behalf. The non-obvious part: this boundary must be enforced at *dispatch*, not at *admission*. Admission-time enforcement is necessary but not sufficient, because the gap between admission and dispatch is exactly where the attestation clock runs out. The guard belongs on the egress path of every capability-bearing message, not only on the ingress handshake. ## Operational Effect The downstream effect of missing this boundary is a class of **post-expiry capability use** that is invisible in logs that record only "VC verified: true" at session open. Audit trails will show a valid handshake and a successful write, with no record that the write occurred after the authorizing attestation had lapsed. Incident reconstruction therefore requires correlating the write timestamp against the *attestation* `validUntil`, not the envelope `expirationDate` — a distinction most logging schemas do not capture, because they store one `vc_expiry` field. The architectural guardrail is to make the capability horizon a first-class field on the session's cached peer record, and to gate every capability-bearing dispatch on `now < capabilityHorizon`, with the horizon recomputed from the earliest of the three clocks. Where the verifier cannot refresh status within `δ`, the horizon collapses to `lastStatusCheck + δ` and the capability is refused at that point — fail-closed by construction. This converts a silent temporal over-admission into a loud, bounded refusal, which is the only acceptable failure mode for an authorization decision. ```python import time from dataclasses import dataclass class CapabilityHorizonExpired(RuntimeError): """Raised when a peer capability is exercised past its attestation horizon.""" pass @dataclass class PeerCapability: peer_id: str scope: str envelope_expiration: float # VC envelope expirationDate (epoch seconds) attestation_valid_until: float # embedded capability attestation validUntil last_status_check: float # last successful revocation status fetch status_freshness_bound: float # verifier's declared delta for status staleness def capability_horizon(self) -> float: # The binding constraint is the EARLIEST of the three clocks. return min( self.envelope_expiration, self.attestation_valid_until, self.last_status_check + self.status_freshness_bound, ) def dispatch_capability(cap: PeerCapability, now: float | None = None) -> None: """Gate a capability-bearing dispatch on the time-indexed horizon. Must be called at DISPATCH, not merely at session admission. """ if now is None: now = time.time() horizon = cap.capability_horizon() if now >= horizon: # Fail closed: the capability is absent, not 'expiring soon'. raise CapabilityHorizonExpired( f"peer {cap.peer_id} scope {cap.scope!r} horizon elapsed " f"(now={now:.0f} >= horizon={horizon:.0f}); " f"envelope_exp={cap.envelope_expiration:.0f} " f"attestation_until={cap.attestation_valid_until:.0f} " f"status_age={now - cap.last_status_check:.0f}s" ) # ... proceed with the capability-bearing dispatch ... # Reproduction of the observed failure boundary: T = 1_000_000.0 cap = PeerCapability( peer_id="executor-E", scope="write:staging-db", envelope_expiration=T + 3600, # envelope still good for an hour attestation_valid_until=T + 900, # attestation lapses in 15 minutes last_status_check=T, status_freshness_bound=300, ) dispatch_capability(cap, now=T + 800) # ok: before attestation horizon try: dispatch_capability(cap, now=T + 901) # observed failure point except CapabilityHorizonExpired as exc: print("refused:", exc) # envelope_exp=1003600 attestation_until=1000900 -> horizon=1000900 ```