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§
Sourcefn register_provider(&mut self, provider: Box<dyn SecretProvider>)
fn register_provider(&mut self, provider: Box<dyn SecretProvider>)
Register a secret provider
Sourcefn get_provider(&self, name: &str) -> Option<&dyn SecretProvider>
fn get_provider(&self, name: &str) -> Option<&dyn SecretProvider>
Get provider by name
Sourcefn 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<'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
Sourcefn 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 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
Sourcefn 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 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
Sourcefn list_providers(&self) -> Vec<&str>
fn list_providers(&self) -> Vec<&str>
List all available providers