pub struct SessionConfig {
pub max_sessions: usize,
pub session_ttl_secs: u64,
pub idle_timeout_secs: u64,
pub cleanup_interval_secs: u64,
pub enable_ja4_binding: bool,
pub enable_ip_binding: bool,
pub ja4_mismatch_threshold: u32,
pub ip_change_window_secs: u64,
pub max_alerts_per_session: usize,
pub enabled: bool,
}Expand description
Configuration for SessionManager.
Fields§
§max_sessions: usizeMaximum number of sessions to track (LRU eviction when exceeded). Default: 50,000
session_ttl_secs: u64Session time-to-live in seconds (absolute expiration). Default: 3600 (1 hour)
idle_timeout_secs: u64Idle timeout in seconds (inactivity expiration). Default: 900 (15 minutes)
cleanup_interval_secs: u64Interval in seconds between cleanup cycles. Default: 300 (5 minutes)
enable_ja4_binding: boolEnable JA4 fingerprint binding for hijack detection. Default: true
enable_ip_binding: boolEnable IP binding for strict mode hijack detection. Default: false (can cause false positives for mobile users)
ja4_mismatch_threshold: u32Number of JA4 mismatches before alerting (0 = immediate). Default: 1 (immediate alert on mismatch)
ip_change_window_secs: u64Window in seconds to allow IP changes (for mobile/VPN users). Default: 60 seconds
max_alerts_per_session: usizeMaximum number of hijack alerts to store per session. Default: 10
enabled: boolWhether session tracking is enabled. Default: true
Trait Implementations§
Source§impl Clone for SessionConfig
impl Clone for SessionConfig
Source§fn clone(&self) -> SessionConfig
fn clone(&self) -> SessionConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SessionConfig
impl Debug for SessionConfig
Auto Trait Implementations§
impl Freeze for SessionConfig
impl RefUnwindSafe for SessionConfig
impl Send for SessionConfig
impl Sync for SessionConfig
impl Unpin for SessionConfig
impl UnsafeUnpin for SessionConfig
impl UnwindSafe for SessionConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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>
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>
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