# Why does an instance accept a federated capability grant whose policy predicate it cannot evaluate locally? **Date of Record:** 2026 November 25 **Scope:** Applies to cross-org agent federation where an instance (the grantee) receives a capability token from a foreign trust domain bearing a policy predicate expressed in the issuer's policy language/vocabulary. Does not apply to single-org delegation where grantor and grantee share a policy engine and predicate vocabulary. ## Core Distinction The failure is not "the grantee trusted a malicious peer" and not "signature verification failed." Signatures verify *who* issued the grant; they say nothing about whether the grantee can *evaluate* the conditions attached to it. The sharp distinction is between **authenticated issuance** and **evaluable authorization**. A capability token can be cryptographically valid, correctly scoped to the grantee's identity, and still be semantically undecidable at the grantee — because the predicate references attributes, registries, or temporal operators defined only in the issuer's domain. When an instance cannot evaluate a predicate, the default implementation path is almost always `try: assert predicate(...) except Exception: allow` — or worse, the predicate is treated as an opaque string and silently dropped during deserialization, leaving a *narrower-looking* grant that is actually *wider*. The instance proceeds to act on a capability whose bounds it never checked. This is a fail-open on unevaluable policy, and it is invisible in logs because no exception is raised at the decision point — the predicate simply never ran. ## What Was Observed A grantee agent `G` in org Bravo received a capability token from org Alpha authorizing `read:telemetry` on Alpha's sensor registry. The token carried a predicate: ``` allow if subject.org_clearance >= resource.classification AND now() within issuer.business_hours("America/New_York") ``` Bravo's policy engine has no `org_clearance` attribute resolver (it uses `trust_tier`), no mapping from Alpha's classification enum to its own, and no timezone-aware `business_hours` operator. Three distinct evaluation gaps, all in one predicate. The observed trace: 1. `G` deserializes the token. Signature valid, audience matches `G`, expiry in 40 minutes. 2. Policy evaluator attempts `evaluate(predicate)`. Resolver for `org_clearance` returns `None` (attribute not in Bravo's schema). 3. The comparison `None >= ` raises `TypeError` inside the evaluator's sandbox. 4. The sandbox catches the exception, logs at DEBUG, and returns a sentinel `UNKNOWN`. 5. The grant-check function treats `UNKNOWN` as "not explicitly denied" → **allow**. 6. `G` reads telemetry classified at Alpha's highest tier, at 02:00 New York time, outside Alpha's business-hours window. Alpha's audit log shows a valid, in-window-looking access because the token's own policy was never re-checked on Alpha's side — Alpha trusted the grantee to enforce the predicate. Both sides believed the other was enforcing. This is a **policy-enforcement gap at the trust boundary**: the issuer assumed the predicate travels with the token and is enforced by the holder; the holder assumed an unevaluable predicate defaults to permissive. The compounding factor: capability discovery. `G` had learned of this capability via Alpha's discovery endpoint, which advertised `read:telemetry` with a `constraints` field as free-text prose ("subject to clearance and business-hours policy"). The machine-readable predicate arrived only in the token, at grant time, after `G` had already planned its task around the capability's *advertised* shape. The discovery-time contract and the grant-time contract diverged, and `G` had no step that reconciled them. ## Condition of Validity The invariant that must hold for cross-org interoperation to be sound: > A grantee MUST NOT execute under a capability whose policy predicate it cannot fully evaluate to a definite `ALLOW` or `DENY`. `UNKNOWN` is not `ALLOW`. Any predicate containing an unresolvable attribute, an unknown operator, or a foreign vocabulary term evaluates to `UNKNOWN`, and `UNKNOWN` MUST map to `DENY` (or to an explicit renegotiation request), never to permit. This is only valid if the issuer's predicate language is **closed under the grantee's evaluator** — i.e., every symbol in the predicate resolves in the grantee's environment. Where it is not closed, the grant is not usable as-is; it must be either (a) re-issued in a shared predicate dialect both parties can evaluate, or (b) accompanied by a **predicate attestation**: the issuer evaluates the predicate at grant time and at each use, and the grantee treats the token as a bearer of a *decision*, not a *rule*. Two supporting conditions: - **Discovery-grant parity.** The constraints advertised at discovery time must be the same object (or a lossless projection) as the predicate in the issued token. If discovery advertises prose and the token carries a formal predicate, the grantee has no basis to plan before grant, and any plan formed on the advertised shape is unsound. - **Fail-closed default in the evaluator sandbox.** The evaluator's exception handler must distinguish "predicate evaluated false" from "predicate could not be evaluated." Conflating them is the root mechanism. ## Decision Boundary The boundary is crossed at the moment the evaluator returns `UNKNOWN` and the caller chooses a default. There are exactly three sound dispositions and one unsound one: | Evaluator result | Sound disposition | |---|---| | `ALLOW` | proceed | | `DENY` | refuse, no retry | | `UNKNOWN` (unresolvable symbol) | refuse + emit renegotiation request to issuer | | `UNKNOWN` treated as allow | **unsound — the failure mode** | The renegotiation request is the load-bearing part. On `UNKNOWN`, the grantee should not merely refuse; it should send the issuer the list of unresolvable symbols so the issuer can either (a) re-issue a predicate in the shared dialect, or (b) begin attesting decisions. Without this feedback loop, the grantee is permanently unable to use any capability whose predicate it cannot parse, and operators will "fix" it by flipping the default back to allow — reintroducing the bug. The boundary is also temporal: a predicate that *was* evaluable can become unevaluable mid-grant if the issuer rotates its vocabulary or the grantee's attribute resolver goes stale. A grant that passed evaluation at issue time must be re-evaluated at use time, and a transition from `ALLOW` to `UNKNOWN` mid-grant is a hard stop, not a soft degradation. ## Operational Effect The immediate effect is silent over-privilege: the grantee acts outside the issuer's intended bounds while both audit logs look clean, because neither party ran the predicate. The lag between the over-privileged action and its discovery is typically one audit cycle, and discovery usually comes from the *resource owner* noticing anomalous access, not from either agent. The secondary effect is trust-domain erosion. Once an operator learns that foreign predicates "don't really work" and flips the default to allow to unblock a task, every subsequent grant from that domain inherits the fail-open posture, and the federation's security property degrades from "policy-bounded" to "signature-bounded" without any single decision that looks like a policy change. The guardrail is a **predicate closure check** at grant admission: before a token is accepted into the grantee's capability store, the grantee statically walks the predicate's symbol table against its own resolvers and operators. Any unresolved symbol rejects the token at admission with a renegotiation request — the token never reaches the execution path. This converts a runtime fail-open into an admission-time fail-closed, and it makes the unresolvable-symbol list a first-class artifact of the federation rather than a DEBUG log line. ```python from dataclasses import dataclass, field from enum import Enum from typing import Callable class PredicateClosureError(RuntimeError): """Raised when a federated capability predicate cannot be fully evaluated by the grantee's local policy engine.""" class Decision(Enum): ALLOW = "allow" DENY = "deny" UNKNOWN = "unknown" @dataclass class CapabilityGrant: issuer_domain: str grantee_id: str capability: str predicate_symbols: set[str] # symbols referenced by the predicate predicate: Callable[[dict], bool] @dataclass class GranteePolicyEngine: # Symbols this engine can resolve to a definite value. resolvers: set[str] = field(default_factory=set) operators: set[str] = field(default_factory=set) def closure_check(self, grant: CapabilityGrant) -> None: """Admission-time gate: reject grants with unresolvable symbols. Fails closed BEFORE the token enters the capability store.""" unresolvable = grant.predicate_symbols - (self.resolvers | self.operators) if unresolvable: raise PredicateClosureError( f"grant {grant.capability!r} from {grant.issuer_domain!r} " f"references symbols not evaluable locally: {sorted(unresolvable)}; " f"renegotiation required before use" ) def evaluate(self, grant: CapabilityGrant, env: dict) -> Decision: """Use-time evaluation. UNKNOWN must never collapse to ALLOW.""" try: result = grant.predicate(env) except (KeyError, TypeError, ValueError): # A symbol resolved at admission but failed at use time # (stale resolver, rotated vocabulary) -> hard stop. return Decision.UNKNOWN return Decision.ALLOW if result else Decision.DENY def admit_and_execute(self, grant: CapabilityGrant, env: dict) -> Decision: self.closure_check(grant) # fail-closed at admission decision = self.evaluate(grant, env) if decision is Decision.UNKNOWN: # Do NOT default to allow; surface for renegotiation. raise PredicateClosureError( f"predicate for {grant.capability!r} became unevaluable at use time; " f"grant suspended pending issuer re-attestation" ) return decision # --- demonstration of the failure mode being prevented --- def demo() -> None: engine = GranteePolicyEngine( resolvers={"trust_tier", "now"}, operators={">=", "within"}, ) # Foreign predicate references org_clearance (unknown to engine). foreign = CapabilityGrant( issuer_domain="alpha", grantee_id="bravo-agent-7", capability="read:telemetry", predicate_symbols={"org_clearance", "classification", "within"}, predicate=lambda env: env["org_clearance"] >= env["classification"], ) try: engine.admit_and_execute(foreign, env={}) except PredicateClosureError as e: print(f"BLOCKED (fail-closed): {e}") if __name__ == "__main__": demo() ```