Struct lair_keystore_api::config::LairServerConfigInner
source · #[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
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
impl LairServerConfigInner
sourcepub fn from_bytes(bytes: &[u8]) -> LairResult<Self>
pub fn from_bytes(bytes: &[u8]) -> LairResult<Self>
decode yaml bytes into a config struct
sourcepub fn new<P>(
root_path: P,
passphrase: BufRead
) -> impl Future<Output = LairResult<Self>> + 'static + Send
pub fn new<P>( root_path: P, passphrase: BufRead ) -> impl Future<Output = LairResult<Self>> + 'static + Send
Construct a new default lair server config instance. Respects hc_seed_bundle::PwHashLimits.
sourcepub fn get_connection_scheme(&self) -> &str
pub fn get_connection_scheme(&self) -> &str
Get the connection “scheme”. i.e. “unix”, “named-pipe”, or “tcp”.
sourcepub fn get_connection_path(&self) -> PathBuf
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.
sourcepub fn get_server_pub_key(&self) -> LairResult<BinDataSized<32>>
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
impl Clone for LairServerConfigInner
source§fn clone(&self) -> LairServerConfigInner
fn clone(&self) -> LairServerConfigInner
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more