Skip to main content

Module manifest

Module manifest 

Source
Expand description

The object-label seam — where an object’s content-bound label comes from.

Design §3: “Data layers: security_label in the content-addressed manifest — cryptographically bound; can’t be relabeled without changing the hash (stronger than SELinux xattrs).” The per-op monitor (S2) reads the object’s label from here and feeds it into subject.ctx ⊒ object.label.

§Why this is a trait, not a struct

The content-addressed CAS manifest layer does not exist yet in this codebase (the only “manifest” types today are OCI image manifests in hyprstream-workers and release/context manifests — none is the data-plane CAS manifest with a security_label). So S1 cannot fabricate it. Instead S1 defines:

  • LabeledObject — the seam the monitor (S2) and PDP (S4) program against: “give me this object’s label.” Implemented later by the real manifest type.
  • ContentBoundLabel — the binding contract a real manifest must honor: the label is covered by the content hash, so relabeling changes the CID.
  • StaticNodeLabel — the satisfiable-today case: static schema nodes (status/ctl/health) whose label is declared in the $scope annotation, not stored in a manifest. These can be labeled and enforced immediately.

This keeps the interface S2/S4 consume stable while honestly flagging the data-plane part as blocked (see module-level BLOCKERS in mod.rs).

Structs§

StaticNodeLabel
A static schema node’s label (status/ctl/health and other declared nodes).

Enums§

ObjectRef
A reference to the object being labeled, as available to whatever calls ObjectLabelResolver::resolve — before any object bytes are read. Mirrors the two carriers #699 actually has data for at this layer: a walked path (matches Mount::walk’s &[&str] component slice in hyprstream-vfs, without this crate depending on that crate) or a content identifier (a manifest CID / CAS hash).

Traits§

ContentBoundLabel
The binding contract a real CAS manifest must satisfy: the label is bound to the content hash, so an attacker cannot relabel without producing a new CID (and thus a new object). This is the property that makes the object label content-truth rather than a mutable xattr.
LabeledObject
Anything the reference monitor can ask for a security label.
ObjectLabelResolver
The keyed seam the reference monitor (S2/#568) calls before constructing an ObjectCtx for the PDP: “resolve this walked reference to its security label.” Distinct from LabeledObject (which answers for an object you already hold) — this answers for a reference you are about to walk.

Functions§

bind_time_label
Bind-time label clamp (#699 carrier c, D2 amendment ratified 2026-07-03): a client-controlled mount (the plan9 model — users compose their own namespaces) can label what it serves up but never down below what it can read, or a subject could read data at a high clearance through its own access and re-export it labeled low through its own mount — declassifying by re-serving.
import_label
Foreign-label import floor (#699, D1/D2 amendment ratified 2026-07-03): a label asserted by a federated peer — whether a manifest’s security_label or (per the D1 ruling) a remote node’s own capnp-schema-derived label — is a hint, not a guarantee, when we act as a client of that peer. It is trusted only as far as the peer’s own signer, never face-value across a domain boundary.