pub enum ManagerError {
Show 14 variants
UnknownKey(String),
UnknownBackend {
key: String,
backend: String,
},
OpNotValidForClass {
op: &'static str,
key: String,
class: Class,
},
UnsupportedKeyType {
backend: String,
op: &'static str,
key_type: KeyType,
},
Unsupported(&'static str),
AlgorithmMismatch {
key: String,
requested: AeadAlgorithm,
actual: &'static str,
},
KemAlgorithmMismatch {
key: String,
requested: &'static str,
actual: &'static str,
},
ValueRotateNeedsSet(String),
Sealing(SealingFailure),
UnsealContextNotPermitted(String),
Signing(SigningFailure),
MissingPublicPath(String),
Provider(ProviderError),
Backend(BackendError),
}Expand description
An error from resolving or routing a catalog key. Fails closed; never panics.
Variants§
UnknownKey(String)
The dotted name is not in the catalog’s key inventory.
UnknownBackend
A key entry names a backend instance that was not provided at construction.
Caught at BackendManager::new; never surfaces at request time.
OpNotValidForClass
The requested op is not valid for the resolved key’s Class
(e.g. sign on a value key).
Fields
UnsupportedKeyType
The backend’s static capability preset does not declare support for this key type on a mint/import/generate path.
Fields
Unsupported(&'static str)
The op is recognized but its Backend method does not exist yet
(a later per-op issue + Backend-trait expansion backs it).
AlgorithmMismatch
An encrypt algorithm that does not match the key’s catalog keyType
(e.g. chacha20-poly1305 against an aes-256-gcm key), or an encrypt
on a key whose catalog keyType is not an AEAD suite. Maps to the wire
invalid_request (§4.2).
Fields
requested: AeadAlgorithmThe requested AEAD suite.
KemAlgorithmMismatch
A KEM envelope requests an algorithm that does not match the sealing key’s
catalog keyType.
Fields
ValueRotateNeedsSet(String)
rotate on a value key that has no generate recipe: there is no
fresh value to write, so rotation is invalid_request: use set with
out-of-band material instead (§7 / vault-a2p).
Sealing(SealingFailure)
A sealing op (wrap/unwrap/get_public_key) failed: a malformed
materialized private key, a malformed envelope, or an AEAD authentication
failure. The open-side failure is opaque (no oracle).
UnsealContextNotPermitted(String)
The caller holds op:decrypt on this sealing key, but the key pins an
allowed COSE unseal context (KDF party identities and/or external_aad)
that this envelope is not bound to (basil-2rqj). A least-privilege
refusal: the grant authorizes only the pinned contexts, never any envelope
addressed to the key. Fails closed as permission-denied. Carries no
secret material: the party identities are cleartext header values and the
external_aad is caller-supplied.
Signing(SigningFailure)
A value-store (engine=kv2) Ed25519 materialize-to-sign op
(sign/verify/get_public_key) failed because the materialized seed or a
verify input was malformed (wrong length). Carries no secret material.
MissingPublicPath(String)
A materialize-to-use key (sealing / asymmetric+engine=kv2) was asked
for its public half but carries no public_path. A catalog loaded through
crate::catalog::load always has one (loader guardrail, basil-o86); this
fails closed when the manager was built from an unvalidated catalog rather
than re-deriving the public from the private (which the op surface forbids).
Provider(ProviderError)
A provider-dispatched (ML-DSA software-custody) operation failed: an unsupported algorithm/provider combination, a policy denial of the local-software provider, or an opaque software-custody crypto failure. Carries no secret material.
Backend(BackendError)
The resolved backend returned an error for this op.
Trait Implementations§
Source§impl Debug for ManagerError
impl Debug for ManagerError
Source§impl Display for ManagerError
impl Display for ManagerError
Source§impl Error for ManagerError
impl Error for ManagerError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<BackendError> for ManagerError
impl From<BackendError> for ManagerError
Source§fn from(source: BackendError) -> Self
fn from(source: BackendError) -> Self
Source§impl From<ProviderError> for ManagerError
impl From<ProviderError> for ManagerError
Source§fn from(source: ProviderError) -> Self
fn from(source: ProviderError) -> Self
Auto Trait Implementations§
impl Freeze for ManagerError
impl RefUnwindSafe for ManagerError
impl Send for ManagerError
impl Sync for ManagerError
impl Unpin for ManagerError
impl UnsafeUnpin for ManagerError
impl UnwindSafe for ManagerError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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