pub enum BackendCred {
VaultToken {
token: SecretString,
addr: Option<String>,
},
VaultAppRole {
role_id: String,
secret_id: SecretString,
addr: Option<String>,
},
SpiffeSigner {
key_pem: SecretString,
spiffe_id: String,
},
DbKeystoreDek {
dek: SecretArray<32>,
},
OnePassword {
provider_uri: String,
project: String,
profile: String,
},
AwsKms {
region: String,
profile: String,
},
GcpKms {
project: String,
location: String,
key_ring: String,
service_account_json: Option<SecretString>,
},
Opaque {
kind: String,
secret: SecretBytes,
},
}Expand description
A single backend’s bootstrap credential. Secret fields are Zeroizing.
Serialized with serde’s external tagging (a { "<variant>": { … } }
object), the same style the wire protocol uses.
Variants§
VaultToken
Vault static token (the bundle create --backend …,token-file= cred).
Dev / simple setups.
Fields
token: SecretStringThe bearer token sent as X-Vault-Token.
VaultAppRole
Vault AppRole: secret_id (+ role_id) exchanged for a short-lived
token at startup. Recommended production default (§4).
Fields
secret_id: SecretStringSecret secret_id (zeroized on drop).
SpiffeSigner
SPIFFE/JWT-SVID signing key for the spiffe backend path: a private key
the broker uses to self-issue an SVID, exchanged via bao jwt auth.
Fields
key_pem: SecretStringPEM-encoded private signing key (zeroized on drop).
DbKeystoreDek
Future value-store backend (db-keystore): the DEK that opens the local DB.
Fields
dek: SecretArray<32>32-byte data-encryption key (zeroized on drop).
OnePassword
1Password provider configuration.
Fields
AwsKms
AWS KMS transit backend addressing. Auth is the ambient AWS credential chain (env / profile / IAM role / IMDS), so no secret is sealed here: this variant carries only non-secret addressing.
Fields
GcpKms
GCP Cloud KMS transit backend addressing. Auth defaults to Application
Default Credentials; when service_account_json is present, the whole
service-account key file is sealed as one opaque secret. Crypto-key names
route under
projects/{project}/locations/{location}/keyRings/{key_ring}.
Fields
service_account_json: Option<SecretString>Optional service-account JSON key. None uses ambient ADC.
Opaque
Escape hatch for a backend kind not yet modelled: opaque labelled bytes.
Fields
secret: SecretBytesOpaque secret bytes (zeroized on drop).
Implementations§
Trait Implementations§
Source§impl Clone for BackendCred
impl Clone for BackendCred
Source§fn clone(&self) -> BackendCred
fn clone(&self) -> BackendCred
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BackendCred
impl Debug for BackendCred
Source§impl<'de> Deserialize<'de> for BackendCred
impl<'de> Deserialize<'de> for BackendCred
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>,
Auto Trait Implementations§
impl Freeze for BackendCred
impl RefUnwindSafe for BackendCred
impl Send for BackendCred
impl Sync for BackendCred
impl Unpin for BackendCred
impl UnsafeUnpin for BackendCred
impl UnwindSafe for BackendCred
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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