pub struct SecurityManager { /* private fields */ }Expand description
Comprehensive security manager integrating all security components
Implementations§
Source§impl SecurityManager
impl SecurityManager
Sourcepub async fn new(config: SecurityConfig) -> NetworkResult<Self>
pub async fn new(config: SecurityConfig) -> NetworkResult<Self>
Create new security manager
Sourcepub fn tls_manager(&self) -> Option<&EnhancedTlsManager>
pub fn tls_manager(&self) -> Option<&EnhancedTlsManager>
Get TLS manager
Get authorization manager
Sourcepub fn audit_logger(&self) -> &SecurityAuditLogger
pub fn audit_logger(&self) -> &SecurityAuditLogger
Get audit logger
Check if operation is authorized and log the attempt
Sourcepub async fn setup_default_roles(&self) -> NetworkResult<()>
pub async fn setup_default_roles(&self) -> NetworkResult<()>
Create default security roles
Sourcepub async fn log_security_event(
&self,
event_type: SecurityEventType,
_severity: EventSeverity,
user: Option<&User>,
description: String,
metadata: HashMap<String, String>,
) -> NetworkResult<()>
pub async fn log_security_event( &self, event_type: SecurityEventType, _severity: EventSeverity, user: Option<&User>, description: String, metadata: HashMap<String, String>, ) -> NetworkResult<()>
Log security event
Sourcepub async fn log_simple_security_event(
&self,
event_type: &str,
user_id: &str,
description: &str,
success: bool,
) -> NetworkResult<()>
pub async fn log_simple_security_event( &self, event_type: &str, user_id: &str, description: &str, success: bool, ) -> NetworkResult<()>
Log a simple security event
pub async fn get_security_stats(&self) -> SecurityStats
Sourcepub async fn validate_configuration(
&self,
) -> NetworkResult<SecurityValidationResult>
pub async fn validate_configuration( &self, ) -> NetworkResult<SecurityValidationResult>
Validate security configuration
Auto Trait Implementations§
impl !Freeze for SecurityManager
impl !RefUnwindSafe for SecurityManager
impl Send for SecurityManager
impl Sync for SecurityManager
impl Unpin for SecurityManager
impl !UnwindSafe for SecurityManager
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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