forked from mtusi2026/mtusi2026lab7
Лабораторная 7: безопасность, mTLS и OpenBao, оценка 3
This commit is contained in:
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
cd "$(dirname "$0")/.."
|
||||
# Temporary third API, same scoped role and no published ports. It is not in LB DNS.
|
||||
name=mtusi-lab7-expiry
|
||||
cleanup() { docker rm -f "$name" >/dev/null 2>&1 || true; }
|
||||
trap cleanup EXIT INT TERM
|
||||
docker compose run --no-deps -d --name "$name" -e SESSION_TTL_SECONDS=2 api >/dev/null
|
||||
# Wait for the real TLS listener inside this one service, then test the expiry.
|
||||
for attempt in 1 2 3 4 5 6 7 8 9 10; do
|
||||
if docker exec "$name" test -f /tmp/instance-alias; then break; fi
|
||||
sleep 1
|
||||
done
|
||||
docker run --rm --network mtusi-lab7_default -e EXPIRY_TARGET="$name" -v "$PWD:/audit:ro" --entrypoint python mtusi-lab7-worker /audit/student-tests/internal.py
|
||||
Reference in New Issue
Block a user