pub trait SecretsBackend:
Send
+ Sync
+ 'static {
// Required methods
fn resolve_tls_profile<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
tenant: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<TlsHandle>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_credential<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
tenant: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<CredentialHandle>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_string<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
tenant: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<SecretString>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn subscribe(
&self,
name: &str,
tenant: &str,
) -> Pin<Box<dyn Stream<Item = RotationEvent> + Send>>;
}Expand description
Pluggable secrets backend trait — ADR-014 §5.
Implemented by plugin-secrets-vault and plugin-secrets-file.
The host registers one backend at startup; it resolves all secret
references throughout the deployment.
#[async_trait] is used to make the trait dyn-compatible.
Required Methods§
Sourcefn resolve_tls_profile<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
tenant: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<TlsHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn resolve_tls_profile<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
tenant: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<TlsHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Resolve a named TLS profile to an opaque handle.
name uses scheme-routing: vault://prod/tls/kafka, file://kafka-prod.
Sourcefn get_credential<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
tenant: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<CredentialHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_credential<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
tenant: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<CredentialHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Resolve a named credential.
Sourcefn get_string<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
tenant: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<SecretString>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_string<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
tenant: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<SecretString>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Read a named secret as a zeroizing string.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".