pub struct GuardConfig { /* private fields */ }Expand description
Validated guard configuration. Build with GuardConfig::builder or take the
Default.
Implementations§
Source§impl GuardConfig
impl GuardConfig
Sourcepub fn builder() -> GuardConfigBuilder
pub fn builder() -> GuardConfigBuilder
Starts from the defaults.
Cookie attributes.
Sourcepub fn session_lifetime(&self) -> Duration
pub fn session_lifetime(&self) -> Duration
Absolute session lifetime.
Sourcepub fn idle_timeout(&self) -> Duration
pub fn idle_timeout(&self) -> Duration
Inactivity after which a session expires.
Sourcepub fn trusted_proxies(&self) -> &[IpNet]
pub fn trusted_proxies(&self) -> &[IpNet]
Proxies whose X-Forwarded-For is honoured.
Sourcepub fn tls_fingerprint_header(&self) -> Option<&str>
pub fn tls_fingerprint_header(&self) -> Option<&str>
Request header carrying a TLS fingerprint (e.g. JA4) set by the proxy, lowercase.
Sourcepub fn rotation(&self) -> RotationConfig
pub fn rotation(&self) -> RotationConfig
Rotation settings.
Sourcepub fn thresholds(&self) -> Thresholds
pub fn thresholds(&self) -> Thresholds
Score thresholds.
Sourcepub fn step_up_policy(&self) -> StepUpPolicy
pub fn step_up_policy(&self) -> StepUpPolicy
What a step-up decision does.
Sourcepub fn ping_pong_window(&self) -> Duration
pub fn ping_pong_window(&self) -> Duration
Window in which returning to the previous network counts as ping-pong.
Sourcepub fn last_seen_write_interval(&self) -> Duration
pub fn last_seen_write_interval(&self) -> Duration
How stale last_seen may get before an otherwise unchanged request writes it.
Sourcepub fn event_retention(&self) -> Duration
pub fn event_retention(&self) -> Duration
How long events are kept before Guard::purge_expired
deletes them.
Sourcepub fn minimize_stored_events(&self) -> bool
pub fn minimize_stored_events(&self) -> bool
Whether the store gets a reduced copy of each event; see
GuardConfigBuilder::minimize_stored_events.
Sourcepub fn keep_origin_client(&self) -> bool
pub fn keep_origin_client(&self) -> bool
Whether a session’s origin keeps the full IP, User-Agent and city; see
GuardConfigBuilder::keep_origin_client.
Sourcepub fn shadow_dedup_window(&self) -> Duration
pub fn shadow_dedup_window(&self) -> Duration
Window in which repeated shadow events for the same session and kind are dropped.
Sourcepub fn alert_dedup_window(&self) -> Duration
pub fn alert_dedup_window(&self) -> Duration
Window in which repeated security alerts for the same subject and kind skip the hook. Zero means off.
Sourcepub fn max_header_len(&self) -> usize
pub fn max_header_len(&self) -> usize
Maximum length of a header value considered for fingerprinting.
Sourcepub fn token_prefix(&self) -> Option<&str>
pub fn token_prefix(&self) -> Option<&str>
Prefix of issued tokens, if any.
Sourcepub fn orphan_reissue_window(&self) -> Option<Duration>
pub fn orphan_reissue_window(&self) -> Option<Duration>
How long after being superseded an orphaned token is still reissued, if limited.
Trait Implementations§
Source§impl Clone for GuardConfig
impl Clone for GuardConfig
Source§impl Debug for GuardConfig
impl Debug for GuardConfig
Auto Trait Implementations§
impl Freeze for GuardConfig
impl RefUnwindSafe for GuardConfig
impl Send for GuardConfig
impl Sync for GuardConfig
impl Unpin for GuardConfig
impl UnsafeUnpin for GuardConfig
impl UnwindSafe for GuardConfig
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> 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