pub struct KerberosConfig {
pub service_principal: String,
pub realm: String,
pub keytab_path: Option<String>,
pub kdc_addresses: Vec<String>,
pub max_clock_skew_secs: u64,
pub allow_delegation: bool,
pub replay_cache_max_entries: usize,
}Expand description
Kerberos / SPNEGO configuration.
Fields§
§service_principal: StringService principal name (e.g. HTTP/server.example.com@REALM).
realm: StringKerberos realm (e.g. EXAMPLE.COM).
keytab_path: Option<String>Path to the keytab file.
kdc_addresses: Vec<String>KDC addresses for ticket verification.
max_clock_skew_secs: u64Maximum allowed clock skew (default: 300 seconds / 5 minutes).
allow_delegation: boolWhether to allow delegation (forwarded tickets).
replay_cache_max_entries: usizeMaximum replay cache entries before eviction.
Implementations§
Source§impl KerberosConfig
impl KerberosConfig
Sourcepub fn builder(
service_principal: impl Into<String>,
realm: impl Into<String>,
) -> KerberosConfigBuilder
pub fn builder( service_principal: impl Into<String>, realm: impl Into<String>, ) -> KerberosConfigBuilder
Start building a KerberosConfig with the two required fields.
All optional fields default to KerberosConfig::default() values.
Call .build() to validate and obtain
the finished config.
§Example
ⓘ
use auth_framework::protocols::kerberos::KerberosConfig;
let config = KerberosConfig::builder(
"HTTP/server.example.com@EXAMPLE.COM",
"EXAMPLE.COM",
)
.keytab_path("/etc/krb5.keytab")
.add_kdc("kdc1.example.com:88")
.add_kdc("kdc2.example.com:88")
.build();Trait Implementations§
Source§impl Clone for KerberosConfig
impl Clone for KerberosConfig
Source§fn clone(&self) -> KerberosConfig
fn clone(&self) -> KerberosConfig
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 KerberosConfig
impl Debug for KerberosConfig
Auto Trait Implementations§
impl Freeze for KerberosConfig
impl RefUnwindSafe for KerberosConfig
impl Send for KerberosConfig
impl Sync for KerberosConfig
impl Unpin for KerberosConfig
impl UnsafeUnpin for KerberosConfig
impl UnwindSafe for KerberosConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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