pub enum SecretError {
NotFound {
path: PathBuf,
},
ClusterNotImplemented,
ClusterNotFound {
name: String,
},
Forbidden {
name: String,
},
ClusterDecrypt {
name: String,
},
Kek {
reason: String,
},
Io {
path: PathBuf,
source: Error,
},
}Expand description
Errors returned by SecretResolver::resolve.
Variants§
NotFound
The referenced secret file does not exist in the yubaba secret store.
ClusterNotImplemented
SecretRef::Cluster reached a resolver that has no cluster backing —
e.g. the per-machine LocalFileResolver, which cannot decrypt cluster
secrets. The fleet resolver (yubaba’s ClusterResolver) handles the
Cluster arm; this error means the wrong resolver was used.
ClusterNotFound
The referenced cluster secret is not present in the local raft replica (never written, or deleted). Fails closed — nothing is served.
Forbidden
The cluster secret exists but its SecretAccess rule does not admit
the requesting workload (R706 / W294).
The #[error(...)] text is a deliberate byte-for-byte duplicate of
SecretError::ClusterNotFound’s. Yubaba surfaces the Display form
of this error in the deploy rejection body, so a distinguishable message
would turn any workload spec into an oracle for the cluster’s secret
namespace: deploy a throwaway spec naming a guessed secret and read off
“forbidden” (it exists) versus “not found” (it doesn’t). The variants
stay separate internally — the node logs which one it was, and
secrets_forbidden_is_externally_indistinguishable pins the equality so
a future edit to either message can’t silently reopen the oracle.
ClusterDecrypt
Decryption or authentication of a cluster secret failed — a wrong node-local KEK, a truncated/tampered record, or a malformed nonce. Fails closed; the message carries only the logical name, never key or ciphertext bytes.
Kek
The node-local cluster KEK could not be loaded (missing, unreadable, or
not exactly 32 bytes). Fails closed; reason is a generic diagnostic
and never contains key material.
Io
I/O error reading the secret file.
Trait Implementations§
Source§impl Debug for SecretError
impl Debug for SecretError
Source§impl Display for SecretError
impl Display for SecretError
Source§impl Error for SecretError
impl Error for SecretError
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()