Struct ockam_abac::PolicyAccessControl
source · pub struct PolicyAccessControl { /* private fields */ }
Expand description
Evaluates a policy expression against an environment of attributes.
Attributes come from a pre-populated environment and are augmented by subject attributes from credential data.
Implementations§
source§impl PolicyAccessControl
impl PolicyAccessControl
sourcepub fn new(
policies: Arc<dyn PoliciesRepository>,
identity_attributes_repository: Arc<dyn IdentityAttributesRepository>,
resource: Resource,
action: Action,
env: Env
) -> Self
pub fn new( policies: Arc<dyn PoliciesRepository>, identity_attributes_repository: Arc<dyn IdentityAttributesRepository>, resource: Resource, action: Action, env: Env ) -> Self
Create a new PolicyAccessControl
.
The policy expression is evaluated by getting subject attributes from the given authenticated storage, adding them the given environment, which may already contain other resource, action or subject attributes.
Trait Implementations§
source§impl Debug for PolicyAccessControl
impl Debug for PolicyAccessControl
Debug implementation writing out the resource, action and initial environment
source§impl IncomingAccessControl for PolicyAccessControl
impl IncomingAccessControl for PolicyAccessControl
Return true if the message is allowed to pass, and false if not.
Auto Trait Implementations§
impl !RefUnwindSafe for PolicyAccessControl
impl Send for PolicyAccessControl
impl Sync for PolicyAccessControl
impl Unpin for PolicyAccessControl
impl !UnwindSafe for PolicyAccessControl
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