summaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-04-06 20:01:41 +0300
committerLars Wirzenius <liw@liw.fi>2022-04-07 10:13:02 +0300
commit7fb4d37e19469b1bf567dd57cb86ae9f9f9d44c0 (patch)
tree0c145eef6210cc711f054c77f127a8bf9877dc87 /src/config.rs
parentf5b7ee0ce079e22f37e42c23277ed32aebb41919 (diff)
downloadvmadm-7fb4d37e19469b1bf567dd57cb86ae9f9f9d44c0.tar.gz
feat: add a user_ca_pubkey field to config, spec
With this, there's no need to install an SSH key into root's authorized_keys file. Sponsored-by: author
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index 034150b..37cd98e 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -41,6 +41,9 @@ pub struct Configuration {
/// Path name to SSH CA key for creating SSH host certificates.
pub ca_key: Option<PathBuf>,
+
+ /// Path name to SSH CA public key for verifying SSH user certificates.
+ pub user_ca_pubkey: Option<PathBuf>,
}
/// Errors from this module.
@@ -94,6 +97,7 @@ impl Configuration {
expand_optional_pathbuf(&mut self.image_directory)?;
expand_optional_pathbuf(&mut self.image_directory)?;
expand_optional_pathbuf(&mut self.ca_key)?;
+ expand_optional_pathbuf(&mut self.user_ca_pubkey)?;
expand_optional_pathbufs(&mut self.authorized_keys)?;
Ok(())
}