aboutsummaryrefslogtreecommitdiffstats
path: root/src/config
diff options
context:
space:
mode:
Diffstat (limited to 'src/config')
-rw-r--r--src/config/mod.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs
index 9279f40..fb707dd 100644
--- a/src/config/mod.rs
+++ b/src/config/mod.rs
@@ -180,6 +180,20 @@ pub(crate) const OPTIONS: &[OptionSpec] = &[
"With bootstrap-users: their SSH keys, as authorized_keys lines (ssh-ed25519 <base64> [comment], named by the comment), recorded in their entries: to log in by key and sign values (docs/access.md), so a swarm can be strict from its start.",
),
option(
+ "strict-keys",
+ Kind::List,
+ "KEY,[KEY...]",
+ None,
+ "SSH keys, as authorized_keys lines (ssh-ed25519 <base64> [comment]), whose signature on a strict remake's manifest this node takes: the values kept when the swarm turns strict (docs/access.md). Without, it votes for no strict remake, unless follow-strict-remakes.",
+ ),
+ option(
+ "follow-strict-remakes",
+ Kind::Flag,
+ "BOOL",
+ Some("false"),
+ "Without strict-keys: vote for strict remakes all the same, taking the manifests as the members proposing them sign them.",
+ ),
+ option(
"log-format",
Kind::Text,
"auto|text|journal",
@@ -595,6 +609,10 @@ pub(crate) struct Settings {
#[serde(default)]
pub(crate) bootstrap_keys: Vec<String>,
#[serde(default)]
+ pub(crate) strict_keys: Vec<String>,
+ #[serde(default)]
+ pub(crate) follow_strict_remakes: bool,
+ #[serde(default)]
pub(crate) cors_origins: Vec<String>,
#[serde(default)]
pub(crate) sign_every: crate::document::signatures::SignEvery,
@@ -871,6 +889,13 @@ impl Settings {
{
bail!("{why}");
}
+ if let Some(why) = self
+ .strict_keys
+ .iter()
+ .find_map(|line| crate::access::sshsig::PublicKey::parse(line).err())
+ {
+ bail!("strict-keys: {why}");
+ }
if self.genesis && self.recover_from.is_some() {
bail!("recover-from starts the swarm from a backup; it can't be combined with genesis");
}