pub struct SecurityConfig {
pub enable_tls: bool,
pub cert_path: Option<String>,
pub key_path: Option<String>,
pub enable_constant_time: bool,
pub enable_ebpf_integrity: bool,
pub max_token_lifetime_ms: u64,
}Expand description
安全相关配置(TLS、常量时间比较、eBPF 完整性)。
Fields§
§enable_tls: bool是否启用 TLS 终止。
cert_path: Option<String>TLS 证书文件路径(启用 TLS 时必填)。
key_path: Option<String>TLS 私钥文件路径(启用 TLS 时必填)。
enable_constant_time: bool是否启用常量时间比较(防时序攻击)。
enable_ebpf_integrity: bool是否启用 eBPF 自身完整性校验。
max_token_lifetime_ms: u64令牌最大生命周期(毫秒)。
Implementations§
Trait Implementations§
Source§impl Clone for SecurityConfig
impl Clone for SecurityConfig
Source§fn clone(&self) -> SecurityConfig
fn clone(&self) -> SecurityConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SecurityConfig
impl Debug for SecurityConfig
Source§impl Default for SecurityConfig
impl Default for SecurityConfig
Source§fn default() -> SecurityConfig
fn default() -> SecurityConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SecurityConfig
impl<'de> Deserialize<'de> for SecurityConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SecurityConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SecurityConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for SecurityConfig
impl Serialize for SecurityConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for SecurityConfig
impl RefUnwindSafe for SecurityConfig
impl Send for SecurityConfig
impl Sync for SecurityConfig
impl Unpin for SecurityConfig
impl UnsafeUnpin for SecurityConfig
impl UnwindSafe for SecurityConfig
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