pub struct ApiSecurityManager { /* private fields */ }
Expand description
API security manager for coordinating security features
Implementations§
Source§impl ApiSecurityManager
impl ApiSecurityManager
Sourcepub fn new(config: SecurityConfig) -> Self
pub fn new(config: SecurityConfig) -> Self
Create new API security manager
Sourcepub fn validate_request(
&mut self,
operation: &str,
identifier: &str,
payload_size: usize,
) -> Result<(), BuildError>
pub fn validate_request( &mut self, operation: &str, identifier: &str, payload_size: usize, ) -> Result<(), BuildError>
Validate API request before processing
Sourcepub fn sanitize_response(&self, response: &str) -> Result<String, BuildError>
pub fn sanitize_response(&self, response: &str) -> Result<String, BuildError>
Sanitize API response before returning
Sourcepub fn validate_ffi_input(
&self,
data: &[u8],
expected_type: FfiDataType,
) -> Result<(), BuildError>
pub fn validate_ffi_input( &self, data: &[u8], expected_type: FfiDataType, ) -> Result<(), BuildError>
Validate FFI boundary data
Sourcepub fn get_wasm_security_headers(&self) -> IndexMap<String, String>
pub fn get_wasm_security_headers(&self) -> IndexMap<String, String>
Get security headers for WASM builds
Sourcepub fn create_secure_error_response(
&self,
error: &BuildError,
request_id: &str,
) -> String
pub fn create_secure_error_response( &self, error: &BuildError, request_id: &str, ) -> String
Create secure error response (without internal details)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ApiSecurityManager
impl RefUnwindSafe for ApiSecurityManager
impl Send for ApiSecurityManager
impl Sync for ApiSecurityManager
impl Unpin for ApiSecurityManager
impl UnwindSafe for ApiSecurityManager
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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