OpenBao as a NixOS host service on the thinks (3-node Raft, PKCS#11 auto-unseal) #8

Closed
opened 2026-11-05 16:59:31 +00:00 by ginjiruu · 7 comments
Owner

Part of lab/machine-configs#7.

Why

Secrets must exist before k3s does (the k3s join token is needed to start k3s), so OpenBao cannot run inside the cluster it bootstraps. It runs as a host service on think-01..03, upgraded by comin, independent of k3s health.

What

  • services.openbao on the three thinks, integrated Raft storage on tank (plain ZFS dataset, no DRBD: Raft replicates itself).
  • Auto-unseal via seal "pkcs11" with one YubiKey 5 per think (PIV slot holding the same imported RSA key; mechanism RSA_PKCS_OAEP; libykcs11.so). OpenBao requires the key to exist on the token before init.
  • Prove the flow first with SoftHSM2, then the existing 5C Nano (firmware 5.7.4) on arch-ws, then on one think; then buy two more keys.
  • Check whether the pkcs11 seal is built in or a plugin in the OpenBao version used (2.7 moved many seals to plugins).
  • Raft retry_join between the thinks; TLS for the API listener and Raft from pki-infra (bootstrap cert at day 0).
  • kured reboots must never take Raft below quorum: verify one-node-at-a-time rolls keep 2/3 unsealed.

Done when

  • Three-node Raft cluster healthy, each node auto-unseals after a reboot with no human input
  • Pulling a node's key leaves only that node sealed
  • A full kured roll of the thinks keeps OpenBao available throughout
  • Raft snapshot backup scheduled and a restore rehearsed
Part of lab/machine-configs#7. ## Why Secrets must exist before k3s does (the k3s join token is needed to start k3s), so OpenBao cannot run inside the cluster it bootstraps. It runs as a host service on think-01..03, upgraded by comin, independent of k3s health. ## What - `services.openbao` on the three thinks, integrated Raft storage on `tank` (plain ZFS dataset, no DRBD: Raft replicates itself). - Auto-unseal via `seal "pkcs11"` with one YubiKey 5 per think (PIV slot holding the same imported RSA key; mechanism `RSA_PKCS_OAEP`; `libykcs11.so`). OpenBao requires the key to exist on the token before init. - Prove the flow first with SoftHSM2, then the existing 5C Nano (firmware 5.7.4) on arch-ws, then on one think; then buy two more keys. - Check whether the pkcs11 seal is built in or a plugin in the OpenBao version used (2.7 moved many seals to plugins). - Raft `retry_join` between the thinks; TLS for the API listener and Raft from `pki-infra` (bootstrap cert at day 0). - kured reboots must never take Raft below quorum: verify one-node-at-a-time rolls keep 2/3 unsealed. ## Done when - [ ] Three-node Raft cluster healthy, each node auto-unseals after a reboot with no human input - [ ] Pulling a node's key leaves only that node sealed - [ ] A full kured roll of the thinks keeps OpenBao available throughout - [ ] Raft snapshot backup scheduled and a restore rehearsed
Author
Owner

Research, 2026-11-06: YubiKey PKCS#11 auto-unseal works with OpenBao. Full report from a research subagent; the first two points I checked myself.

Build support

  • Our pin (nixos-26.05, fa13731) ships OpenBao 2.6.5 with the hsm build tag on Linux by default (pkgs/by-name/op/openbao/package.nix: withHsm ? stdenvNoCC.hostPlatform.isLinux, tags = lib.optional withHsm "hsm" ...). The built-in seal "pkcs11" is compiled in. No override.
  • openbao.org 2.6.x docs: "This seal remains built-in in OpenBao v2.6.x, but will remain available only as an external plugin starting v2.7.0."
  • 2.7.2 is the current release (2026-10-26). nixos-unstable already carries 2.7.2 without the hsm tag. The plugin is openbao-plugin-kms-pkcs11 in openbao/openbao-plugins, latest kms-pkcs11-v0.3.0 (2026-11-03). It is not packaged in our pin. Config shape: plugin "kms" "pkcs11" { command = "openbao-plugin-kms-pkcs11" sha256sum = "..." } plus plugin_directory, and the seal "pkcs11" block keeps its name.

YubiKey side (from yubico-piv-tool source, not checked by hand)

  • libykcs11.so (yubico-piv-tool 2.7.3 in nixpkgs) advertises CKM_RSA_PKCS_OAEP decrypt for RSA 1024-4096. The card does raw RSA and ykcs11 strips OAEP on the host, so rsa_oaep_hash = "sha256" works.
  • Firmware 5.7 imports RSA 2048/3072/4096 into 9a/9c/9d/9e. Use 2048 or 3072. 4096 is slow.
  • Slot 9d labels: private key Private key for Key Management, CKA_ID 0x03. Token label YubiKey PIV #<serial>.
  • OpenBao encrypts in software with the exported public key and only asks the token to decrypt. That matches PIV 9d.
  • openbao#1921: a YubiKey user hit a public/private label mismatch. GH-3231 in 2.6.0 falls back to the private key's CKA_ID, which fixes it.
  • Do not use key_id = "0x03" alone. In ykcs11 it matches cert, private and public objects, and the lookup errors on more than two.

Config (per think, serial differs)

seal "pkcs11" {
  lib           = "<yubico-piv-tool>/lib/libykcs11.so"
  token_label   = "YubiKey PIV #<serial>"
  key_label     = "Private key for Key Management"
  mechanism     = "RSA_PKCS_OAEP"
  rsa_oaep_hash = "sha256"
}
  • PIN through BAO_HSM_PIN from a root-only EnvironmentFile. services.openbao.settings renders into the world-readable store.
  • services.pcscd.enable = true; order openbao after pcscd.
  • Key import: ykman piv keys import --pin-policy once --touch-policy never 9d seal.pem. PIN policy always or touch always breaks unattended unseal.

Risks

  • Keep the seal PEM in an encrypted offline backup. Losing all three keys without it loses the data; recovery keys cannot decrypt the root key under auto-unseal.
  • Wrong PIN 3 times blocks PIV until a PUK reset. Test the PIN before a production restart.
  • Any one key plus its PIN unseals any node. Inherent to one shared seal key across Raft.
  • YubiKey is not on OpenBao's tested HSM list.

Next

Hardware test on arch-ws: throwaway key into 9d, single-node bao operator init, restart and confirm auto-unseal, then swap in a second key holding the same import and confirm it unseals the same data.

Research, 2026-11-06: YubiKey PKCS#11 auto-unseal works with OpenBao. Full report from a research subagent; the first two points I checked myself. ## Build support - Our pin (nixos-26.05, fa13731) ships OpenBao **2.6.5** with the `hsm` build tag on Linux by default (`pkgs/by-name/op/openbao/package.nix`: `withHsm ? stdenvNoCC.hostPlatform.isLinux`, `tags = lib.optional withHsm "hsm" ...`). The built-in `seal "pkcs11"` is compiled in. No override. - openbao.org 2.6.x docs: "This seal remains built-in in OpenBao v2.6.x, but will remain available only as an external plugin starting v2.7.0." - 2.7.2 is the current release (2026-10-26). nixos-unstable already carries 2.7.2 **without** the `hsm` tag. The plugin is `openbao-plugin-kms-pkcs11` in openbao/openbao-plugins, latest `kms-pkcs11-v0.3.0` (2026-11-03). It is not packaged in our pin. Config shape: `plugin "kms" "pkcs11" { command = "openbao-plugin-kms-pkcs11" sha256sum = "..." }` plus `plugin_directory`, and the `seal "pkcs11"` block keeps its name. ## YubiKey side (from yubico-piv-tool source, not checked by hand) - `libykcs11.so` (yubico-piv-tool 2.7.3 in nixpkgs) advertises `CKM_RSA_PKCS_OAEP` decrypt for RSA 1024-4096. The card does raw RSA and ykcs11 strips OAEP on the host, so `rsa_oaep_hash = "sha256"` works. - Firmware 5.7 imports RSA 2048/3072/4096 into 9a/9c/9d/9e. Use 2048 or 3072. 4096 is slow. - Slot 9d labels: private key `Private key for Key Management`, CKA_ID `0x03`. Token label `YubiKey PIV #<serial>`. - OpenBao encrypts in software with the exported public key and only asks the token to decrypt. That matches PIV 9d. - openbao#1921: a YubiKey user hit a public/private label mismatch. GH-3231 in 2.6.0 falls back to the private key's CKA_ID, which fixes it. - Do not use `key_id = "0x03"` alone. In ykcs11 it matches cert, private and public objects, and the lookup errors on more than two. ## Config (per think, serial differs) ```hcl seal "pkcs11" { lib = "<yubico-piv-tool>/lib/libykcs11.so" token_label = "YubiKey PIV #<serial>" key_label = "Private key for Key Management" mechanism = "RSA_PKCS_OAEP" rsa_oaep_hash = "sha256" } ``` - PIN through `BAO_HSM_PIN` from a root-only EnvironmentFile. `services.openbao.settings` renders into the world-readable store. - `services.pcscd.enable = true`; order openbao after pcscd. - Key import: `ykman piv keys import --pin-policy once --touch-policy never 9d seal.pem`. PIN policy `always` or touch `always` breaks unattended unseal. ## Risks - **Keep the seal PEM in an encrypted offline backup.** Losing all three keys without it loses the data; recovery keys cannot decrypt the root key under auto-unseal. - Wrong PIN 3 times blocks PIV until a PUK reset. Test the PIN before a production restart. - Any one key plus its PIN unseals any node. Inherent to one shared seal key across Raft. - YubiKey is not on OpenBao's tested HSM list. ## Next Hardware test on arch-ws: throwaway key into 9d, single-node `bao operator init`, restart and confirm auto-unseal, then swap in a second key holding the same import and confirm it unseals the same data.
Author
Owner

Results, 2026-11-06/07: YubiKey auto-unseal proven on hardware and in a VM test.

Hardware (arch-ws, two new YubiKey 5 Nano, fw 5.8.0)

Throwaway RSA-2048 key imported into PIV 9d (--pin-policy once --touch-policy never), libykcs11.so from yubico-piv-tool 2.7.3.

Check Result
ykcs11 objects Private key for Key Management / Public key for Key Management, CKA_ID 0x03
RSA-OAEP SHA-256 round trip (encrypt in software, decrypt on key) byte-identical
OpenBao 2.6.5 built-in seal: init, 3 restarts auto-unseal ~0.5s each, KV reads back
Key swap: same PEM on a second key, token_label changed unseals the data initialized on the first key
OpenBao 2.7.2 + openbao-plugin-kms-pkcs11 0.3.0, Raft storage: init, 3 restarts builtin: false, CKM_RSA_PKCS_OAEP SHA-256, auto-unseal every time, KV reads back
PIN tries after all runs 3/3

VM test (machine-configs feat/openbao-pkcs11, ffc6dc3, local)

checks.x86_64-linux.openbao-pkcs11-softhsm, 11/11: PIN only via EnvironmentFile (absent from store config and unit), init, restart auto-unseal, wrong PIN stays sealed with the unit active, token B unseals after token A is deleted.

Design facts confirmed

  • 2.7 has no built-in PKCS#11 seal. pkgs.openbao 2.7.2 builds without hsm; the plugin is required. nixpkgs-unstable carries openbaoPlugins.kms-pkcs11 at 0.2.1; we package 0.3.0 (the version tested on hardware).
  • The PIN is mandatory (go-kms-wrapping: "pin is required", C_Login on every operation). It lives in /var/lib/openbao-hsm/pkcs11.env, 0400 root, written once by the key ceremony. Never in Nix config: the store and the S3 binary cache are readable.
  • SoftHSM 2.x only does OAEP with SHA-1, so the VM test pins sha1; YubiKeys use sha256.
  • env in a plugin stanza replaces the plugin's whole environment and drops BAO_HSM_PIN. Don't set it.
  • OpenBao 2.7 has no file storage backend.

Before the ceremony

  • ykman piv reset both test keys (38686678, 38686829).
  • Choose PIN (shared across the three seal keys is fine), unique PUK and management key per key.
  • Choose the offline location for the encrypted seal-key PEM backup.
Results, 2026-11-06/07: YubiKey auto-unseal proven on hardware and in a VM test. ## Hardware (arch-ws, two new YubiKey 5 Nano, fw 5.8.0) Throwaway RSA-2048 key imported into PIV 9d (`--pin-policy once --touch-policy never`), `libykcs11.so` from yubico-piv-tool 2.7.3. | Check | Result | |---|---| | ykcs11 objects | `Private key for Key Management` / `Public key for Key Management`, CKA_ID `0x03` | | RSA-OAEP SHA-256 round trip (encrypt in software, decrypt on key) | byte-identical | | OpenBao 2.6.5 built-in seal: init, 3 restarts | auto-unseal ~0.5s each, KV reads back | | Key swap: same PEM on a second key, `token_label` changed | unseals the data initialized on the first key | | **OpenBao 2.7.2 + `openbao-plugin-kms-pkcs11` 0.3.0, Raft storage**: init, 3 restarts | `builtin: false`, `CKM_RSA_PKCS_OAEP` SHA-256, auto-unseal every time, KV reads back | | PIN tries after all runs | 3/3 | ## VM test (machine-configs `feat/openbao-pkcs11`, ffc6dc3, local) `checks.x86_64-linux.openbao-pkcs11-softhsm`, 11/11: PIN only via EnvironmentFile (absent from store config and unit), init, restart auto-unseal, wrong PIN stays sealed with the unit active, token B unseals after token A is deleted. ## Design facts confirmed - 2.7 has no built-in PKCS#11 seal. `pkgs.openbao` 2.7.2 builds without `hsm`; the plugin is required. nixpkgs-unstable carries `openbaoPlugins.kms-pkcs11` at 0.2.1; we package 0.3.0 (the version tested on hardware). - The PIN is mandatory (go-kms-wrapping: "pin is required", `C_Login` on every operation). It lives in `/var/lib/openbao-hsm/pkcs11.env`, 0400 root, written once by the key ceremony. Never in Nix config: the store and the S3 binary cache are readable. - SoftHSM 2.x only does OAEP with SHA-1, so the VM test pins `sha1`; YubiKeys use `sha256`. - `env` in a `plugin` stanza replaces the plugin's whole environment and drops `BAO_HSM_PIN`. Don't set it. - OpenBao 2.7 has no `file` storage backend. ## Before the ceremony - `ykman piv reset` both test keys (38686678, 38686829). - Choose PIN (shared across the three seal keys is fine), unique PUK and management key per key. - Choose the offline location for the encrypted seal-key PEM backup.
Author
Owner

Decisions, 2026-11-07 (supersede "Raft storage on tank" above).

  • Raft on the root SSD (/var/lib/openbao), not a tank dataset. Raft data is a few MB, and OpenBao must come up even when tank fails to import; no ordering on zfs-import-tank.
  • API TLS from day 0 with certs from the mc#9 ceremony (pki-infra), keys already on the thinks in /var/lib/openbao-tls/api.key. Delivered to the unit with systemd LoadCredential so the dynamic user can read a root-only key.
  • Seal keys placed: 38686829 → think-01, 38686965 → think-02, 38686678 → think-03. Loaded by the owner per the steps above (one RSA-3072 key imported into 9d of all three, PIN policy once, touch never, encrypted backup offline); OpenBao start-up confirms each key. Each think's token_label = "YubiKey PIV #<serial>".
  • OpenBao 2.7.2 + openbao-plugin-kms-pkcs11 0.3.0 (branch feat/openbao-pkcs11, ffc6dc3); PIN file /var/lib/openbao-hsm/pkcs11.env written by the owner.

Order: ceremony (mc#9) → certs + root into trust stores → host-openbao on the thinks → PIN files → bao operator init on think-01 → think-02/03 retry_join → import pki-infra → kured roll test.

Decisions, 2026-11-07 (supersede "Raft storage on tank" above). - **Raft on the root SSD** (`/var/lib/openbao`), not a `tank` dataset. Raft data is a few MB, and OpenBao must come up even when `tank` fails to import; no ordering on `zfs-import-tank`. - **API TLS from day 0** with certs from the mc#9 ceremony (`pki-infra`), keys already on the thinks in `/var/lib/openbao-tls/api.key`. Delivered to the unit with systemd `LoadCredential` so the dynamic user can read a root-only key. - **Seal keys placed:** 38686829 → think-01, 38686965 → think-02, 38686678 → think-03. Loaded by the owner per the steps above (one RSA-3072 key imported into 9d of all three, PIN policy once, touch never, encrypted backup offline); OpenBao start-up confirms each key. Each think's `token_label = "YubiKey PIV #<serial>"`. - **OpenBao 2.7.2 + `openbao-plugin-kms-pkcs11` 0.3.0** (branch `feat/openbao-pkcs11`, ffc6dc3); PIN file `/var/lib/openbao-hsm/pkcs11.env` written by the owner. Order: ceremony (mc#9) → certs + root into trust stores → host-openbao on the thinks → PIN files → `bao operator init` on think-01 → think-02/03 `retry_join` → import pki-infra → kured roll test.
Author
Owner

Live, 2026-11-07.

Bring-up

  • fb22c86 on main: OpenBao 2.7.2 + openbao-plugin-kms-pkcs11 0.3.0 on think-01..03, Raft on the root SSD, API TLS from pki-infra, each think on its own YubiKey (829/965/678).
  • First start failed with no matching token: nixpkgs-unstable runs pcscd as the unprivileged pcscd user, and the ccid udev rule only applies to devices plugged in after it exists. Fixed live with udevadm trigger --action=add --subsystem-match=usb --attr-match=idVendor=1050 + pcscd restart; from the next boot the rule applies at coldplug.
  • Owner ran bao operator init -recovery-shares=3 -recovery-threshold=2. Three voters, think-01 leader, all three unsealed by their own YubiKey at the same committed index.
  • pki-infra imported from the ceremony bundle (two issuers: intermediate with key, root cert only); bundle shredded.

kured roll (done-when item 3)

task node:request-reboot HOSTS='think-01 think-02 think-03' (new in e710bdb: /run/reboot-request is a reboot-marker reason, so the roll goes through marker, DRBD gate, kured fleet lock, boot verify).

Node Booted reboot-boot-verify
think-02 20:58:20Z PASS
think-01 21:07:54Z PASS
think-03 21:18:06Z PASS

Probe on arch-ws, /v1/sys/health on all three every 5s, 265 samples over 22 min:

  • samples with no active node: 0
  • samples with any node sealed (503): 0, every node went from down straight to unsealed standby
  • leader moved once, think-01 → think-02 at 21:06:04Z, with no gap

Done-when status

  • Three-node Raft healthy, each node auto-unseals after a reboot with no human input
  • Pulling a node's key leaves only that node sealed
  • A full kured roll of the thinks keeps OpenBao available throughout
  • Raft snapshot backup scheduled and a restore rehearsed
Live, 2026-11-07. ## Bring-up - `fb22c86` on main: OpenBao 2.7.2 + `openbao-plugin-kms-pkcs11` 0.3.0 on think-01..03, Raft on the root SSD, API TLS from `pki-infra`, each think on its own YubiKey (829/965/678). - First start failed with `no matching token`: nixpkgs-unstable runs pcscd as the unprivileged `pcscd` user, and the ccid udev rule only applies to devices plugged in after it exists. Fixed live with `udevadm trigger --action=add --subsystem-match=usb --attr-match=idVendor=1050` + pcscd restart; from the next boot the rule applies at coldplug. - Owner ran `bao operator init -recovery-shares=3 -recovery-threshold=2`. Three voters, think-01 leader, all three unsealed by their own YubiKey at the same committed index. - `pki-infra` imported from the ceremony bundle (two issuers: intermediate with key, root cert only); bundle shredded. ## kured roll (done-when item 3) `task node:request-reboot HOSTS='think-01 think-02 think-03'` (new in e710bdb: `/run/reboot-request` is a reboot-marker reason, so the roll goes through marker, DRBD gate, kured fleet lock, boot verify). | Node | Booted | reboot-boot-verify | |---|---|---| | think-02 | 20:58:20Z | PASS | | think-01 | 21:07:54Z | PASS | | think-03 | 21:18:06Z | PASS | Probe on arch-ws, `/v1/sys/health` on all three every 5s, 265 samples over 22 min: - samples with no active node: **0** - samples with any node sealed (503): **0**, every node went from down straight to unsealed standby - leader moved once, think-01 → think-02 at 21:06:04Z, with no gap ## Done-when status - [x] Three-node Raft healthy, each node auto-unseals after a reboot with no human input - [ ] Pulling a node's key leaves only that node sealed - [x] A full kured roll of the thinks keeps OpenBao available throughout - [ ] Raft snapshot backup scheduled and a restore rehearsed
Author
Owner

Key-pull test, 2026-11-07 (done-when item 2).

  1. Pulled think-03's YubiKey (38686678) while running: think-03 stayed an unsealed standby, no seal errors. The key is only used at unseal.
  2. task node:request-reboot HOSTS=think-03, rebooted 21:36Z with no key: Error configuring seal "pkcs11": no matching token, OpenBao down on think-03. think-02 active and think-01 standby throughout.
  3. Key re-plugged: device got the pcscd group at once (udev rule on a live plug), OpenBao unsealed, Raft caught up, standby again.

Probe, 103 samples every 5s: 0 with no active node; think-03 unreachable or sealed for 46 samples (~4 min).

Two gaps found and fixed in 62a7734:

  • The unit hit systemd's start limit after 5 failed seals, so the re-plugged key needed systemctl reset-failed. Now StartLimitIntervalSec=0, RestartSec=10s: plugging the key back in is the whole fix.
  • reboot-boot-verify passed with OpenBao sealed, so kured could take a second think and cost quorum. Not a health-check job (that rolls the generation back, a node fault per #6). reboot-marker gained generic sentinel gates beside drbdGate; each think now offers itself to kured only while OpenBao answers unsealed (200/429) on both peers.

Done-when status

  • Three-node Raft healthy, each node auto-unseals after a reboot with no human input
  • Pulling a node's key leaves only that node sealed
  • A full kured roll of the thinks keeps OpenBao available throughout
  • Raft snapshot backup scheduled and a restore rehearsed (plan: upstream openbao/openbao-snapshot-agent CronJob on the think cluster via Flux, Kubernetes auth with a snapshot-only policy, S3 bucket on mini's SeaweedFS with a lifecycle rule; restore rehearsed on arch-ws with a seal key)
Key-pull test, 2026-11-07 (done-when item 2). 1. Pulled think-03's YubiKey (38686678) while running: think-03 stayed an unsealed standby, no seal errors. The key is only used at unseal. 2. `task node:request-reboot HOSTS=think-03`, rebooted 21:36Z with no key: `Error configuring seal "pkcs11": no matching token`, OpenBao down on think-03. think-02 active and think-01 standby throughout. 3. Key re-plugged: device got the `pcscd` group at once (udev rule on a live plug), OpenBao unsealed, Raft caught up, standby again. Probe, 103 samples every 5s: **0** with no active node; think-03 unreachable or sealed for 46 samples (~4 min). Two gaps found and fixed in `62a7734`: - The unit hit systemd's start limit after 5 failed seals, so the re-plugged key needed `systemctl reset-failed`. Now `StartLimitIntervalSec=0`, `RestartSec=10s`: plugging the key back in is the whole fix. - `reboot-boot-verify` passed with OpenBao sealed, so kured could take a second think and cost quorum. Not a health-check job (that rolls the generation back, a node fault per #6). `reboot-marker` gained generic sentinel gates beside `drbdGate`; each think now offers itself to kured only while OpenBao answers unsealed (200/429) on both peers. ## Done-when status - [x] Three-node Raft healthy, each node auto-unseals after a reboot with no human input - [x] Pulling a node's key leaves only that node sealed - [x] A full kured roll of the thinks keeps OpenBao available throughout - [ ] Raft snapshot backup scheduled and a restore rehearsed (plan: upstream `openbao/openbao-snapshot-agent` CronJob on the think cluster via Flux, Kubernetes auth with a snapshot-only policy, S3 bucket on mini's SeaweedFS with a lifecycle rule; restore rehearsed on arch-ws with a seal key)
Author
Owner

Backups and restore rehearsal, 2026-11-07 (done-when item 4). All four items done.

Backups

flux-clusters 14d568de:

  • think: upstream ghcr.io/openbao/openbao-snapshot-agent:0.4.5 (digest-pinned) CronJob, hourly at :17, namespace openbao-snapshot. Logs in at auth/kubernetes-think (role raft-snapshot, policy: read sys/storage/raft/snapshot and infra/data/openbao-snapshot only), reads its S3 credentials from OpenBao (infra/openbao-snapshot), so the cluster holds no S3 secret. Reaches OpenBao through a selectorless Service over the three host IPs, TLS verified against the lab root as openbao.int.animeteamspeak.moe.
  • mini: SeaweedFS bucket openbao-snapshots (reclaim Retain), 30-day lifecycle, identity openbao-snapshot that can list and put but not delete.

First run 22:10Z: 7 s end to end, think/bao_2026-11-07-2210.snapshot (48,665 bytes) confirmed on the filer.

Restore rehearsal

On arch-ws, throwaway OpenBao 2.7.2 + kms-pkcs11 plugin with think-03's seal key (38686678) moved over (quorum gate held kured meanwhile):

  1. init a fresh single-node cluster on the same seal key
  2. bao operator raft snapshot restore -force with the S3 snapshot
  3. restart: auto-unsealed in 2 s with the seal key; the throwaway's own root token rejected (data replaced)
  4. production root token: pki-infra/issuers lists both issuers, infra/openbao-snapshot at version 1, kubernetes-think/ present

Throwaway data, PIN file and snapshot copy shredded afterwards.

Done-when

  • Three-node Raft healthy, each node auto-unseals after a reboot with no human input
  • Pulling a node's key leaves only that node sealed
  • A full kured roll of the thinks keeps OpenBao available throughout
  • Raft snapshot backup scheduled and a restore rehearsed

Still open elsewhere: revoke the root token once human auth exists; auth/kubernetes-think/config gets the new cluster CA after the rebuild (#14).

Backups and restore rehearsal, 2026-11-07 (done-when item 4). All four items done. ## Backups flux-clusters `14d568de`: - think: upstream `ghcr.io/openbao/openbao-snapshot-agent:0.4.5` (digest-pinned) CronJob, hourly at :17, namespace `openbao-snapshot`. Logs in at `auth/kubernetes-think` (role `raft-snapshot`, policy: read `sys/storage/raft/snapshot` and `infra/data/openbao-snapshot` only), reads its S3 credentials from OpenBao (`infra/openbao-snapshot`), so the cluster holds no S3 secret. Reaches OpenBao through a selectorless Service over the three host IPs, TLS verified against the lab root as `openbao.int.animeteamspeak.moe`. - mini: SeaweedFS bucket `openbao-snapshots` (reclaim Retain), 30-day lifecycle, identity `openbao-snapshot` that can list and put but not delete. First run 22:10Z: 7 s end to end, `think/bao_2026-11-07-2210.snapshot` (48,665 bytes) confirmed on the filer. ## Restore rehearsal On arch-ws, throwaway OpenBao 2.7.2 + kms-pkcs11 plugin with think-03's seal key (38686678) moved over (quorum gate held kured meanwhile): 1. init a fresh single-node cluster on the same seal key 2. `bao operator raft snapshot restore -force` with the S3 snapshot 3. restart: auto-unsealed in 2 s with the seal key; the throwaway's own root token rejected (data replaced) 4. production root token: `pki-infra/issuers` lists both issuers, `infra/openbao-snapshot` at version 1, `kubernetes-think/` present Throwaway data, PIN file and snapshot copy shredded afterwards. ## Done-when - [x] Three-node Raft healthy, each node auto-unseals after a reboot with no human input - [x] Pulling a node's key leaves only that node sealed - [x] A full kured roll of the thinks keeps OpenBao available throughout - [x] Raft snapshot backup scheduled and a restore rehearsed Still open elsewhere: revoke the root token once human auth exists; `auth/kubernetes-think/config` gets the new cluster CA after the rebuild (#14).
Author
Owner

All four done-when items met (see the last four comments). Follow-ups: revoke the root token once human auth exists; kubernetes-think reconfig after the rebuild (#14).

All four done-when items met (see the last four comments). Follow-ups: revoke the root token once human auth exists; kubernetes-think reconfig after the rebuild (#14).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lab/machine-configs#8
No description provided.