pub struct OwnedCoseAuditSigner { /* private fields */ }Expand description
Owned-key variant of CoseAuditSigner (B2, #674): production wiring
stores this on OAuthState/AuditedAvc, both of which must be
'static — a borrowed signer cannot live there. Holds Arcs to the
same key material a borrowed CoseAuditSigner would reference (a
startup-time snapshot of the node’s active EdDSA + ML-DSA-65 keys), and
signs with the IDENTICAL fail-closed logic: under Hybrid, a missing PQ
key fails every sign call rather than downgrading.
Implementations§
Source§impl OwnedCoseAuditSigner
impl OwnedCoseAuditSigner
Sourcepub fn new(
ed_sk: Arc<SigningKey>,
pq_sk: Option<Arc<MlDsaSigningKey>>,
policy: CryptoPolicy,
) -> Self
pub fn new( ed_sk: Arc<SigningKey>, pq_sk: Option<Arc<MlDsaSigningKey>>, policy: CryptoPolicy, ) -> Self
Construct from owned key material + the node’s enforced
CryptoPolicy. See
CoseAuditSigner::new for the exact Hybrid/Classical semantics —
identical here.
Sourcepub fn can_sign(&self) -> bool
pub fn can_sign(&self) -> bool
As CoseAuditSigner::can_sign: whether this signer can produce a
signature under its policy. Production wiring MUST check this at
startup and refuse to boot the audited grant path if false under
Hybrid (no audit signer ⇒ no Permit, per the S7 fail-closed
contract) — see OAuthState::with_audit_sink.
Trait Implementations§
Source§impl AuditSigner for OwnedCoseAuditSigner
impl AuditSigner for OwnedCoseAuditSigner
Source§fn sign(&self, signing_input: &[u8]) -> Result<Vec<u8>, AuditError>
fn sign(&self, signing_input: &[u8]) -> Result<Vec<u8>, AuditError>
audit_signing_input).Auto Trait Implementations§
impl Freeze for OwnedCoseAuditSigner
impl RefUnwindSafe for OwnedCoseAuditSigner
impl Send for OwnedCoseAuditSigner
impl Sync for OwnedCoseAuditSigner
impl Unpin for OwnedCoseAuditSigner
impl UnsafeUnpin for OwnedCoseAuditSigner
impl UnwindSafe for OwnedCoseAuditSigner
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