pub trait Avc: Send + Sync {
// Required methods
fn decide(
&self,
subject: SubjectCtx,
object: ObjectCtx,
action: Action,
) -> Decision;
fn decide_with_token(
&self,
subject: SubjectCtx,
object: ObjectCtx,
action: Action,
token: &TokenScope,
) -> Decision;
fn flush(&self);
}Expand description
The Access Vector Cache interface — what the PEP (S2) calls per op.
TOTAL + fail-closed. decide returns a Decision for every call and never panics.
Required Methods§
Sourcefn decide(
&self,
subject: SubjectCtx,
object: ObjectCtx,
action: Action,
) -> Decision
fn decide( &self, subject: SubjectCtx, object: ObjectCtx, action: Action, ) -> Decision
Per-op decision. Hit → cached; miss → evaluate-and-cache. Fail-closed.
Sourcefn decide_with_token(
&self,
subject: SubjectCtx,
object: ObjectCtx,
action: Action,
token: &TokenScope,
) -> Decision
fn decide_with_token( &self, subject: SubjectCtx, object: ObjectCtx, action: Action, token: &TokenScope, ) -> Decision
Per-op decision additionally gated by a token scope (the distributed-AVC-entry path).
The result is Permit only if the PDP permits AND the token authorizes the action.
The label-ceiling comparison requires the lattice and is done by the PDP-side floor;
this method applies the op-set + ttl gate. Default-deny.