pub struct UserAttribution {
pub user_id: String,
pub user_email: String,
pub user_name: Option<String>,
pub service_account: Option<String>,
}Expand description
Resolved user attribution from gRPC metadata
Audit-only. Must never feed a ReadPolicy/ReadScope resolution. When
allow_delegation is true and no x-user-id/x-user-email is present, or when no
AuthService ran at all (:145-152 below), this struct’s fields fall back to
client-supplied or “unknown” values – that fallback is correct for its purpose (crediting a
query to a human on whose behalf a service account is acting) and would be a client-controlled
impersonation vector if it were ever used to decide what data a query may read. ReadScope
resolution must read AuthContext from the request extension instead.
Fields§
§user_id: StringThe resolved user identifier (from x-user-id or auth token)
user_email: StringThe resolved user email (from x-user-email or auth token)
user_name: Option<String>The display name from x-user-name header (if provided)
service_account: Option<String>Service account name when delegation is being used
Trait Implementations§
Source§impl Clone for UserAttribution
impl Clone for UserAttribution
Source§fn clone(&self) -> UserAttribution
fn clone(&self) -> UserAttribution
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UserAttribution
impl Debug for UserAttribution
impl Eq for UserAttribution
Source§impl PartialEq for UserAttribution
impl PartialEq for UserAttribution
impl StructuralPartialEq for UserAttribution
Auto Trait Implementations§
impl Freeze for UserAttribution
impl RefUnwindSafe for UserAttribution
impl Send for UserAttribution
impl Sync for UserAttribution
impl Unpin for UserAttribution
impl UnsafeUnpin for UserAttribution
impl UnwindSafe for UserAttribution
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].