pub struct ActClaim {
pub sub: String,
pub clearance: Option<CredentialClearance>,
pub act: Option<Box<ActClaim>>,
}Expand description
RFC 8693 §4.1 actor claim — the two-principal carrier for delegated calls (#680/#681).
A delegated (on-behalf-of) token sets Claims::sub = the delegator
(source of authority, e.g. the user) and Claims::act = the actor that
signs the downstream envelope (e.g. service:mcp). This is delegation, not
impersonation: the actor holds no standing access, only the attenuated
authority the delegator granted it.
Composition (#681): the effective MAC clearance is meet(delegator, actor) on level/compartments — never either principal alone. The actor’s
authority-asserted clearance is carried here so the PDP can take the meet off
the one verified JWT. Like Claims::clearance it is authority-asserted
(the issuing node signs the JWT) and carries no assurance: assurance is
derived from the verified signer (the actor, who signs the downstream
envelope) and clamped DOWN at enforcement time — never trusted from this claim.
act MAY nest (act.act) for multi-hop delegation (RFC 8693 §4.1); each hop
composes into the meet. JWT-carried only (mirrors Claims::clearance):
not written to the Cap’n Proto envelope surface — read off the verified JWT by
the MAC PDP.
Fields§
§sub: StringThe actor’s subject identifier (e.g. service:mcp). At enforcement time
this MUST equal the verified downstream envelope signer (cnf): an actor
cannot claim to act as an identity whose key it does not hold — the
#680 anti-confused-deputy invariant.
clearance: Option<CredentialClearance>The actor’s authority-asserted MAC clearance, carried so #681 can take
meet(delegator, actor) without a second lookup. None ⇒ the actor is
unlabeled ⇒ the delegated derivation fails closed (no default
clearance for a missing principal; the S1 rule).
act: Option<Box<ActClaim>>Nested actor for multi-hop delegation (RFC 8693 §4.1). Boxed to keep
Claims sized. Each hop composes into the clearance meet.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ActClaim
impl<'de> Deserialize<'de> for ActClaim
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>,
impl Eq for ActClaim
impl StructuralPartialEq for ActClaim
Auto Trait Implementations§
impl Freeze for ActClaim
impl RefUnwindSafe for ActClaim
impl Send for ActClaim
impl Sync for ActClaim
impl Unpin for ActClaim
impl UnsafeUnpin for ActClaim
impl UnwindSafe for ActClaim
Blanket Implementations§
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
§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 more