Skip to main content

CredentialBackend

Trait CredentialBackend 

pub trait CredentialBackend {
    // Required methods
    fn put_secret(
        &self,
        ref_name: &str,
        value: &[u8],
    ) -> Result<SecretRefMetadata, AgentErrorKind>;
    fn get_secret(&self, ref_name: &str) -> Result<Vec<u8>, AgentErrorKind>;
    fn unset_secret(&self, ref_name: &str) -> Result<bool, AgentErrorKind>;
    fn list_secret_refs(&self) -> Result<Vec<SecretRefMetadata>, AgentErrorKind>;
}
Expand description

Architect credential interface retained for existing provider and deployment consumers.

Required Methods§

fn put_secret( &self, ref_name: &str, value: &[u8], ) -> Result<SecretRefMetadata, AgentErrorKind>

Stores one bounded secret and returns redacted metadata.

fn get_secret(&self, ref_name: &str) -> Result<Vec<u8>, AgentErrorKind>

Reads a secret for in-process use.

fn unset_secret(&self, ref_name: &str) -> Result<bool, AgentErrorKind>

Removes a secret without exposing it.

fn list_secret_refs(&self) -> Result<Vec<SecretRefMetadata>, AgentErrorKind>

Lists only redacted reference metadata.

Implementors§