lab7: тесты безопасности и перевод своих тестов на HTTPS, документы (trust-matrix, THREAT_MODEL, OPERATOR, DEFENSE, WINDOWS, PR), сборщик доказательств, чистка legacy bench

This commit is contained in:
Alexey Bodanyuk
2026-11-27 17:43:14 +03:00
parent 05df1695fe
commit 84dbdb4735
44 changed files with 1644 additions and 2686 deletions
+6 -5
View File
@@ -140,6 +140,8 @@ services:
# service roles; the superuser `postgres` exists for initdb and the operator (local socket).
# The server key must be 0600 and owned by postgres: it is copied from the secret into a tmpfs
# at start (the bind-mounted secret cannot be chowned), then the image's entrypoint drops root.
# pg_hba.conf (infra/postgres, the source of truth in Git) is copied there too, so the lab 3
# failure test can add a temporary reject line and reload (student-tests/test_balancing.py).
postgres:
image: postgres:18.6-bookworm@sha256:afc7e2d441324c0388fa80c3d24f733b4194a4eb7f47dd8ee2b08eb1a24a647c
environment:
@@ -150,9 +152,10 @@ services:
- -c
- >-
install -o postgres -g postgres -m 600 /run/secrets/postgres.key /run/pgtls/server.key &&
install -m 644 /etc/postgresql/pg_hba.conf /run/pgtls/pg_hba.conf &&
exec docker-entrypoint.sh postgres
-c ssl=on -c ssl_cert_file=/run/secrets/postgres.crt -c ssl_key_file=/run/pgtls/server.key
-c ssl_min_protocol_version=TLSv1.2 -c hba_file=/etc/postgresql/pg_hba.conf
-c ssl_min_protocol_version=TLSv1.2 -c hba_file=/run/pgtls/pg_hba.conf
-c password_encryption=scram-sha-256
-c shared_preload_libraries=pg_stat_statements -c max_connections=${PG_MAX_CONNECTIONS:-100}
secrets:
@@ -165,6 +168,7 @@ services:
- pg_auditor_password
- {source: pki_postgres_crt, target: postgres.crt}
- {source: pki_postgres_key, target: postgres.key}
- {source: pki_internal_ca, target: internal-ca.crt} # operator/tests: psql verify-full inside
tmpfs:
- /run/pgtls:size=1m,mode=0755
volumes:
@@ -696,10 +700,7 @@ services:
# Distroless image (no shell). Lab 7: receiver HTTPS + client certificate required, exporters mTLS.
otel-collector:
image: otel/opentelemetry-collector-contrib:0.165.0@sha256:e40d61f10c9a617cca1ffd1be4d7e2b3a4b0f0001798ff07e58cabe82e618cea
command:
- --config=/etc/otelcol/collector.yaml
# traces-all (keep every span) | traces-tail (tail sampling, lab 6 track 1)
- --config=/etc/otelcol/${OTEL_COLLECTOR_TRACES:-traces-all}.yaml
command: ["--config=/etc/otelcol/collector.yaml"]
environment:
GOMEMLIMIT: 360MiB # Go heap target under the 512 MiB container limit
secrets: