pub struct SecurityConfig {
pub gateway_api_key: Option<String>,
pub allowed_read_paths: Vec<PathBuf>,
pub allowed_write_paths: Vec<PathBuf>,
pub approval_mode: String,
pub rate_limit_rpm: Option<u32>,
pub terminal_sandbox: TerminalSandbox,
pub terminal_sandbox_image: String,
pub terminal_sandbox_opts: Vec<String>,
}Expand description
Security-related settings grouped together (mirrors CompressionConfig / NetworkConfig pattern).
Fields§
§gateway_api_key: Option<String>Bearer token required on /chat* endpoints. None = open (warn at startup).
allowed_read_paths: Vec<PathBuf>Allowed root paths for read_file tool. Defaults to cwd + home.
allowed_write_paths: Vec<PathBuf>Allowed root paths for write_file tool. Defaults to cwd only.
approval_mode: StringCommand approval mode: “auto” | “smart” | “deny”. Default “smart”.
rate_limit_rpm: Option<u32>Per-IP rate limit in requests/minute. None = disabled.
terminal_sandbox: TerminalSandboxTerminal execution sandbox. Default “none” (direct host execution).
terminal_sandbox_image: StringDocker image used when terminal_sandbox = docker. Default “ubuntu:24.04”.
terminal_sandbox_opts: Vec<String>Extra docker run flags appended after the hardened defaults.
Example: ["--network=none", "--memory=512m", "--cpus=0.5"]
Trait Implementations§
Source§impl Clone for SecurityConfig
impl Clone for SecurityConfig
Source§fn clone(&self) -> SecurityConfig
fn clone(&self) -> SecurityConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SecurityConfig
impl Debug for SecurityConfig
Source§impl Default for SecurityConfig
impl Default for SecurityConfig
Source§impl<'de> Deserialize<'de> for SecurityConfig
impl<'de> Deserialize<'de> for SecurityConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SecurityConfig
impl RefUnwindSafe for SecurityConfig
impl Send for SecurityConfig
impl Sync for SecurityConfig
impl Unpin for SecurityConfig
impl UnsafeUnpin for SecurityConfig
impl UnwindSafe for SecurityConfig
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