pub struct DelegationPrincipal {
pub subject_type: SubjectType,
pub subject_clearance: SecurityLabel,
}Expand description
The delegator principal recorded on a delegated (two-principal, #680/#681)
decision — the source of authority on whose behalf the record’s subject_*
(the effective, met context) was evaluated.
The audit record identifies principals by their resolved MAC context
(TE type + S1 clearance), never caller-asserted strings — the same grain as
AuditRecord’s subject_*. On the S6 grant path both this and the subject
carry the crate::mac::te::GRANT_PATH_SUBJECT sentinel type, and the
clearance is the distinguishing field.
Why the delegator and not the actor: the record’s subject_clearance is
already the effective meet(delegator, actor) clearance the PDP evaluated —
and its assurance is the actor’s (the meet clamps assurance to the
signer’s verified key material, #548/#681), so the actor’s contribution is
auditable directly on subject_*. The delegator is the missing half: the
user-attribution (#445) a confused-deputy call would otherwise lose. Both
source principals are therefore recoverable — the actor’s clearance
assurance from subject_clearance, the delegator here — and the effective
clearance the decision actually rested on is subject_clearance itself.
Fields§
§subject_type: SubjectTypeTE subject type of the delegator (SELinux domain); the grant path uses
the crate::mac::te::GRANT_PATH_SUBJECT sentinel.
subject_clearance: SecurityLabelThe delegator’s clearance label (S1). MAC provenance for the authority source.
Trait Implementations§
Source§impl Clone for DelegationPrincipal
impl Clone for DelegationPrincipal
Source§fn clone(&self) -> DelegationPrincipal
fn clone(&self) -> DelegationPrincipal
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 DelegationPrincipal
impl Debug for DelegationPrincipal
Source§impl<'de> Deserialize<'de> for DelegationPrincipal
impl<'de> Deserialize<'de> for DelegationPrincipal
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>,
Source§impl PartialEq for DelegationPrincipal
impl PartialEq for DelegationPrincipal
Source§fn eq(&self, other: &DelegationPrincipal) -> bool
fn eq(&self, other: &DelegationPrincipal) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for DelegationPrincipal
impl Serialize for DelegationPrincipal
impl Copy for DelegationPrincipal
impl Eq for DelegationPrincipal
impl StructuralPartialEq for DelegationPrincipal
Auto Trait Implementations§
impl Freeze for DelegationPrincipal
impl RefUnwindSafe for DelegationPrincipal
impl Send for DelegationPrincipal
impl Sync for DelegationPrincipal
impl Unpin for DelegationPrincipal
impl UnsafeUnpin for DelegationPrincipal
impl UnwindSafe for DelegationPrincipal
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§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> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request