# Which invariants prevent silent trust-domain collapse in cross-org agent credential federation **Date of Record:** 2026 November 23 **Scope:** Applies to federated multi-agent systems where an agent instance in org A presents a verifiable credential (VC) or SPIFFE-style SVID to an agent or tool in org B, and where the receiving side makes an authorization decision based on the *contents* of the credential rather than solely on the issuing trust anchor. Does not apply to single-org deployments with a shared trust root, nor to cases where the verifier re-resolves every claim against the issuer at decision time (full online introspection). ## Core Distinction The failure mode here is not "forged credential" (cryptographic verification catches that) and not "expired credential" (clock checks catch that). It is **semantic trust-domain collapse**: the verifier successfully validates the cryptographic envelope — signature chain, issuer trust anchor, expiry, audience — and then authorizes an action based on a claim whose *meaning* has drifted across the federation boundary. The credential is authentic. The claim is stale, over-broad, or reinterpreted. The verifier cannot tell the difference because it is validating form, not semantics. Concretely: org A issues an SVID to a sub-agent with the SPIFFE ID `spiffe://a.example/agents/researcher/child-7` and a VC asserting `capability: "read:knowledge-base"`. Org B's policy engine maps `read:knowledge-base` to its own internal concept of `kb:read`, which it grants to *any* holder of that string. Six weeks later, org A's platform team reparents `child-7` under a different workload that has delegated KB access to a broader set — but the VC is still issued with the same string, now scoped to a larger data set. Org B never re-reads the delegation chain; it cached the mapping. The credential validates perfectly. The sub-agent now reads org B's KB under a claim that meant something narrower when the federation was established. The invariant that prevents this: **a federated credential must be interpreted only in conjunction with a verifiable, versioned delegation chain whose leaves are re-validated on every decision, and whose claim vocabulary is bound to a signed ontology version that the verifier pins.** Any authorization decision that resolves a claim string without re-validating the chain and the ontology version is a trust-domain collapse waiting to happen. ## What Was Observed A two-org federation (call them *Issuer* and *Verifier*) ran a research-assistant swarm for eleven weeks. Issuer issued SVIDs to 340 sub-agent instances over the period; Verifier's policy engine cached credential→capability mappings in a local store refreshed every 24 hours. The mapping store was keyed on `(spiffe_id_prefix, claim_string)` — deliberately coarse to reduce lookup cost. At week 7, Issuer's platform team introduced a new delegation tier: `researcher` agents could now spawn `researcher/analyst` children that inherited a `read:knowledge-base` claim but with a `scope: "internal-only"` qualifier added to the VC's structured claim body. The qualifier was a new field, added to the VC schema under a minor version bump (`vc-schema: 2.3` from `2.2`). Issuer's own policy engine read the qualifier correctly. Verifier's cached mapping did not: its parser read only the `capability` string and ignored unknown fields, which is the correct behavior for forward compatibility but the wrong behavior for *authorization*. Over the next 72 hours, 41 analyst sub-agents from Issuer read 2,300 documents from Verifier's KB that were marked `external-restricted`. Each read was cryptographically valid. Each read passed the capability-string check. None of them should have been authorized. The failure was detected not by any security control but by a downstream auditor agent that noticed its own read counts were inconsistent with its siblings' — a *statistical* signal, not a *semantic* one. The federation had no mechanism to detect that the meaning of a claim had changed under it. Two secondary observations: 1. The Verifier's policy engine logged every authorization as `ALLOW` with `reason: capability_match`. There was no field distinguishing "matched a pinned ontology version" from "matched a string in a stale cache." The audit trail was cryptographically complete and semantically empty. 2. When the incident was reconstructed, Issuer's revocation endpoint had no record of the 41 analysts because Issuer considered them validly issued. Revocation is the wrong lever for this class of failure: nothing was compromised, so nothing was revocable. The credential was correct; the *interpretation* was wrong. ## Condition of Validity The invariant holds — and the failure is prevented — only when all four of the following are true simultaneously at the moment of the authorization decision: 1. **Chain re-validation.** The verifier resolves the presenting SVID's full delegation chain (root workload → intermediate → leaf) against the issuer's current trust bundle, not a cached bundle, and checks that every link's `parent_id` is still valid at the issuer. A reparented workload invalidates the leaf's prior chain even if the leaf's own SVID is unexpired. 2. **Ontology pinning.** The VC carries a signed `ontology_version` field, and the verifier's policy engine refuses to resolve any claim whose ontology version is not in its pinned allowlist. A minor version bump that adds a scope qualifier is a *breaking* change for authorization purposes and must be treated as such: unknown fields are not ignorable when they narrow scope. 3. **Claim-body binding.** The capability string and its qualifiers are hashed together and the hash is included in the VC's signed body. The verifier checks the hash against its own parse of the claim. If the verifier's parser drops a qualifier, the hash mismatches and the decision fails closed. 4. **Decision provenance.** Every `ALLOW` records the ontology version, the chain root, and the claim hash that produced it. A decision without provenance is not auditable and must be treated as `DENY` in any downstream aggregation. If any of the four is absent, the federation is operating in *implicit trust mode*: it is trusting that the issuer's claim vocabulary and the verifier's interpretation will not diverge. That trust is not an invariant. It is a hope with a signature attached. ## Decision Boundary The boundary between safe and unsafe federation is not "is the credential valid" but "**can the verifier prove, at decision time, that its interpretation of the claim matches the issuer's intent at issuance time?**" | Condition | Safe to authorize | Required action | |---|---|---| | Chain re-validated, ontology pinned, claim hash matches, provenance recorded | Yes | Proceed | | Chain re-validated, ontology pinned, claim hash matches, **no provenance** | No | Deny; log `MISSING_PROVENANCE`; alert | | Chain re-validated, ontology **version unknown** to verifier | No | Deny; log `ONTOLOGY_UNPINNED`; hold for human review | | Chain re-validated, claim hash **mismatch** (verifier parsed fewer fields than issuer signed) | No | Deny; log `CLAIM_TRUNCATION`; treat as potential injection | | Chain **stale** (cached bundle, leaf reparented at issuer) | No | Deny; force bundle refresh; re-evaluate | | Any of the above, but decision is `DENY` and the agent is in a retry loop | No | Deny with backoff; do not let retries mask the boundary | The subtle case is the third row: an unknown ontology version. The tempting default is to fail open ("we don't recognize the version, but the signature is valid, so allow"). That default is exactly what produced the 2,300-document leak. **Unknown ontology version is a fail-closed condition**, because the verifier cannot distinguish "new version, same semantics" from "new version, narrowed semantics." The cost of a false deny is a retry; the cost of a false allow is a trust-domain collapse. ## Operational Effect The practical consequence is that cross-org federation must be treated as a *continuously re-validated* relationship, not a one-time handshake. The handshake establishes the trust anchor; the invariant is maintained by re-checking the chain, the ontology pin, and the claim hash on every decision — or, at minimum, on every decision whose cached inputs are older than the issuer's delegation-change propagation window. Three operational rules follow: 1. **Cache invalidation must be driven by the issuer, not the clock.** A 24-hour TTL on a credential→capability mapping is a 24-hour window in which a reparenting at the issuer is invisible to the verifier. The issuer must publish a signed `delegation_epoch` that increments on any chain change, and the verifier must reject decisions made against a stale epoch. Clock-based TTLs are a performance optimization, not a security control. 2. **Revocation is the wrong lever for semantic drift.** Build a separate *ontology revocation* channel: when the issuer bumps the ontology version, it publishes a signed notice, and verifiers must re-pin before the next decision. This is distinct from credential revocation and must not share its code path, because the two have different blast radii and different response times. 3. **Audit logs must carry semantic provenance.** An `ALLOW` log line that records only `capability_match` is not auditable for this failure class. It must record the ontology version, the chain root, the claim hash, and the delegation epoch. Without these, incident reconstruction is a forensic exercise in guessing which interpretation was in force. The deepest lesson is that cryptographic validity and semantic validity are orthogonal properties, and federation protocols that check only the first will silently grant the second. The invariant is not "verify the signature." It is "verify that the signature was made over a claim whose meaning the verifier can still reconstruct." ```python from __future__ import annotations import hashlib from dataclasses import dataclass, field from datetime import datetime, timezone from typing import Mapping class TrustDomainCollapseError(RuntimeError): """Raised when a federated credential is cryptographically valid but its claim semantics cannot be proven to match the issuer's intent at decision time. This is a fail-closed condition, not a recoverable retry.""" @dataclass(frozen=True) class DelegationChain: root_workload: str links: tuple[str, ...] # root -> ... -> leaf delegation_epoch: int # issuer-incremented on any chain change valid_at_issuer: bool @dataclass(frozen=True) class VerifiableCredential: spiffe_id: str capability: str qualifiers: Mapping[str, str] ontology_version: str claim_hash: str # hash over (capability, sorted qualifiers) signed_body: bytes # what the issuer actually signed @dataclass class FederationPolicy: pinned_ontology_versions: frozenset[str] known_delegation_epochs: frozenset[int] cache_ttl_seconds: int = 86_400 def _claim_hash(capability: str, qualifiers: Mapping[str, str]) -> str: payload = capability + "|" + "|".join(f"{k}={v}" for k, v in sorted(qualifiers.items())) return hashlib.sha256(payload.encode()).hexdigest() def authorize( vc: VerifiableCredential, chain: DelegationChain, policy: FederationPolicy, *, now: datetime | None = None, ) -> bool: now = now or datetime.now(timezone.utc) # 1. Chain must be valid at the issuer *now*, not at cache time. if not chain.valid_at_issuer: raise TrustDomainCollapseError( f"delegation chain for {vc.spiffe_id} invalid at issuer; " f"reparenting likely — refusing to authorize" ) if chain.links[-1] != vc.spiffe_id: raise TrustDomainCollapseError( f"leaf mismatch: chain ends at {chain.links[-1]}, VC presented for {vc.spiffe_id}" ) # 2. Delegation epoch must be known — clock TTL is not a substitute. if chain.delegation_epoch not in policy.known_delegation_epochs: raise TrustDomainCollapseError( f"unknown delegation epoch {chain.delegation_epoch}; " f"issuer may have reparented since last sync — fail closed" ) # 3. Ontology must be pinned. Unknown version is NOT forward-compatible # for authorization: a minor bump may narrow scope. if vc.ontology_version not in policy.pinned_ontology_versions: raise TrustDomainCollapseError( f"ontology version {vc.ontology_version} not pinned; " f"cannot distinguish same-semantics from narrowed-semantics bump" ) # 4. Claim hash must match the verifier's own parse. If the verifier's # parser dropped a qualifier (e.g. scope: internal-only), the hash # will mismatch and we fail closed instead of silently over-granting. recomputed = _claim_hash(vc.capability, vc.qualifiers) if recomputed != vc.claim_hash: raise TrustDomainCollapseError( f"claim hash mismatch for {vc.spiffe_id}: " f"signed={vc.claim_hash[:12]} parsed={recomputed[:12]} — " f"verifier likely truncated qualifiers (CLAIM_TRUNCATION)" ) # Decision provenance is mandatory; a decision without it is not auditable. _record_decision( spiffe_id=vc.spiffe_id, ontology_version=vc.ontology_version, chain_root=chain.root_workload, claim_hash=vc.claim_hash, delegation_epoch=chain.delegation_epoch, decision="ALLOW", at=now, ) return True def _record_decision(**fields) -> None: # In production this writes to an append-only audit sink. The point is # that the record carries semantic provenance, not just "capability_match". if not fields.get("claim_hash") or not fields.get("ontology_version"): raise TrustDomainCollapseError( "refusing to emit decision without semantic provenance" ) ```