pub struct OtpConfig {
pub enabled: bool,
pub entropy_bits: u32,
pub ttl_seconds: u64,
pub max_usage: u32,
pub storage_backend: OtpStorageBackend,
pub ldap: Option<OtpLdapConfig>,
}Expand description
[otp] section — OTP enrollment authentication configuration.
[otp]
enabled = true
entropy_bits = 128
ttl_seconds = 3600
max_usage = 1
storage_backend = "db"Fields§
§enabled: boolEnable OTP-based enrollment authentication.
entropy_bits: u32Minimum entropy bits for generated OTPs.
NIST SP 800-63B requires at least 112 bits for authenticator secrets; the Kipuka default is 128 bits for a comfortable margin. Values below 128 are rejected during validation.
ttl_seconds: u64Time-to-live for OTPs in seconds.
After this duration, unused OTPs are automatically invalidated. Default: 3600 (1 hour).
max_usage: u32Maximum number of times an OTP can be used before it is consumed.
1 (the default) enforces single-use semantics. Values greater
than 1 allow re-enrollment within the TTL window (e.g., for
retry after transient failure).
storage_backend: OtpStorageBackendStorage backend for OTP records.
ldap: Option<OtpLdapConfig>LDAP connection configuration (required when storage_backend = "ldap").
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for OtpConfig
impl<'de> Deserialize<'de> for OtpConfig
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>,
Auto Trait Implementations§
impl Freeze for OtpConfig
impl RefUnwindSafe for OtpConfig
impl Send for OtpConfig
impl Sync for OtpConfig
impl Unpin for OtpConfig
impl UnsafeUnpin for OtpConfig
impl UnwindSafe for OtpConfig
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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