pub struct SecurityConfig {
pub allowed_tools: Vec<String>,
pub network_access: bool,
pub max_execution_time_secs: u64,
pub max_memory_mb: u64,
pub can_fork: bool,
pub max_audit_entries: usize,
pub auth_enabled: bool,
pub cors_origins: Vec<String>,
pub audit_log_path: Option<String>,
pub rate_limit_per_minute: u32,
}Expand description
Security/access control configuration (inspired by OWASP Agentic AI).
Fields§
§allowed_tools: Vec<String>Default allowed tools for agents (least privilege).
network_access: boolWhether agents can make network requests by default.
max_execution_time_secs: u64Maximum execution time in seconds for agent tasks.
max_memory_mb: u64Maximum memory in MB for agent tasks.
can_fork: boolWhether agents can fork sub-agents by default.
max_audit_entries: usizeMaximum audit log entries to retain.
auth_enabled: boolEnable API key authentication.
cors_origins: Vec<String>Allowed CORS origins.
audit_log_path: Option<String>Path for audit log file (optional, enables file-based persistence).
rate_limit_per_minute: u32Rate limit for API endpoints (requests per minute).
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