pub struct ClaimsSubjectContextResolver { /* private fields */ }Expand description
S8 (#574): the concrete SubjectContextResolver that does the real
two-input MAC context derivation.
Construct it with the subject’s verified [Claims] (carrying the
authority-asserted clearance field) and the [VerifiedKeyMaterial]
derived from the verified crypto (the DPoP proof key + the kid-anchored PQ
trust store binding, exactly what
EnvelopeContext::verified_key_material
computes). SubjectContextResolver::resolve then returns the assembled
[SecurityContext] — clearance clamped to the crypto-derived assurance.
The resolver matches audience_did against the claims’ subject (the
principal the clearance was issued to). A mismatch ⇒ None ⇒ deny: the
clearance cannot be borrowed across identities.
This is what flips S6 from deny-everything to actually-issuing-tokens for
verified subjects. For a fully-verified PQ subject (PqHybrid key material +
a clearance that dominates the object label), evaluate_grant permits; for
a classical-key subject on a PQ-required object, the clamped assurance
floors to Classical and the dominance check denies (fail-closed).
Implementations§
Source§impl ClaimsSubjectContextResolver
impl ClaimsSubjectContextResolver
Sourcepub fn new(
audience_did: impl Into<String>,
claims: Claims,
key_material: VerifiedKeyMaterial,
) -> Self
pub fn new( audience_did: impl Into<String>, claims: Claims, key_material: VerifiedKeyMaterial, ) -> Self
Construct a resolver for a single subject. claims is the subject’s
verified JWT claims (signed by the issuing node, so the clearance is
authority-asserted). key_material is the assurance derived from the
verified DPoP proof key + PQ trust store binding. audience_did is the
DID the clearance was issued to; a grant whose audience differs is
denied (the clearance cannot cross identities).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ClaimsSubjectContextResolver
impl RefUnwindSafe for ClaimsSubjectContextResolver
impl Send for ClaimsSubjectContextResolver
impl Sync for ClaimsSubjectContextResolver
impl Unpin for ClaimsSubjectContextResolver
impl UnsafeUnpin for ClaimsSubjectContextResolver
impl UnwindSafe for ClaimsSubjectContextResolver
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
§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