lab4 s3 lvl4

This commit is contained in:
2026-11-01 01:18:40 +03:00
parent ec540a1a72
commit 6c0a3d8912
27 changed files with 1945 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
# Host-side: S3 (9000/9001) must not be published anywhere; the network must be internal.
set -eu
pub=$(docker compose ps s3 --format '{{.Publishers}}')
echo "s3 publishers: ${pub:-none}"
case "$pub" in ""|"[]") ;; *) echo "FAIL: s3 publishes ports" >&2; exit 1;; esac
for port in 9000 9001; do
if (exec 3<>/dev/tcp/127.0.0.1/$port) 2>/dev/null; then echo "FAIL: host can reach :$port" >&2; exit 1; fi
done
echo "PASS: S3 and console unreachable from host; run 'make check-s3' for in-network checks"