Expand description
CAS-native MAC Policy Enforcement Point (#1270, epic #1267 T3).
The CAS data plane — substrate ingest, CasMount read, registry streaming
continuation, and xet HTTP — had no native-MAC PEP and no trusted label
at seal (T2 audit .fleet-coord/mac-pep-audit.md, rows “CAS substrate
ingest” / “CAS substrate read” / “CasMount object/xorb open/read/stat” /
“Registry CAS read continuation” / “Xet HTTP CAS read”). Every read was
either unmediated or gated only by BootstrapCasAuthorizer (“any
authenticated caller”), with labels caller-asserted or absent.
This module provides the CAS-plane PEP that all CAS read paths consume. It
uses the canonical RPC MAC contract’s MacDecision, MacDenyReason,
and RpcObjectLabelResolver seam while deliberately not implementing
MacDispatchPep, whose
EnvelopeContext input is RPC-plane-specific.
-
Trusted content-bound label at seal (
domain_label/seal_label): derived from theDedupDomain’s structural properties (trust boundary → level axis), not caller-asserted. The domain is the content’s provenance — it encodes where the content lives (local vs shared-remote) and which tenant it belongs to (compartment). The staging path’s joined hint label is a D1 hint trusted only from our own ingest service; the domain label is authoritative and the effective seal label is the restrict-onlyjoinof the two. -
Clearance-input seam (
CasClearanceSource): consumes authority-bound subject +verified_tenantinputs. Until a production CAS adapter is installed,DenyAllClearanceSourcereturnsNonefor every subject — fail-closed, never a permissive default. There is no permissive mode (per #547). -
Per-op enforcement (
CasPep): resolves the subject clearance via the seam, checksclearance.can_access(object_label), and records every decision through the existing tamper-evident MAC audit sink. Missing subject, missing clearance, missing label, or audit failure → deny. -
CasMountintegration (MacCasAuthorizer): implementsCasMountAuthorizerso that the existing per-op authorization hook inCasMount::open/read/statdelegates to the MAC PEP without adding a new enforcement surface.
§What this module does NOT do
-
It does not author, derive, or enforce MAC policy from the
Compartmentstring inDedupDomain— that requires lattice internment which lives in the policy layer. Compartment isolation is already structural (distinct physical storage roots per domain); the label’s level axis is the load-bearing enforcement here. Enriching the seal label with compartment bits via the lattice is a follow-up gated on threading the lattice to the CAS layer. -
It does not fake a clearance for any subject. If the clearance source returns
None, the installed PEP denies. The #698 clearance primitives have landed, but a plane-specific adapter must still be installed before a CAS subject can pass.
Structs§
- CasObject
Label Resolver - Adapt a trusted CAS carrier label to the canonical object-label resolver.
- CasPep
- The CAS MAC Policy Enforcement Point.
- Deny
AllClearance Source - Fail-closed clearance source: denies every subject.
- MacCas
Authorizer - A [
CasMountAuthorizer] backed by the CAS MAC PEP. - Verified
Claims CasClearance Source - Production CAS clearance source backed only by contexts derived from
verified
Claims × VerifiedKeyMaterialat an RPC/attach boundary.
Traits§
- CasClearance
Source - Resolve a verified subject identity to a MAC
SecurityContextfor CAS access.
Functions§
- domain_
label - Derive a trusted, content-bound
SecurityLabelfrom aDedupDomain. - production_
cas_ pep - Assemble the production CAS PEP from verified subject contexts and a tamper-evident signed WAL. Failure to obtain either signing key aborts the production constructor; it never substitutes the test-only null sink.
- seal_
label - Compute the effective seal label:
join(domain_label(domain), hint).