pub struct SecuritySettings {
pub require_authentication: bool,
pub require_https: bool,
pub enable_audit_logging: bool,
pub jwt_expiry_seconds: u64,
pub rate_limit: RateLimitConfig,
pub cors: CorsConfig,
pub auto_generate_keys: bool,
pub validate_token_audience: bool,
}Expand description
Consolidated security settings
Fields§
§require_authentication: boolWhether authentication is required
require_https: boolWhether HTTPS is required
enable_audit_logging: boolWhether audit logging is enabled
jwt_expiry_seconds: u64JWT token expiry in seconds
rate_limit: RateLimitConfigRate limiting configuration
cors: CorsConfigCORS configuration
auto_generate_keys: boolWhether to auto-generate keys if not provided
validate_token_audience: boolWhether to validate JWT token audience
Implementations§
Source§impl SecuritySettings
impl SecuritySettings
Sourcepub fn for_profile(profile: &SecurityProfile) -> Self
pub fn for_profile(profile: &SecurityProfile) -> Self
Create settings for a specific profile
Sourcepub fn validate(&self) -> SecurityResult<()>
pub fn validate(&self) -> SecurityResult<()>
Validate the security settings
Sourcepub fn security_level_description(&self) -> &'static str
pub fn security_level_description(&self) -> &'static str
Get the security level description
Trait Implementations§
Source§impl Clone for SecuritySettings
impl Clone for SecuritySettings
Source§fn clone(&self) -> SecuritySettings
fn clone(&self) -> SecuritySettings
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 SecuritySettings
impl Debug for SecuritySettings
Source§impl Default for SecuritySettings
impl Default for SecuritySettings
Source§impl<'de> Deserialize<'de> for SecuritySettings
impl<'de> Deserialize<'de> for SecuritySettings
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 SecuritySettings
impl RefUnwindSafe for SecuritySettings
impl Send for SecuritySettings
impl Sync for SecuritySettings
impl Unpin for SecuritySettings
impl UnwindSafe for SecuritySettings
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