pub struct GlobalPolicyChecker { /* private fields */ }
Expand description
Evaluates security policy globally across the entire Model and all components. This is used to enforce runtime capability routing restrictions across all components to prevent high privilleged capabilities from being routed to components outside of the list defined in the runtime security policy.
Implementations§
Source§impl GlobalPolicyChecker
impl GlobalPolicyChecker
Sourcepub fn new(policy: Arc<SecurityPolicy>) -> Self
pub fn new(policy: Arc<SecurityPolicy>) -> Self
Constructs a new PolicyChecker object configured by the SecurityPolicy.
Sourcepub fn can_route_capability<'a>(
&self,
capability_source: &'a CapabilitySource,
target_moniker: &'a Moniker,
) -> Result<(), PolicyError>
pub fn can_route_capability<'a>( &self, capability_source: &'a CapabilitySource, target_moniker: &'a Moniker, ) -> Result<(), PolicyError>
Returns Ok(()) if the provided capability source can be routed to the given target_moniker, else a descriptive PolicyError.
Sourcepub fn can_register_debug_capability<'a>(
&self,
capability_type: CapabilityTypeName,
name: &'a Name,
env_moniker: &'a Moniker,
env_name: &'a Name,
) -> Result<(), PolicyError>
pub fn can_register_debug_capability<'a>( &self, capability_type: CapabilityTypeName, name: &'a Name, env_moniker: &'a Moniker, env_name: &'a Name, ) -> Result<(), PolicyError>
Returns Ok(()) if the provided debug capability source is allowed to be routed from given environment.
Sourcepub fn reboot_on_terminate_allowed(
&self,
target_moniker: &Moniker,
) -> Result<(), PolicyError>
pub fn reboot_on_terminate_allowed( &self, target_moniker: &Moniker, ) -> Result<(), PolicyError>
Returns Ok(()) if target_moniker
is allowed to have on_terminate=REBOOT
set.
Trait Implementations§
Source§impl Clone for GlobalPolicyChecker
impl Clone for GlobalPolicyChecker
Source§fn clone(&self) -> GlobalPolicyChecker
fn clone(&self) -> GlobalPolicyChecker
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for GlobalPolicyChecker
impl Debug for GlobalPolicyChecker
Source§impl Default for GlobalPolicyChecker
impl Default for GlobalPolicyChecker
Source§fn default() -> GlobalPolicyChecker
fn default() -> GlobalPolicyChecker
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GlobalPolicyChecker
impl RefUnwindSafe for GlobalPolicyChecker
impl Send for GlobalPolicyChecker
impl Sync for GlobalPolicyChecker
impl Unpin for GlobalPolicyChecker
impl UnwindSafe for GlobalPolicyChecker
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)