pub struct FileSecretKeyring { /* private fields */ }Expand description
Owner-only, process-safe secret keyring for one deployment directory.
Implementations§
Source§impl FileSecretKeyring
impl FileSecretKeyring
Sourcepub fn open(root: impl Into<PathBuf>) -> SecretAccessResult<Self>
pub fn open(root: impl Into<PathBuf>) -> SecretAccessResult<Self>
Opens or creates a V1 keyring rooted at root.
Sourcepub fn install_initial(
&self,
material: &SecuritySecretMaterial,
) -> SecretAccessResult<()>
pub fn install_initial( &self, material: &SecuritySecretMaterial, ) -> SecretAccessResult<()>
Installs the first active key without replacing an existing keyring.
Sourcepub fn rotate(
&self,
next: &SecuritySecretMaterial,
now_ms: u64,
) -> SecretAccessResult<Option<String>>
pub fn rotate( &self, next: &SecuritySecretMaterial, now_ms: u64, ) -> SecretAccessResult<Option<String>>
Atomically selects next before deprecating the previous active key.
Sourcepub fn revoke(&self, key_id: &str) -> SecretAccessResult<()>
pub fn revoke(&self, key_id: &str) -> SecretAccessResult<()>
Revokes a key and removes the active pointer when it selected that key.
Sourcepub fn resolve_active(
&self,
now_ms: u64,
) -> SecretAccessResult<SecuritySecretMaterial>
pub fn resolve_active( &self, now_ms: u64, ) -> SecretAccessResult<SecuritySecretMaterial>
Resolves the active key for issuing new credentials.
Sourcepub fn resolve_for_validation(
&self,
key_id: &str,
now_ms: u64,
) -> SecretAccessResult<SecuritySecretMaterial>
pub fn resolve_for_validation( &self, key_id: &str, now_ms: u64, ) -> SecretAccessResult<SecuritySecretMaterial>
Resolves an active or deprecated key for validating existing credentials.
Sourcepub fn recover(&self, now_ms: u64) -> SecretAccessResult<String>
pub fn recover(&self, now_ms: u64) -> SecretAccessResult<String>
Repairs an absent active pointer when exactly one usable active key exists.
Trait Implementations§
Source§impl Clone for FileSecretKeyring
impl Clone for FileSecretKeyring
Source§fn clone(&self) -> FileSecretKeyring
fn clone(&self) -> FileSecretKeyring
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FileSecretKeyring
impl Debug for FileSecretKeyring
Source§impl Display for FileSecretKeyring
impl Display for FileSecretKeyring
Source§impl SecretResolver for FileSecretKeyring
impl SecretResolver for FileSecretKeyring
Source§fn resolve(&self, reference: &SecuritySecretRef) -> SecurityResult<SecretBytes>
fn resolve(&self, reference: &SecuritySecretRef) -> SecurityResult<SecretBytes>
Resolves one secret or returns a controlled availability error.
Auto Trait Implementations§
impl Freeze for FileSecretKeyring
impl RefUnwindSafe for FileSecretKeyring
impl Send for FileSecretKeyring
impl Sync for FileSecretKeyring
impl Unpin for FileSecretKeyring
impl UnsafeUnpin for FileSecretKeyring
impl UnwindSafe for FileSecretKeyring
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more