Trait SecretManager

Source
pub trait SecretManager: Send + Sync {
    // Required methods
    fn register_provider(&mut self, provider: Box<dyn SecretProvider>);
    fn get_provider(&self, name: &str) -> Option<&dyn SecretProvider>;
    fn sync_credentials<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        credentials: &'life1 Credentials,
        mapping: &'life2 SecretMapping,
    ) -> Pin<Box<dyn Future<Output = Result<SyncResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn sync_credentials_to_targets<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        credentials: &'life1 Credentials,
        mapping: &'life2 SecretMapping,
        targets: &'life3 [Target],
    ) -> Pin<Box<dyn Future<Output = Result<SyncResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn validate_targets<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<HashMap<String, bool>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list_providers(&self) -> Vec<&str>;
}
Expand description

High-level secret management interface

Required Methods§

Source

fn register_provider(&mut self, provider: Box<dyn SecretProvider>)

Register a secret provider

Source

fn get_provider(&self, name: &str) -> Option<&dyn SecretProvider>

Get provider by name

Source

fn sync_credentials<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, credentials: &'life1 Credentials, mapping: &'life2 SecretMapping, ) -> Pin<Box<dyn Future<Output = Result<SyncResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Sync credentials using specified mapping

Source

fn sync_credentials_to_targets<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, credentials: &'life1 Credentials, mapping: &'life2 SecretMapping, targets: &'life3 [Target], ) -> Pin<Box<dyn Future<Output = Result<SyncResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Sync credentials to specific targets

Source

fn validate_targets<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<HashMap<String, bool>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Validate all configured targets

Source

fn list_providers(&self) -> Vec<&str>

List all available providers

Implementors§