Expand description
Content-addressed authority provenance — the portable semantic layer.
This is the mesh half of the Content-Addressed Authority Provenance design (PLAN step 1 / task #134). Software supply-chain security protects the provenance of artifacts that execute; this applies the same techniques to the provenance of the authority under which execution is permitted.
Four distinct proofs, never collapsed:
| Proof | Mechanism | Answers |
|---|---|---|
| Identity | AuthorityId/GrantId (CID) | is this the exact object? |
| Assertion | detached signature (crate::assertion::Assertion) | who vouched for it? |
| Authorization | attenuation algebra (check_derivation) | is this legal? |
| Enforcement | platform witness (agent-bridle) | what did the OS enforce? |
Scope of this module (deliberately portable): it owns Authority /
Grant and their typed CIDs, the resolved-authority lattice
(ResolvedScope / ResolvedAuthority), the ScopeRelation, the pure
admission decision (admit, the L3 BOUND law), and the verifier
contract (AttestationVerifier). It never learns a native fence format
(SBPL / Landlock / AppContainer) — agent-bridle projects its native fence
into a ResolvedAuthority and calls admit here.
The seven governing laws (each carries a proof obligation, discharged separately by the formal specs — task #137): L1 IDENTITY, L2 NON-EQUIVOCATION, L3 BOUND, L4 FLOOR, L5 PROVENANCE, L6 AUTHORIZATION, L7 FAIL-CLOSED. This module implements the executable form of L3/L6/L7 and the L1 typed-identity discipline.
Structs§
- Admission
Reject - The reason an admission is refused (L3 + L7): the axis whose resolved fence exceeded its bound, and how.
- Attestation
Id - The content identity of an operator Attestation (signing is deferred — the id is stable now so an Elevation edge can name it before the verifier lands).
- Authority
- A portable authority value: exactly the mesh
Caveatslattice, given a stable content identity for the first time. Introducing an identity, not a new authority model — Newt has noGranttype today; authority is a bareCaveats, soAuthorityIdis the first stable name a delegated authority ever gets. - Authority
Id - The content identity of an
Authorityvalue. - Authority
Mismatch - The two authority ids in an
BindError::AuthorityCidMismatch(boxed so the error variant stays small). - Deny
AllElevations - The fail-closed default verifier: rejects every elevation (L7). Signing is deferred (contract §8), so until a real operator-key verifier lands, no elevation edge is admissible — only attenuation (algebra) is.
- Grant
- A grant: a reference to an
Authorityvalue plus theDerivationthat justifies holding it. - GrantId
- The content identity of a
Grant(its authority-ref + derivation). - Resolved
Authority - Per-axis resolved authority for the four OS-confinement axes (the axes a
native fence governs;
max_calls/valid_for_generationare gate budget, not fence scope, and are out of this projection). - Resolved
Grant - A
Grantpaired with the exactAuthoritybody it names — and the pairing is only constructible when the body’s CID equals the grant’sauthorityfield. This is the whole point of content addressing: the caveats an edge is judged against are provably the caveats the grant commits to, not a body a buggy or hostile resolver substituted. Every function that reasons about a grant’s authority value takes aResolvedGrant, so the mismatch case is unrepresentable rather than merely checked-somewhere.
Enums§
- Admission
Decision - The admission decision (L3 BOUND).
Admitiff, on every axis, the fence’s resolved scope stays within the bounddelegated ∪ closure; any widening, incomparability, or undecidable comparison refuses fail-closed. - Bind
Error - Why an
Authoritybody could not be bound to aGrant. - Chain
Decision - Whether a derivation chain is trusted.
- Chain
Reject - Why a derivation chain is not trusted.
- Confined
Axis - The four OS-confinement axes (names an
AdmissionReject). - Derivation
- How a
Grantcame to hold its authority (the authorization proof — L6). - Derivation
Decision - Result of checking one derivation edge (L6 + L7).
- Derivation
Reject - Why a derivation edge is not valid.
- Resolved
Scope - What a native fence actually permits on ONE axis, expressed portably (the projection agent-bridle produces from its native profile). The lattice the L3 BOUND law is computed over — fidelity is never asserted.
- Scope
Relation - How a resolved scope stands relative to a bounding scope (does the fence stay within what was authorized?).
Traits§
- Attestation
Verifier - The verifier contract for operator Elevation attestations (L6). Real signature verification is provided downstream (agent-bridle / newt operator key); Phase A ships only the contract plus a fail-closed default.
Functions§
- admit
- The pure L3 admission decision. For every axis, the actually-permitted
authority (
resolved, projected from the native fence by agent-bridle) must be⊆the bounddelegated ∪ closure: - check_
derivation - Check a single derivation edge for
childagainst itsparent(L6). - empty_
closure - A no-authority closure (all axes deny/empty) — the common case where the harness adds nothing beyond the delegated grant.
- relate
- Relate a resolved fence scope to the bound it must stay within: does
resolved ⊆ bound? Returns the precise relation so a widening (ScopeRelation::Superset) is a distinct, reportable fact from an undecidable comparison (ScopeRelation::Unknown). Containment is per dimension:Bounded ⊆ Boundediff bothconcrete ⊆ concreteandclasses ⊆ classes. - verify_
chain - Verify a full derivation chain against an externally-trusted root (L5).