Skip to main content

ActiveAuthorizer

Struct ActiveAuthorizer 

Source
pub struct ActiveAuthorizer { /* private fields */ }
Expand description

Engine authorizer reading live committed policy state (default-deny in PolicyEnforced mode). Implemented against the replicated keyspace.

Implementations§

Source§

impl ActiveAuthorizer

Source

pub fn new(store: Arc<Store>, tenant: TenantId) -> Self

Creates an authorizer that reads policy for tenant from store.

Trait Implementations§

Source§

impl Authorizer for ActiveAuthorizer

Source§

fn authorize_label(&self, label: &str) -> Result<(), String>

Authorizes writing a record under label against live policy state. Read more
Source§

fn authorize_rel_type(&self, rel_type: &str) -> Result<(), String>

Authorizes writing a relationship of rel_type against live policy. Read more
Source§

fn current_generation(&self) -> Result<u64, String>

Current committed policy generation; commit revalidates against this. Read more
Source§

fn authorize_label_in_txn( &self, label: &str, txn: &Txn<'_>, cap: u64, ) -> Result<(), String>

Admitted checks must use this transaction, not acquire another store view while writer/map locks are held. cap is the admitted predecessor. Read more
Source§

fn authorize_rel_type_in_txn( &self, rel_type: &str, txn: &Txn<'_>, cap: u64, ) -> Result<(), String>

Transactional counterpart of Authorizer::authorize_rel_type. Read more
Source§

fn current_generation_in_txn( &self, txn: &Txn<'_>, cap: u64, ) -> Result<u64, String>

Transactional counterpart of Authorizer::current_generation. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.