pub enum EgressNamespaceBlocker {
CapabilityGrantMissing,
KernelSupportMissing,
}Expand description
Why this host cannot give a capsule its own network namespace.
Exactly two variants, because they are the two things an operator can act on and their
remediations do not overlap: one is a permission this host withholds from the mur binary,
the other is a kernel that does not implement the mechanism at all. Collapsing them would send
half the readers to the wrong fix.
Deliberately not an EnforcementTier variant and deliberately not tied to
ContainmentClass: a network namespace is required for every Linux capsule that can spawn a
subprocess, at every containment class, so hanging it off the class ladder would make
advisory capsules silently exempt from this boundary.
Variants§
CapabilityGrantMissing
The kernel implements unprivileged user namespaces, but this host withholds them from this
binary: AppArmor’s restrict_unprivileged_userns is on and the shipped profile is not
confining mur, or unshare was refused outright (the container case), or the namespace
was created and could not then be owned or configured.
KernelSupportMissing
The kernel does not provide the mechanism at all — CONFIG_USER_NS=n, or
user.max_user_namespaces=0.
Implementations§
Source§impl EgressNamespaceBlocker
impl EgressNamespaceBlocker
Sourcepub const ALL: &'static [EgressNamespaceBlocker]
pub const ALL: &'static [EgressNamespaceBlocker]
Every variant, so a caller reasoning about refusal text cannot silently miss one. Same
convention as SealedBlocker::ALL, which was added there after a hand-maintained list
drifted the moment a variant appeared.
Sourcepub fn reason(self) -> String
pub fn reason(self) -> String
One sentence naming the missing mechanism, plus the exact remediation. Rendered into
crate::errors::RuntimeError::EgressNamespaceUnavailable, so this is the text an
operator sees under E-CAP-005.
Trait Implementations§
Source§impl Clone for EgressNamespaceBlocker
impl Clone for EgressNamespaceBlocker
impl Copy for EgressNamespaceBlocker
Source§impl Debug for EgressNamespaceBlocker
impl Debug for EgressNamespaceBlocker
impl Eq for EgressNamespaceBlocker
Source§impl Hash for EgressNamespaceBlocker
impl Hash for EgressNamespaceBlocker
Source§impl PartialEq for EgressNamespaceBlocker
impl PartialEq for EgressNamespaceBlocker
Source§impl Serialize for EgressNamespaceBlocker
impl Serialize for EgressNamespaceBlocker
impl StructuralPartialEq for EgressNamespaceBlocker
Auto Trait Implementations§
impl Freeze for EgressNamespaceBlocker
impl RefUnwindSafe for EgressNamespaceBlocker
impl Send for EgressNamespaceBlocker
impl Sync for EgressNamespaceBlocker
impl Unpin for EgressNamespaceBlocker
impl UnsafeUnpin for EgressNamespaceBlocker
impl UnwindSafe for EgressNamespaceBlocker
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more