#[non_exhaustive]
pub struct LairServerConfigInner { pub connection_url: Url, pub pid_file: PathBuf, pub store_file: PathBuf, pub signature_fallback: LairServerSignatureFallback, pub runtime_secrets_salt: BinDataSized<16>, pub runtime_secrets_mem_limit: u32, pub runtime_secrets_ops_limit: u32, pub runtime_secrets_context_key: SecretDataSized<32, 49>, pub runtime_secrets_id_seed: SecretDataSized<32, 49>, }
Expand description

Inner config type used by lair servers. This will be wrapped in an Arc in the typedef LairServerConfig.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§connection_url: Url

The connection url for communications between server / client.

  • unix:///path/to/unix/socket?k=Yada
  • named_pipe:\\.\pipe\my_pipe_name?k=Yada
  • tcp://127.0.0.1:12345?k=Yada
§pid_file: PathBuf

The pid file for managing a running lair-keystore process

§store_file: PathBuf

The sqlcipher store file for persisting secrets

§signature_fallback: LairServerSignatureFallback

Configuration for managing sign_by_pub_key fallback in case the pub key does not exist in the lair store.

§runtime_secrets_salt: BinDataSized<16>

salt for decrypting runtime data

§runtime_secrets_mem_limit: u32

argon2id mem_limit for decrypting runtime data

§runtime_secrets_ops_limit: u32

argon2id ops_limit for decrypting runtime data

§runtime_secrets_context_key: SecretDataSized<32, 49>

the runtime context key secret

§runtime_secrets_id_seed: SecretDataSized<32, 49>

the server identity signature keypair seed

Implementations§

source§

impl LairServerConfigInner

source

pub fn from_bytes(bytes: &[u8]) -> LairResult<Self>

decode yaml bytes into a config struct

source

pub fn new<P>( root_path: P, passphrase: BufRead ) -> impl Future<Output = LairResult<Self>> + 'static + Send
where P: AsRef<Path>,

Construct a new default lair server config instance. Respects hc_seed_bundle::PwHashLimits.

source

pub fn get_connection_scheme(&self) -> &str

Get the connection “scheme”. i.e. “unix”, “named-pipe”, or “tcp”.

source

pub fn get_connection_path(&self) -> PathBuf

Get the connection “path”. This could have different meanings depending on if we are a unix domain socket or named pipe, etc.

source

pub fn get_server_pub_key(&self) -> LairResult<BinDataSized<32>>

Get the server pub key BinDataSized<32> bytes from the connectionUrl

Trait Implementations§

source§

impl Clone for LairServerConfigInner

source§

fn clone(&self) -> LairServerConfigInner

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
source§

impl Debug for LairServerConfigInner

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for LairServerConfigInner

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for LairServerConfigInner

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Serialize for LairServerConfigInner

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. 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> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. 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
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,