diff options
| author | tv <tv@krebsco.de> | 2026-11-07 22:35:21 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-07 22:35:21 +0100 |
| commit | b6f815882a6d4a32c1198bd3666edaeaf1f7bca3 (patch) | |
| tree | 5beab4b31fd4511446c8e3a7445412ce7f33f97a /src/swarm/bootstrap.rs | |
| parent | e696d2f40636a6613eddfb1a3afdf87aa7ffdedd (diff) | |
access: --bootstrap-keys
The first users' SSH keys, recorded at genesis with their entries, so a
swarm can be strict from its start.
Auth plan M7.
Diffstat (limited to 'src/swarm/bootstrap.rs')
| -rw-r--r-- | src/swarm/bootstrap.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/swarm/bootstrap.rs b/src/swarm/bootstrap.rs index 10ad412..98e273a 100644 --- a/src/swarm/bootstrap.rs +++ b/src/swarm/bootstrap.rs @@ -100,12 +100,13 @@ pub(crate) async fn bootstrap(state: &AppState, seeds: &[String], start: Start) let users: Vec<(Vec<String>, JsonValue)> = state .first_users .iter() - .map(|name| { + .map(|(name, keys)| { let caps = crate::access::registry::all_caps(); - ( - crate::access::registry::user_path(name), - crate::access::registry::entry(&by, since, &caps), - ) + let mut entry = crate::access::registry::entry(&by, since, &caps); + if !keys.is_empty() { + entry["keys"] = serde_json::json!(keys); + } + (crate::access::registry::user_path(name), entry) }) .collect(); state |
