10 lines
540 B
Bash
Executable File
10 lines
540 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
export BAO_ADDR=${BAO_ADDR:-http://127.0.0.1:8200}
|
|
docker compose exec -T openbao bao operator seal >/dev/null
|
|
if docker compose exec -T api1 python -c 'import urllib.request; urllib.request.urlopen("https://127.0.0.1:8080/health/ready", context=__import__("ssl")._create_unverified_context(), timeout=3)' >/dev/null 2>&1; then
|
|
echo "FAIL: API remained ready while OpenBao was sealed"; exit 1
|
|
fi
|
|
echo "PASS: API is unavailable while OpenBao is sealed"
|
|
echo "Unseal with two operator keys before continuing the defense."
|