pub enum SecurityState {
Privileged,
CapabilitiesDropped,
SeccompApplied,
LandlockApplied,
Locked,
}Expand description
Security state machine matching Nucleus_Security_SecurityEnforcement.tla
State transitions: privileged -> capabilities_dropped -> seccomp_applied -> landlock_applied -> locked
Properties verified by TLA+ model:
- irreversible_lockdown: Once security layers are applied, can only move forward to locked
- defense_in_depth: Locked state requires capabilities dropped, seccomp applied, and landlock applied
- no_privilege_escalation: Cannot return to privileged state after dropping capabilities
Variants§
Privileged
Initial state with all privileges
CapabilitiesDropped
Capabilities have been dropped
SeccompApplied
Seccomp filter has been applied
LandlockApplied
Landlock filesystem policy has been applied
Locked
Final locked state - no further security changes possible
Trait Implementations§
Source§impl Clone for SecurityState
impl Clone for SecurityState
Source§fn clone(&self) -> SecurityState
fn clone(&self) -> SecurityState
Returns a duplicate 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 SecurityState
impl Debug for SecurityState
Source§impl PartialEq for SecurityState
impl PartialEq for SecurityState
Source§impl StateTransition for SecurityState
impl StateTransition for SecurityState
Source§fn can_transition_to(&self, next: &SecurityState) -> bool
fn can_transition_to(&self, next: &SecurityState) -> bool
Return
true if moving from self to next is a valid transition.Source§fn is_terminal(&self) -> bool
fn is_terminal(&self) -> bool
Return
true if this state is terminal (no forward transitions).Source§fn transition(self, next: Self) -> Result<Self>
fn transition(self, next: Self) -> Result<Self>
Attempt to transition, returning
Err(InvalidStateTransition) on failure.impl Copy for SecurityState
impl Eq for SecurityState
impl StructuralPartialEq for SecurityState
Auto Trait Implementations§
impl Freeze for SecurityState
impl RefUnwindSafe for SecurityState
impl Send for SecurityState
impl Sync for SecurityState
impl Unpin for SecurityState
impl UnsafeUnpin for SecurityState
impl UnwindSafe for SecurityState
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§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
Compare self to
key and return true if they are equal.