forked from mtusi2026/mtusi2026lab7
lab7: обязательное mTLS LB->API с allowlist identity (SAN lb), health только на loopback, скрипт отрицательных проверок mtls_check
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
# LB -> API mTLS proof: scripts/mtls_check.py in the `edge` network + the API's own record of the
|
||||
# identity refusals (event mtls_identity_rejected, SAN of the refused client) since the run started.
|
||||
set -eu
|
||||
cd "$(dirname "$0")/.."
|
||||
since="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
||||
rc=0
|
||||
docker compose run --rm mtls-check 2>/dev/null || rc=$?
|
||||
echo
|
||||
echo "API log since $since, identity allowlist refusals (cases 1-2 are dropped by TLS and never logged):"
|
||||
docker compose logs --no-log-prefix --since "$since" api 2>/dev/null | grep mtls_identity_rejected || echo " (none)"
|
||||
exit "$rc"
|
||||
Reference in New Issue
Block a user