SecretsManager

Trait SecretsManager 

Source
pub trait SecretsManager: Send + Sync {
    // Provided method
    fn fetch_secrets<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        _secret_names: Vec<String>,
        _entity_jwt: Option<&'life1 String>,
        _host_jwt: &'life2 str,
        _application: Option<&'life3 String>,
    ) -> Pin<Box<dyn Future<Output = Result<HashMap<String, SecretBox<SecretValue>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait { ... }
}
Expand description

A trait for fetching secrets from a secret store. This is used by the host to fetch secrets from a configured secret store.

By default, this implementation does nothing and returns an empty map. This is useful for testing or when no secret fetching is required.

Provided Methods§

Source

fn fetch_secrets<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _secret_names: Vec<String>, _entity_jwt: Option<&'life1 String>, _host_jwt: &'life2 str, _application: Option<&'life3 String>, ) -> Pin<Box<dyn Future<Output = Result<HashMap<String, SecretBox<SecretValue>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Fetch secrets by name from the secret store. Additional information is provided that can be sent to the secret store, such as the entity JWT and host JWT, for additional validation.

Implementors§