forked from mtusi2026/mtusi2026lab7
13 lines
581 B
Bash
13 lines
581 B
Bash
#!/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"
|