pub struct PolicyDocument {
pub name: Option<String>,
pub network: Option<NetworkPolicy>,
pub capabilities: Option<CapabilitySet>,
pub tools: Vec<ToolRule>,
pub syscall_allowlist: Option<SyscallAllowlist>,
}Expand description
The canonical policy document shared across enforcement layers.
Fields§
§name: Option<String>Human-readable policy name (metadata.name).
network: Option<NetworkPolicy>Network egress policy.
capabilities: Option<CapabilitySet>Capability allow/deny floor for this policy scope.
tools: Vec<ToolRule>Per-tool rules, in declaration order.
syscall_allowlist: Option<SyscallAllowlist>Kernel syscall allowlist for this workload (AAASM-3624). When set, the
eBPF enforcement probe default-denies any syscall not listed for a
monitored PID. Lowered to SYSCALL_ALLOWLIST map entries by
AAASM-3635.
Implementations§
Source§impl PolicyDocument
impl PolicyDocument
Sourcepub fn denied_capabilities(&self) -> Vec<&Capability>
pub fn denied_capabilities(&self) -> Vec<&Capability>
Return the capability deny set, or an empty slice if unset.
Sourcepub fn egress_allowlist(&self) -> &[String]
pub fn egress_allowlist(&self) -> &[String]
Return the network egress allowlist, or an empty slice if unset.
Sourcepub fn allowed_syscalls(&self) -> Vec<Syscall>
pub fn allowed_syscalls(&self) -> Vec<Syscall>
Return the permitted syscalls, or an empty iterator if no syscall allowlist is set.
Trait Implementations§
Source§impl Clone for PolicyDocument
impl Clone for PolicyDocument
Source§fn clone(&self) -> PolicyDocument
fn clone(&self) -> PolicyDocument
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PolicyDocument
impl Debug for PolicyDocument
Source§impl Default for PolicyDocument
impl Default for PolicyDocument
Source§fn default() -> PolicyDocument
fn default() -> PolicyDocument
Returns the “default value” for a type. Read more
impl Eq for PolicyDocument
Source§impl PartialEq for PolicyDocument
impl PartialEq for PolicyDocument
impl StructuralPartialEq for PolicyDocument
Auto Trait Implementations§
impl Freeze for PolicyDocument
impl RefUnwindSafe for PolicyDocument
impl Send for PolicyDocument
impl Sync for PolicyDocument
impl Unpin for PolicyDocument
impl UnsafeUnpin for PolicyDocument
impl UnwindSafe for PolicyDocument
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