pub struct SecuritySettings {
pub default_policy: Option<String>,
pub rules: Vec<AuthorizationRule>,
pub policies: Vec<AuthorizationPolicy>,
pub field_auth: Vec<FieldAuthRule>,
pub enterprise: EnterpriseSecurityConfig,
pub error_sanitization: Option<ErrorSanitizationTomlConfig>,
pub rate_limiting: Option<RateLimitingSecurityConfig>,
pub state_encryption: Option<StateEncryptionConfig>,
pub pkce: Option<PkceConfig>,
pub api_keys: Option<ApiKeySecurityConfig>,
pub token_revocation: Option<TokenRevocationSecurityConfig>,
pub trusted_documents: Option<TrustedDocumentsConfig>,
}Expand description
Security configuration
Fields§
§default_policy: Option<String>Default policy to apply if none specified
rules: Vec<AuthorizationRule>Custom authorization rules
policies: Vec<AuthorizationPolicy>Authorization policies
field_auth: Vec<FieldAuthRule>Field-level authorization rules
enterprise: EnterpriseSecurityConfigEnterprise security configuration (legacy flags)
error_sanitization: Option<ErrorSanitizationTomlConfig>Error sanitization — controls what detail clients see in error responses
rate_limiting: Option<RateLimitingSecurityConfig>Rate limiting — per-endpoint request caps
state_encryption: Option<StateEncryptionConfig>State encryption — AEAD encryption for OAuth state and PKCE blobs
pkce: Option<PkceConfig>PKCE — Proof Key for Code Exchange for OAuth Authorization Code flows
api_keys: Option<ApiKeySecurityConfig>API key authentication — static or database-backed key-based auth
token_revocation: Option<TokenRevocationSecurityConfig>Token revocation — reject JWTs by jti after revocation
trusted_documents: Option<TrustedDocumentsConfig>Trusted documents — query allowlist (strict or permissive mode)
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 SecuritySettingswhere
SecuritySettings: Default,
impl<'de> Deserialize<'de> for SecuritySettingswhere
SecuritySettings: Default,
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 UnsafeUnpin 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
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>
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