Skip to main content

TeEvaluator

Trait TeEvaluator 

Source
pub trait TeEvaluator: Send + Sync {
    // Required methods
    fn evaluate(
        &self,
        subject: SubjectCtx,
        object: ObjectCtx,
        action: Action,
    ) -> Decision;
    fn generation(&self) -> u64;
}
Expand description

The Policy Decision Point evaluator interface — what S2 (the PEP) calls per op.

Implementations are TOTAL and default-deny: every well-formed call returns a Decision and never panics. This is the clean contract the AVC wraps and S5/S6 produce policy for.

Required Methods§

Source

fn evaluate( &self, subject: SubjectCtx, object: ObjectCtx, action: Action, ) -> Decision

Evaluate one operation. TOTAL, default-deny. Conjoins the compiled TE decision with the independent lattice floor: a Permit requires BOTH; the floor can only deny.

Source

fn generation(&self) -> u64

The policy generation this evaluator answers for. The AVC tags cached entries with it so a policy reload invalidates stale decisions (no per-op staleness check beyond a generation-counter compare). Equals the embedded lattice’s [LatticeVersion::generation].

Implementors§