lab 7 openbao

This commit is contained in:
2026-11-23 14:39:13 +03:00
parent 20afc2c790
commit 912a874f00
118 changed files with 12464 additions and 5108 deletions
+9
View File
@@ -0,0 +1,9 @@
#!/bin/sh
# Operator step after EVERY OpenBao restart (the vault starts sealed). Needs any 2 of the 3 shares.
set -eu
cd "$(dirname "$0")/.."; . scripts/bao_lib.sh
for i in 1 2 3; do
baoc status -format=json 2>/dev/null | grep -q "\"sealed\": false" && { echo "OpenBao unsealed"; exit 0; }
[ -f "$OPD/unseal-$i" ] && baoc operator unseal "$(cat "$OPD/unseal-$i")" >/dev/null
done
baoc status -format=json 2>/dev/null | grep -q "\"sealed\": false" && echo "OpenBao unsealed" || { echo "still sealed: need 2 shares" >&2; exit 1; }