pub struct AbacAccessControl { /* private fields */ }
Expand description
This AccessControl uses a storage for authenticated attributes in order
to verify if a policy expression is valid
A similar access control policy is available as crate::policy::PolicyAccessControl
where
as crate::PoliciesRepository
can be used to retrieve a specific policy for a given resource and action
Implementations§
source§impl AbacAccessControl
impl AbacAccessControl
sourcepub fn new(
identity_attributes_repository: Arc<dyn IdentityAttributesRepository>,
expression: Expr,
environment: Env
) -> Self
pub fn new( identity_attributes_repository: Arc<dyn IdentityAttributesRepository>, expression: Expr, environment: Env ) -> Self
Create a new AccessControl using a specific policy for checking attributes
sourcepub fn create(
identity_attributes_repository: Arc<dyn IdentityAttributesRepository>,
attribute_name: &str,
attribute_value: &str
) -> AbacAccessControl
pub fn create( identity_attributes_repository: Arc<dyn IdentityAttributesRepository>, attribute_name: &str, attribute_value: &str ) -> AbacAccessControl
Create an AccessControl which will verify that the sender of a message has an authenticated attribute with the correct name and value
source§impl AbacAccessControl
impl AbacAccessControl
Returns true if the identity is authorized
Trait Implementations§
source§impl Debug for AbacAccessControl
impl Debug for AbacAccessControl
Debug implementation printing out the policy expression only
source§impl IncomingAccessControl for AbacAccessControl
impl IncomingAccessControl for AbacAccessControl
Returns true if the sender of the message is validated by the expression stored in AbacAccessControl
Auto Trait Implementations§
impl !RefUnwindSafe for AbacAccessControl
impl Send for AbacAccessControl
impl Sync for AbacAccessControl
impl Unpin for AbacAccessControl
impl !UnwindSafe for AbacAccessControl
Blanket Implementations§
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
Mutably borrows from an owned value. Read more