Skip to main content

Avc

Trait Avc 

Source
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§

Source

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

Per-op decision. Hit → cached; miss → evaluate-and-cache. Fail-closed.

Source

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.

Source

fn flush(&self)

Drop all cached decisions (e.g. on revocation broadcast). Generation rollover already invalidates implicitly; this is for explicit revocation (design §6 refresh path).

Implementors§

Source§

impl<A: Avc, S: AuditSink> Avc for AuditedAvc<A, S>

Source§

impl<E: TeEvaluator> Avc for CachingAvc<E>