pub struct LatticeTeEvaluator { /* private fields */ }Expand description
Concrete PDP: a compiled TeMatrix + the S1 Lattice policy object. Small, total,
allocation-free on the hot path. This is the verifiable TCB core.
The Lattice is held for well-formedness and column alignment, NOT for the per-op
order: the floor uses S1’s intrinsic SecurityLabel::can_access. The PDP’s generation
is bound to lattice.version().generation() at construction — the desync-proof binding
(#570): the same lattice bytes that minted a label’s compartment bits also tag the
compiled policy that evaluates it.
Implementations§
Source§impl LatticeTeEvaluator
impl LatticeTeEvaluator
Sourcepub fn new(matrix: TeMatrix, lattice: Lattice) -> Self
pub fn new(matrix: TeMatrix, lattice: Lattice) -> Self
Construct from a compiled matrix and the S1 lattice policy. The policy generation is taken from the lattice version — they are definitionally equal (#570 reconciliation): a compiled TE matrix is only valid against the lattice generation that minted its compartment bit assignments.
Sourcepub fn lattice(&self) -> &Lattice
pub fn lattice(&self) -> &Lattice
Borrow the lattice policy (column alignment / validation / re-serialization into the
signed CompiledPolicy).
Sourcepub fn compartment_columns(&self) -> &[Compartment]
pub fn compartment_columns(&self) -> &[Compartment]
The compartment vocabulary in canonical bit-index order (names()[i] is the
compartment interned at bit i). A TE-matrix builder / compiler aligns its
compartment columns to label bits by iterating this — NEVER by hardcoding compartment
names — so a column index always equals the CompartmentSet
bit a SecurityLabel carries.
Trait Implementations§
Source§impl TeEvaluator for LatticeTeEvaluator
impl TeEvaluator for LatticeTeEvaluator
Source§fn evaluate(
&self,
subject: SubjectCtx,
object: ObjectCtx,
action: Action,
) -> Decision
fn evaluate( &self, subject: SubjectCtx, object: ObjectCtx, action: Action, ) -> Decision
Permit requires BOTH; the floor can only deny.Source§fn generation(&self) -> u64
fn generation(&self) -> u64
LatticeVersion::generation].Auto Trait Implementations§
impl Freeze for LatticeTeEvaluator
impl RefUnwindSafe for LatticeTeEvaluator
impl Send for LatticeTeEvaluator
impl Sync for LatticeTeEvaluator
impl Unpin for LatticeTeEvaluator
impl UnsafeUnpin for LatticeTeEvaluator
impl UnwindSafe for LatticeTeEvaluator
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request