Implement lab 7 security and mTLS

This commit is contained in:
2026-11-26 16:55:53 +03:00
parent 20afc2c790
commit ab7b467957
54 changed files with 3240 additions and 25 deletions
+10
View File
@@ -0,0 +1,10 @@
#!/bin/sh
set -eu
# Rotate one KV value and recreate only the consumers; no image rebuild is needed.
VALUE=${1:?usage: openbao_rotation.sh NEW_DATABASE_URL}
TOKEN_FILE=${OPENBAO_TOKEN_FILE:-secrets/openbao_token.txt}
export BAO_ADDR=${BAO_ADDR:-http://127.0.0.1:8200}
export BAO_TOKEN=$(cat "$TOKEN_FILE")
bao kv put secret/messenger/database_url database_url="$VALUE" >/dev/null
OPENBAO_ENABLED=true docker compose up -d --force-recreate api1 api2 worker >/dev/null
echo "PASS: KV value rotated and consumers recreated without rebuilding images"