pub trait SubjectContextClaims {
// Required method
fn credential_clearance(&self) -> Option<CredentialClearance>;
// Provided method
fn security_context(
&self,
key_material: VerifiedKeyMaterial,
) -> Option<SecurityContext> { ... }
}Expand description
Seam for carrying a subject clearance on the verified claims/envelope.
S1 defines the shape of the clearance the claims must carry; the concrete
wire field on crate::auth::Claims / common.capnp is added under S8
(#574, hybrid envelope) so the new authz field ships on the hybrid-signed
envelope rather than the classical one. Until then this trait is the typed
contract S2/S4 program against, and a node assembles a SecurityContext
by:
- reading the (future)
clearancefield off verifiedClaims, and - deriving assurance from the envelope’s verified key material.
Implementing this on Claims is a one-liner once the field lands; defining
it now lets S2/S4 compile and test against a stable interface.
Required Methods§
Sourcefn credential_clearance(&self) -> Option<CredentialClearance>
fn credential_clearance(&self) -> Option<CredentialClearance>
The authority-asserted clearance carried in the verified claims, if any,
as its two-axis wire projection (level + compartments only; assurance is
structurally absent from the credential wire — v16 §11). None ⇒
unlabeled subject ⇒ the monitor MUST deny (no default clearance).
Provided Methods§
Sourcefn security_context(
&self,
key_material: VerifiedKeyMaterial,
) -> Option<SecurityContext>
fn security_context( &self, key_material: VerifiedKeyMaterial, ) -> Option<SecurityContext>
Assemble the full subject context, deriving the assurance axis PURELY
from the verified key material (never from the wire — the wire cannot
carry assurance). Returns None (→ deny) if the subject carries no
clearance. Implementors normally only need to provide
credential_clearance.