pub struct LairStore(pub Arc<dyn AsLairStore>);
Expand description

A handle to a running lair keystore backend persistance instance. Allows storing, listing, and retrieving keystore secrets.

Tuple Fields§

§0: Arc<dyn AsLairStore>

Implementations§

source§

impl LairStore

source

pub fn get_bidi_ctx_key(&self) -> BufReadSized<32>

Return the context key for both encryption and decryption of secret data within the store that is NOT deep_locked.

source

pub fn insert_seed( &self, seed: BufReadSized<32>, tag: Arc<str>, exportable: bool ) -> impl Future<Output = LairResult<SeedInfo>> + 'static + Send

Inject a pre-generated seed, and associate it with the given tag, returning the seed_info derived from the generated seed.

source

pub fn new_seed( &self, tag: Arc<str>, exportable: bool ) -> impl Future<Output = LairResult<SeedInfo>> + 'static + Send

Generate a new cryptographically secure random seed, and associate it with the given tag, returning the seed_info derived from the generated seed.

source

pub fn insert_deep_locked_seed( &self, seed: BufReadSized<32>, tag: Arc<str>, ops_limit: u32, mem_limit: u32, deep_lock_passphrase: BufReadSized<64>, exportable: bool ) -> impl Future<Output = LairResult<SeedInfo>> + 'static + Send

Inject a pre-generated seed, and associate it with the given tag, returning the seed_info derived from the generated seed. This seed is deep_locked, meaning it needs an additional runtime passphrase to be decrypted / used.

source

pub fn new_deep_locked_seed( &self, tag: Arc<str>, ops_limit: u32, mem_limit: u32, deep_lock_passphrase: BufReadSized<64>, exportable: bool ) -> impl Future<Output = LairResult<SeedInfo>> + 'static + Send

Generate a new cryptographically secure random seed, and associate it with the given tag, returning the seed_info derived from the generated seed. This seed is deep_locked, meaning it needs an additional runtime passphrase to be decrypted / used.

source

pub fn new_wka_tls_cert( &self, tag: Arc<str> ) -> impl Future<Output = LairResult<CertInfo>> + 'static + Send

Generate a new cryptographically secure random wka tls cert, and associate it with the given tag, returning the cert_info derived from the generated cert.

source

pub fn list_entries( &self ) -> impl Future<Output = LairResult<Vec<LairEntryInfo>>> + 'static + Send

List the entries tracked by the lair store.

source

pub fn get_entry_by_tag( &self, tag: Arc<str> ) -> impl Future<Output = LairResult<LairEntry>> + 'static + Send

Get an entry from the lair store by tag.

source

pub fn get_entry_by_ed25519_pub_key( &self, ed25519_pub_key: Ed25519PubKey ) -> impl Future<Output = LairResult<LairEntry>> + 'static + Send

Get an entry from the lair store by ed25519 pub key.

source

pub fn get_entry_by_x25519_pub_key( &self, x25519_pub_key: X25519PubKey ) -> impl Future<Output = LairResult<LairEntry>> + 'static + Send

Get an entry from the lair store by x25519 pub key.

Trait Implementations§

source§

impl Clone for LairStore

source§

fn clone(&self) -> LairStore

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more