Skip to main content

NamespaceAccessDecider

Trait NamespaceAccessDecider 

Source
pub trait NamespaceAccessDecider: Send + Sync {
    // Required method
    fn check(
        &self,
        ctx: Option<&SecurityContext>,
        object_label: Option<SecurityLabel>,
        action: NamespaceAction,
    ) -> MacDecision;
}
Expand description

Authorizes one direct-Namespace operation against the attempted subject context and object label.

Label resolution is centralized in NamespacePep::authorize (the reference monitor), which calls the injected RpcObjectLabelResolver and hands the result here. Missing clearance and missing labels are deliberately represented as None so the authoritative implementation in the hyprstream crate can write those fail-closed decisions to the same tamper-evident WAL as policy-floor denials. No deny may return before this audit boundary.

Required Methods§

Source

fn check( &self, ctx: Option<&SecurityContext>, object_label: Option<SecurityLabel>, action: NamespaceAction, ) -> MacDecision

Return the canonical MAC decision and record every outcome through the MAC audit sink.

None inputs are mandatory denials: an absent ctx means clearance could not be proven, while an absent object_label means the object is unlabeled. Implementations use bottom labels only as audit-schema placeholders; placeholders must never participate in authorization.

Implementors§

Source§

impl NamespaceAccessDecider for DenyAllNamespace

Available on non-WebAssembly only.