pub struct Principal {
pub name: String,
pub auth_method: AuthMethod,
pub groups: Vec<String>,
}Fields§
§name: String§auth_method: AuthMethod§groups: Vec<String>OAuth-derived group memberships from the listener’s
groupsClaim. Empty vec for non-OAuth principals (PLAIN/SCRAM/
mTLS/anonymous) and for OAuth principals whose listener has no
groupsClaim configured. No broker-side authorizer reads this
yet; populated as scaffolding + for observability.
Implementations§
Source§impl Principal
impl Principal
Sourcepub fn to_kafka(&self) -> KafkaPrincipal
pub fn to_kafka(&self) -> KafkaPrincipal
Project a runtime session Principal onto the Kafka wire-level
KafkaPrincipal (principalType:name) used by ACLs and
delegation-token records. All authenticated callers ride under
principal_type = "User", matching Kafka’s
DefaultKafkaPrincipalBuilder.
Trait Implementations§
impl Eq for Principal
impl StructuralPartialEq for Principal
Auto Trait Implementations§
impl Freeze for Principal
impl RefUnwindSafe for Principal
impl Send for Principal
impl Sync for Principal
impl Unpin for Principal
impl UnsafeUnpin for Principal
impl UnwindSafe for Principal
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