pub struct MonitorConfig {
pub audit_callback: Option<AuditCallback>,
pub audit_file: Option<Arc<Mutex<File>>>,
pub audit_enabled: bool,
pub ask_net: bool,
pub ask_fs_write: bool,
pub ask_sensitive_read: bool,
pub freeze_on_ask: bool,
pub approval_callback: Option<ApprovalCallback>,
}Expand description
Monitoring, interactive approval, and freeze-on-ask configuration for crate::VmConfig.
Fields§
§audit_callback: Option<AuditCallback>Emit audit events to this callback (in addition to audit_file if set).
audit_file: Option<Arc<Mutex<File>>>Optional pre-opened JSONL audit log file (opened before Landlock).
audit_enabled: boolEmit audit events even when no approval gates are enabled.
ask_net: boolRequire approval before opening outbound TCP connections (after static LAN/allowlist checks).
ask_fs_write: boolRequire approval before mutating files on mounted 9P directories (create, write, unlink, rename, mkdir).
ask_sensitive_read: boolRequire approval before opening sensitive credential-like paths (.env, .npmrc, .ssh, .aws, etc.) on mounted 9P dirs.
freeze_on_ask: boolAutomatically freeze the entire guest Linux VM while waiting on an interactive approval decision.
approval_callback: Option<ApprovalCallback>Optional synchronous callback for resolving approvals; when None, approvals wait on
crate::Vm::resolve_approval (used by NDJSON serve mode and async controllers).
Trait Implementations§
Source§impl Clone for MonitorConfig
impl Clone for MonitorConfig
Source§impl Debug for MonitorConfig
impl Debug for MonitorConfig
Auto Trait Implementations§
impl !RefUnwindSafe for MonitorConfig
impl !UnwindSafe for MonitorConfig
impl Forget for MonitorConfig
impl Freeze for MonitorConfigwhere
*const ArcInner<dyn Fn(AuditEvent) + Send + Sync> is !null: Freeze,
PhantomData<ArcInner<dyn Fn(AuditEvent) + Send + Sync>>: Freeze,
*const ArcInner<Mutex<File>> is !null: Freeze,
PhantomData<ArcInner<Mutex<File>>>: Freeze,
*const ArcInner<dyn Fn(&ApprovalRequest) -> ApprovalDecision + Send + Sync> is !null: Freeze,
PhantomData<ArcInner<dyn Fn(&ApprovalRequest) -> ApprovalDecision + Send + Sync>>: Freeze,
impl Move for MonitorConfig
impl Send for MonitorConfig
impl Sync for MonitorConfig
impl Unpin for MonitorConfig
impl UnsafeUnpin for MonitorConfigwhere
*const ArcInner<dyn Fn(AuditEvent) + Send + Sync> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Fn(AuditEvent) + Send + Sync>>: UnsafeUnpin,
*const ArcInner<Mutex<File>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<File>>>: UnsafeUnpin,
*const ArcInner<dyn Fn(&ApprovalRequest) -> ApprovalDecision + Send + Sync> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Fn(&ApprovalRequest) -> ApprovalDecision + Send + Sync>>: UnsafeUnpin,
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<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