pub struct CListPolicy { /* private fields */ }Expand description
CList (Capability List) policy backend.
Each object has a capability space listing the targets it can access and the operations it can perform. Data classifications map targets to exposure labels. Exposure rules define which targets are blocked when specific exposure labels are present.
Implementations§
Source§impl CListPolicy
impl CListPolicy
Sourcepub fn from_config(config: PolicyConfig) -> CListPolicy
pub fn from_config(config: PolicyConfig) -> CListPolicy
Create a CList policy from a parsed configuration.
Sourcepub fn from_toml(content: &str) -> Result<CListPolicy, PolicyConfigError>
pub fn from_toml(content: &str) -> Result<CListPolicy, PolicyConfigError>
Create a CList policy from a TOML string.
Sourcepub fn from_file(path: &Path) -> Result<CListPolicy, PolicyConfigError>
pub fn from_file(path: &Path) -> Result<CListPolicy, PolicyConfigError>
Create a CList policy from a TOML file.
Sourcepub fn empty() -> CListPolicy
pub fn empty() -> CListPolicy
Create an empty policy (useful for testing).
Trait Implementations§
Source§impl PolicyBackend for CListPolicy
impl PolicyBackend for CListPolicy
Source§fn evaluate(
&self,
subject: &ObjectId,
target: &ObjectId,
operation: &Operation,
exposure_labels: &[ExposureLabel],
) -> PolicyDecision
fn evaluate( &self, subject: &ObjectId, target: &ObjectId, operation: &Operation, exposure_labels: &[ExposureLabel], ) -> PolicyDecision
Evaluate whether a subject can access a target with the given operation,
considering any exposure labels from the subject’s context.
Source§fn classification(&self, target: &ObjectId) -> Vec<ExposureLabel>
fn classification(&self, target: &ObjectId) -> Vec<ExposureLabel>
Get the data classification (exposure labels) for a target. Read more
Source§fn list_grants(&self, subject: &ObjectId) -> Vec<CapabilityGrant>
fn list_grants(&self, subject: &ObjectId) -> Vec<CapabilityGrant>
List all capability grants for a subject (for introspection and audit).
Source§fn can_delegate(&self, subject: &ObjectId) -> bool
fn can_delegate(&self, subject: &ObjectId) -> bool
Check if a subject can delegate capabilities to other objects.
Auto Trait Implementations§
impl Freeze for CListPolicy
impl RefUnwindSafe for CListPolicy
impl Send for CListPolicy
impl Sync for CListPolicy
impl Unpin for CListPolicy
impl UnsafeUnpin for CListPolicy
impl UnwindSafe for CListPolicy
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