forked from mtusi2026/mtusi2026lab7
Implement lab 7 security and mTLS
This commit is contained in:
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/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."
|
||||
Reference in New Issue
Block a user