This commit is contained in:
+12
-3
@@ -1,5 +1,14 @@
|
||||
# Доказательства
|
||||
# Результаты проверок
|
||||
|
||||
Храните небольшие обезличенные результаты: команды и stdout проверок, JSON/CSV агрегатов нагрузки, EXPLAIN, dashboard JSON, текст разбора отказа. Укажите дату, commit, аппаратные лимиты и профиль нагрузки.
|
||||
- `smoke.txt` и `go-test.txt` содержат вывод проверок приложения и контракта.
|
||||
- `tls-audit.txt`, `openbao-expiry.txt`, `openbao-bootstrap.txt`, `http-security.txt` и `seal.json` содержат результаты проверок безопасности.
|
||||
- `hardening.jsonl` содержит настройки ограничений действующих контейнеров.
|
||||
- `persistence.txt`, `failover.txt` и файлы `*-containers.txt` содержат вывод тестов и состояние контейнеров до и после отказов.
|
||||
- `worker-experiment.json` содержит результат трёх повторов. `worker-access.txt` содержит проверки прав и отзыва. Файлы `worker-final-stack*` относятся к дополнительному прогону на пересобранном MinIO.
|
||||
- `argon2.txt` содержит микробенчмарк проверки пароля.
|
||||
- `tempo-recovery.txt` содержит проверку сбора телеметрии после восстановления Tempo.
|
||||
- `mc-verification.txt` содержит версию утилиты и проверку прав S3.
|
||||
- `lab7-verification.txt` и `lab7-verification-worker.json` содержат результаты повторной проверки нового функционала.
|
||||
- `scan-triage.md` содержит результаты сканирования и анализ применимости.
|
||||
|
||||
Не добавляйте .env, session tokens, cookies, приватные ключи, credentials, реальные сообщения, raw dumps и signed URLs. Для скриншотов скрывайте секреты. Большие логи/бинарные traces сохраняйте отдельно по правилам преподавателя; одного скриншота без методики недостаточно.
|
||||
Команды, условия эксперимента и ограничения приведены в отчёте. [Отчёт](../REPORT.md)
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
goos: darwin
|
||||
goarch: arm64
|
||||
pkg: gitflic.ru/akselbant/mtusi2026lab1-fork/internal/pkg/password
|
||||
cpu: Apple M1 Pro
|
||||
BenchmarkVerify-8 32 32857975 ns/op
|
||||
BenchmarkVerify-8 37 31957708 ns/op
|
||||
BenchmarkVerify-8 37 32891991 ns/op
|
||||
PASS
|
||||
ok gitflic.ru/akselbant/mtusi2026lab1-fork/internal/pkg/password 4.294s
|
||||
@@ -0,0 +1,7 @@
|
||||
mtusi2026lab7-postgres-1 postgres: sha256:f9cf3e1f0066f0eb0c48707d864f0ac5941e9ff454a072077d97a4d278d07d73
|
||||
mtusi2026lab7-minio-1 mtusi-lab7-minio:RELEASE.2025-09-07T16-13-09Z sha256:23ca84fbe6b325408bebcae09af30d0793a8b22df7a8706aeeaf5c4053f4c62b
|
||||
mtusi2026lab7-api-2 mtusi-messenger:lab7 sha256:db4a3aab8e56b5ffc6352d1d35bcbcf242b38b05d711b26308277f67fc6af082
|
||||
mtusi2026lab7-worker-1 mtusi-messenger:lab7 sha256:db4a3aab8e56b5ffc6352d1d35bcbcf242b38b05d711b26308277f67fc6af082
|
||||
mtusi2026lab7-api-1 mtusi-messenger:lab7 sha256:db4a3aab8e56b5ffc6352d1d35bcbcf242b38b05d711b26308277f67fc6af082
|
||||
mtusi2026lab7-openbao-1 openbao/openbao: sha256:5b2486ab0fb90bbc788cc345b0a08616dfb375873ee8be5df3a2fd4d378a67e0
|
||||
mtusi2026lab7-redis-1 redis: sha256:7f7d30b7fdd09467bac58198a1f166dd69789d348d4fe859cccb20e0cf287fbe
|
||||
@@ -0,0 +1,2 @@
|
||||
/mtusi2026lab7-api-2 hostname=d00541bf8861 status=exited stopped=2026-11-27T16:49:46.429730427Z
|
||||
/mtusi2026lab7-api-1 hostname=4947f19d488b status=exited stopped=2026-11-27T16:50:03.979200877Z
|
||||
@@ -0,0 +1,8 @@
|
||||
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "https://localhost:8443" --ca-file "/Users/dkhakimovig/mtusi2026lab7/.runtime/trust/ca.crt"
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 102, "failed_attempts": 2, "first_recovery_seconds": 3.481}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "https://localhost:8443" --ca-file "/Users/dkhakimovig/mtusi2026lab7/.runtime/trust/ca.crt"
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 106, "failed_attempts": 6, "first_recovery_seconds": 3.361}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
@@ -0,0 +1,40 @@
|
||||
? gitflic.ru/akselbant/mtusi2026lab1-fork/cmd [no test files]
|
||||
? gitflic.ru/akselbant/mtusi2026lab1-fork/cmd/reconcile [no test files]
|
||||
? gitflic.ru/akselbant/mtusi2026lab1-fork/cmd/tlsproxy [no test files]
|
||||
? gitflic.ru/akselbant/mtusi2026lab1-fork/cmd/worker [no test files]
|
||||
? gitflic.ru/akselbant/mtusi2026lab1-fork/contracts [no test files]
|
||||
ok gitflic.ru/akselbant/mtusi2026lab1-fork/dto (cached)
|
||||
ok gitflic.ru/akselbant/mtusi2026lab1-fork/internal/app/chat (cached)
|
||||
ok gitflic.ru/akselbant/mtusi2026lab1-fork/internal/attachment (cached)
|
||||
? gitflic.ru/akselbant/mtusi2026lab1-fork/internal/config [no test files]
|
||||
ok gitflic.ru/akselbant/mtusi2026lab1-fork/internal/observability (cached)
|
||||
? gitflic.ru/akselbant/mtusi2026lab1-fork/internal/pkg/domain [no test files]
|
||||
ok gitflic.ru/akselbant/mtusi2026lab1-fork/internal/pkg/password (cached)
|
||||
? gitflic.ru/akselbant/mtusi2026lab1-fork/internal/pkg/repository [no test files]
|
||||
ok gitflic.ru/akselbant/mtusi2026lab1-fork/internal/pkg/repository/postgres (cached)
|
||||
? gitflic.ru/akselbant/mtusi2026lab1-fork/internal/pkg/session [no test files]
|
||||
? gitflic.ru/akselbant/mtusi2026lab1-fork/internal/trust [no test files]
|
||||
ok gitflic.ru/akselbant/mtusi2026lab1-fork/internal/usecase/chat (cached)
|
||||
../mtusi2026lab6/.venv/bin/python scripts/validate_openapi.py
|
||||
/Users/dkhakimovig/mtusi2026lab6/.venv/lib/python3.9/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
|
||||
warnings.warn(
|
||||
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
|
||||
|
||||
go test -race ./...
|
||||
? gitflic.ru/akselbant/mtusi2026lab1-fork/cmd [no test files]
|
||||
? gitflic.ru/akselbant/mtusi2026lab1-fork/cmd/reconcile [no test files]
|
||||
? gitflic.ru/akselbant/mtusi2026lab1-fork/cmd/tlsproxy [no test files]
|
||||
? gitflic.ru/akselbant/mtusi2026lab1-fork/cmd/worker [no test files]
|
||||
? gitflic.ru/akselbant/mtusi2026lab1-fork/contracts [no test files]
|
||||
ok gitflic.ru/akselbant/mtusi2026lab1-fork/dto 1.303s
|
||||
ok gitflic.ru/akselbant/mtusi2026lab1-fork/internal/app/chat 12.211s
|
||||
ok gitflic.ru/akselbant/mtusi2026lab1-fork/internal/attachment 1.552s
|
||||
? gitflic.ru/akselbant/mtusi2026lab1-fork/internal/config [no test files]
|
||||
ok gitflic.ru/akselbant/mtusi2026lab1-fork/internal/observability 1.385s
|
||||
? gitflic.ru/akselbant/mtusi2026lab1-fork/internal/pkg/domain [no test files]
|
||||
ok gitflic.ru/akselbant/mtusi2026lab1-fork/internal/pkg/password 3.277s
|
||||
? gitflic.ru/akselbant/mtusi2026lab1-fork/internal/pkg/repository [no test files]
|
||||
ok gitflic.ru/akselbant/mtusi2026lab1-fork/internal/pkg/repository/postgres 1.476s
|
||||
? gitflic.ru/akselbant/mtusi2026lab1-fork/internal/pkg/session [no test files]
|
||||
? gitflic.ru/akselbant/mtusi2026lab1-fork/internal/trust [no test files]
|
||||
ok gitflic.ru/akselbant/mtusi2026lab1-fork/internal/usecase/chat 1.977s
|
||||
@@ -0,0 +1,18 @@
|
||||
{"name": "/mtusi2026lab7-api-1", "user": "messenger:messenger", "memory": 402653184, "cpus": 750000000, "readonly": true, "ports": {}}
|
||||
{"name": "/mtusi2026lab7-api-2", "user": "messenger:messenger", "memory": 402653184, "cpus": 750000000, "readonly": true, "ports": {}}
|
||||
{"name": "/mtusi2026lab7-collector-1", "user": "10001:10001", "memory": 201326592, "cpus": 750000000, "readonly": true, "ports": {}}
|
||||
{"name": "/mtusi2026lab7-collector_tls-1", "user": "10001:10001", "memory": 50331648, "cpus": 250000000, "readonly": true, "ports": {}}
|
||||
{"name": "/mtusi2026lab7-gateway-1", "user": "10001:10001", "memory": 67108864, "cpus": 750000000, "readonly": true, "ports": {"8443/tcp": [{"HostIp": "127.0.0.1", "HostPort": "8443"}]}}
|
||||
{"name": "/mtusi2026lab7-grafana-1", "user": "472", "memory": 201326592, "cpus": 750000000, "readonly": true, "ports": {"3000/tcp": [{"HostIp": "127.0.0.1", "HostPort": "13000"}]}}
|
||||
{"name": "/mtusi2026lab7-loki-1", "user": "10001", "memory": 201326592, "cpus": 750000000, "readonly": true, "ports": {}}
|
||||
{"name": "/mtusi2026lab7-loki_tls-1", "user": "10001:10001", "memory": 50331648, "cpus": 250000000, "readonly": true, "ports": {}}
|
||||
{"name": "/mtusi2026lab7-minio-1", "user": "10001:10001", "memory": 268435456, "cpus": 750000000, "readonly": true, "ports": {}}
|
||||
{"name": "/mtusi2026lab7-openbao-1", "user": "100:1000", "memory": 201326592, "cpus": 750000000, "readonly": true, "ports": {"8200/tcp": [{"HostIp": "127.0.0.1", "HostPort": "18200"}]}}
|
||||
{"name": "/mtusi2026lab7-postgres-1", "user": "postgres", "memory": 201326592, "cpus": 750000000, "readonly": true, "ports": {}}
|
||||
{"name": "/mtusi2026lab7-prometheus-1", "user": "nobody", "memory": 201326592, "cpus": 750000000, "readonly": true, "ports": {}}
|
||||
{"name": "/mtusi2026lab7-prometheus_tls-1", "user": "10001:10001", "memory": 50331648, "cpus": 250000000, "readonly": true, "ports": {}}
|
||||
{"name": "/mtusi2026lab7-redis-1", "user": "redis", "memory": 201326592, "cpus": 750000000, "readonly": true, "ports": {}}
|
||||
{"name": "/mtusi2026lab7-redis_tls-1", "user": "10001:10001", "memory": 50331648, "cpus": 250000000, "readonly": true, "ports": {}}
|
||||
{"name": "/mtusi2026lab7-tempo-1", "user": "10001:10001", "memory": 536870912, "cpus": 750000000, "readonly": true, "ports": {}}
|
||||
{"name": "/mtusi2026lab7-tempo_tls-1", "user": "10001:10001", "memory": 50331648, "cpus": 250000000, "readonly": true, "ports": {}}
|
||||
{"name": "/mtusi2026lab7-worker-1", "user": "messenger:messenger", "memory": 402653184, "cpus": 750000000, "readonly": true, "ports": {}}
|
||||
@@ -0,0 +1,4 @@
|
||||
PASS cross-chat attachment, spoofed identity and oversized upload denied
|
||||
{"limit_scope": "shared between replicas", "replicas": 2, "account_window": 30, "kdf_http_ms": [211.4, 93.1, 117.7, 119.9, 172.0, 192.7, 172.1, 291.8], "allowed": 8, "http_429": 2}
|
||||
PASS correlated login logs, traces and metrics present; no credential canaries
|
||||
PASS session expiry enforced with a previously valid token
|
||||
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"docker_platform": "linux/aarch64",
|
||||
"docker_vcpus": 2,
|
||||
"docker_memory_bytes": 2054832128,
|
||||
"fixture_png_bytes": 111817,
|
||||
"closed_loop_concurrency": 4,
|
||||
"queue_observation_seconds": 2,
|
||||
"runs": [
|
||||
{
|
||||
"worker_image_id": "sha256:db4a3aab8e56b5ffc6352d1d35bcbcf242b38b05d711b26308277f67fc6af082",
|
||||
"baseline": {
|
||||
"jobs": 8,
|
||||
"verified": 8,
|
||||
"ready_latency": {
|
||||
"p50_ms": 515.0,
|
||||
"p95_ms": 866.7,
|
||||
"p99_ms": 866.7
|
||||
},
|
||||
"read_retries": 0,
|
||||
"worker_sample": {
|
||||
"cpu": "34.46%",
|
||||
"memory": "21.99MiB / 384MiB"
|
||||
},
|
||||
"submission_latency": {
|
||||
"p50_ms": 67.2,
|
||||
"p95_ms": 115.7,
|
||||
"p99_ms": 115.7
|
||||
},
|
||||
"verified_per_second": 8.08
|
||||
},
|
||||
"incident": {
|
||||
"queued": 8,
|
||||
"verified": 8,
|
||||
"lost_or_duplicate": 0,
|
||||
"submission_latency": {
|
||||
"p50_ms": 69.4,
|
||||
"p95_ms": 136.6,
|
||||
"p99_ms": 136.6
|
||||
},
|
||||
"ready_latency": {
|
||||
"p50_ms": 34598.4,
|
||||
"p95_ms": 34921.9,
|
||||
"p99_ms": 34921.9
|
||||
},
|
||||
"read_retries": 0,
|
||||
"rotation_seconds": 31.56,
|
||||
"worker_unavailable_seconds": 35.08,
|
||||
"drain_seconds_after_start": 1.19
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
2026-11-29 Lab 7 verification
|
||||
python3 tests/security.py --base-url "https://localhost:8443" --ca-file ".runtime/trust/ca.crt"
|
||||
PASS: trusted HTTPS works; untrusted CA rejected. This does NOT verify internal mTLS, OpenBao or hardening.
|
||||
PASS cross-chat attachment, spoofed identity and oversized upload denied
|
||||
{"limit_scope": "shared between replicas", "replicas": 2, "account_window": 30, "kdf_http_ms": [71.2, 74.6, 56.9, 51.1, 59.8, 51.5, 80.7, 54.7], "allowed": 8, "http_429": 2}
|
||||
PASS correlated login logs, traces and metrics present; no credential canaries
|
||||
Container mtusi2026lab7-audit-run-a298efd9cfc5 Creating
|
||||
Container mtusi2026lab7-audit-run-a298efd9cfc5 Created
|
||||
PASS API 1 None: SSLV3_ALERT_HANDSHAKE_FAILURE
|
||||
PASS API 1 foreign: TLSV1_ALERT_UNKNOWN_CA
|
||||
PASS API 1 outsider: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS API 1 worker: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS API 1: gateway verified
|
||||
PASS API 2 None: SSLV3_ALERT_HANDSHAKE_FAILURE
|
||||
PASS API 2 foreign: TLSV1_ALERT_UNKNOWN_CA
|
||||
PASS API 2 outsider: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS API 2 worker: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS API 2: gateway verified
|
||||
PASS broker 6380 None: SSLV3_ALERT_HANDSHAKE_FAILURE
|
||||
PASS broker 6380 foreign: TLSV1_ALERT_UNKNOWN_CA
|
||||
PASS broker 6380 outsider: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS broker 6380 worker: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS broker 6381 None: SSLV3_ALERT_HANDSHAKE_FAILURE
|
||||
PASS broker 6381 foreign: TLSV1_ALERT_UNKNOWN_CA
|
||||
PASS broker 6381 outsider: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS broker 6381 api: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS collector None: SSLV3_ALERT_HANDSHAKE_FAILURE
|
||||
PASS collector foreign: TLSV1_ALERT_UNKNOWN_CA
|
||||
PASS collector outsider: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS collector:48888 worker: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS collector:48888 prometheus
|
||||
PASS collector:48889 worker: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS collector:48889 prometheus
|
||||
PASS loki:43102 worker: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS loki:43102 prometheus
|
||||
PASS tempo:43201 worker: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS tempo:43201 prometheus
|
||||
PASS prometheus:49090 worker: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS prometheus:49090 grafana
|
||||
PASS loki:43101 worker: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS loki:43101 grafana
|
||||
PASS tempo:43200 worker: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS tempo:43200 grafana
|
||||
PASS loki ingest wrong identity: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS tempo ingest wrong identity: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS ingress hostname verification
|
||||
PASS redis:6379 local hop closed
|
||||
PASS collector:4318 local hop closed
|
||||
PASS loki:3100 local hop closed
|
||||
PASS tempo:4318 local hop closed
|
||||
PASS tempo:3200 local hop closed
|
||||
PASS prometheus:9090 local hop closed
|
||||
Container mtusi2026lab7-audit-run-31c3b7d4058b Creating
|
||||
Container mtusi2026lab7-audit-run-31c3b7d4058b Created
|
||||
PASS OpenBao token expiry (30s)
|
||||
PASS OpenBao worker own KV allowed, peer KV and policy write denied
|
||||
PASS OpenBao api own KV allowed, peer KV and policy write denied
|
||||
PASS worker can consume queue; publish, foreign queue, sessions and FLUSHALL denied
|
||||
PASS PostgreSQL verified TLS; job read/processing update granted, business data/delete/DDL/plaintext denied.
|
||||
PASS S3 HTTPS: worker can read staging and write originals. Foreign prefixes, staging writes and admin denied.
|
||||
PASS retired worker / broker: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS retired worker / Collector: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS renewed leaf, retired identity denied on three channels, old password rejected
|
||||
PASS PostgreSQL verified TLS; job read/processing update granted, business data/delete/DDL/plaintext denied.
|
||||
PASS PostgreSQL rejects the retired worker password.
|
||||
PASS S3 HTTPS: worker can read staging and write originals. Foreign prefixes, staging writes and admin denied.
|
||||
PASS MinIO rejects the retired worker access key.
|
||||
@@ -0,0 +1,6 @@
|
||||
sha256:d38523086ff678e86a6191b197163443a33b6f092e51ae9f54b670163fadebef d6541ea280b73a834b64d4097e21f2be77676104
|
||||
mc version DEVELOPMENT.GOGET (commit-id=DEVELOPMENT.GOGET)
|
||||
Runtime: go1.27.3 linux/arm64
|
||||
Container mtusi2026lab7-s3_bootstrap-run-bcf8b994f2e6 Creating
|
||||
Container mtusi2026lab7-s3_bootstrap-run-bcf8b994f2e6 Created
|
||||
PASS S3 HTTPS: worker can read staging and write originals. Foreign prefixes, staging writes and admin denied.
|
||||
@@ -0,0 +1,2 @@
|
||||
PASS empty OpenBao store: initialized, unsealed, cert auth and isolated KV policies provisioned.
|
||||
PASS persistent stack configuration writes an audit journal.
|
||||
@@ -0,0 +1,5 @@
|
||||
Container mtusi2026lab7-audit-run-4ce46a03e251 Creating
|
||||
Container mtusi2026lab7-audit-run-4ce46a03e251 Created
|
||||
PASS OpenBao token expiry (30s)
|
||||
PASS OpenBao worker own KV allowed, peer KV and policy write denied
|
||||
PASS OpenBao api own KV allowed, peer KV and policy write denied
|
||||
@@ -0,0 +1,38 @@
|
||||
before
|
||||
/mtusi2026lab7-api-1 status=running started=2026-11-27T16:41:28.205383958Z
|
||||
/mtusi2026lab7-api-2 status=running started=2026-11-27T16:41:27.926193579Z
|
||||
/mtusi2026lab7-collector-1 status=running started=2026-11-27T16:36:07.268880787Z
|
||||
/mtusi2026lab7-collector_tls-1 status=running started=2026-11-27T16:41:27.922708764Z
|
||||
/mtusi2026lab7-gateway-1 status=running started=2026-11-27T16:36:09.668903997Z
|
||||
/mtusi2026lab7-grafana-1 status=running started=2026-11-27T16:36:07.341615309Z
|
||||
/mtusi2026lab7-loki-1 status=running started=2026-11-27T16:36:07.917430672Z
|
||||
/mtusi2026lab7-loki_tls-1 status=running started=2026-11-27T16:41:27.925395304Z
|
||||
/mtusi2026lab7-minio-1 status=running started=2026-11-27T16:36:07.310210109Z
|
||||
/mtusi2026lab7-openbao-1 status=running started=2026-11-27T16:39:43.552998715Z
|
||||
/mtusi2026lab7-postgres-1 status=running started=2026-11-27T16:39:39.878808884Z
|
||||
/mtusi2026lab7-prometheus-1 status=running started=2026-11-27T16:36:07.365658367Z
|
||||
/mtusi2026lab7-prometheus_tls-1 status=running started=2026-11-27T16:41:27.920688161Z
|
||||
/mtusi2026lab7-redis-1 status=running started=2026-11-27T16:36:07.395333024Z
|
||||
/mtusi2026lab7-redis_tls-1 status=running started=2026-11-27T16:41:27.921836738Z
|
||||
/mtusi2026lab7-tempo-1 status=running started=2026-11-27T16:36:07.511918724Z
|
||||
/mtusi2026lab7-tempo_tls-1 status=running started=2026-11-27T16:41:27.921389182Z
|
||||
/mtusi2026lab7-worker-1 status=running started=2026-11-27T16:43:39.761549977Z
|
||||
after
|
||||
/mtusi2026lab7-api-1 status=running started=2026-11-27T16:46:19.3733609Z
|
||||
/mtusi2026lab7-api-2 status=running started=2026-11-27T16:46:19.398886497Z
|
||||
/mtusi2026lab7-collector-1 status=running started=2026-11-27T16:46:12.943190222Z
|
||||
/mtusi2026lab7-collector_tls-1 status=running started=2026-11-27T16:46:13.501408153Z
|
||||
/mtusi2026lab7-gateway-1 status=running started=2026-11-27T16:46:16.652167603Z
|
||||
/mtusi2026lab7-grafana-1 status=running started=2026-11-27T16:46:13.412756837Z
|
||||
/mtusi2026lab7-loki-1 status=running started=2026-11-27T16:46:13.616969569Z
|
||||
/mtusi2026lab7-loki_tls-1 status=running started=2026-11-27T16:46:14.174041838Z
|
||||
/mtusi2026lab7-minio-1 status=running started=2026-11-27T16:46:12.836430974Z
|
||||
/mtusi2026lab7-openbao-1 status=running started=2026-11-27T16:46:13.033766768Z
|
||||
/mtusi2026lab7-postgres-1 status=running started=2026-11-27T16:46:13.430777685Z
|
||||
/mtusi2026lab7-prometheus-1 status=running started=2026-11-27T16:46:13.045784125Z
|
||||
/mtusi2026lab7-prometheus_tls-1 status=running started=2026-11-27T16:46:13.69213202Z
|
||||
/mtusi2026lab7-redis-1 status=running started=2026-11-27T16:46:12.944599852Z
|
||||
/mtusi2026lab7-redis_tls-1 status=running started=2026-11-27T16:46:13.511390234Z
|
||||
/mtusi2026lab7-tempo-1 status=running started=2026-11-27T16:46:13.584542535Z
|
||||
/mtusi2026lab7-tempo_tls-1 status=running started=2026-11-27T16:46:14.11889655Z
|
||||
/mtusi2026lab7-worker-1 status=running started=2026-11-27T16:46:16.441581739Z
|
||||
@@ -0,0 +1,3 @@
|
||||
python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "https://localhost:8443" --ca-file "/Users/dkhakimovig/mtusi2026lab7/.runtime/trust/ca.crt"
|
||||
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
|
||||
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
@@ -0,0 +1,47 @@
|
||||
# Разбор сканирования
|
||||
|
||||
Trivy 0.67.2 проверил собранный образ `mtusi-messenger:lab7` для linux/arm64 и манифесты Go. API, worker и TLS-прокси используют этот образ. Результаты получены 27 ноября 2026 г. Сценарий сохраняет полный JSON в `.runtime/scans`.
|
||||
|
||||
```sh
|
||||
./scripts/scan.sh mtusi-messenger:lab7
|
||||
```
|
||||
|
||||
| Проверка | Critical | High | Medium | Low | Unknown |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| Образ до обновлений | 4 | 46 | 53 | 9 | 2 |
|
||||
| Образ после обновлений | 0 | 0 | 14 | 8 | 1 |
|
||||
| Манифесты Go после обновлений | 0 | 0 | 6 | 4 | 1 |
|
||||
|
||||
Числа учитывают уникальные пары идентификатор уязвимости и пакет. Сканирование итогового образа не обнаружило секреты по правилам Trivy. Сканирование исходного кода и конфигурации runtime проводится отдельными проверками.
|
||||
|
||||
| Находка | Применимость и решение |
|
||||
| --- | --- |
|
||||
| Echo до 4.16.1, CVE-2026-118264 и CVE-2026-118650 | Публичные маршруты вызывают разбор пути Echo. Обновили Echo до 4.16.1. Повторили проверки ACL. |
|
||||
| pgx до 5.9.0, CVE-2026-33815 и CVE-2026-33816 | API и worker обрабатывают ответы PostgreSQL через pgx. Обновили pgx до 5.9.0. Повторили интеграционные проверки. |
|
||||
| Go TLS и x509, CVE-2026-111943 и CVE-2026-97031 | TLS работает на границах стенда. Собрали приложения на Go 1.27.3. Повторили матрицу mTLS. |
|
||||
| Alpine musl и zlib, CVE-2026-107891 и CVE-2026-85091 | В образе есть системные библиотеки и утилиты обработки. Обновили digest Alpine. Trivy подтвердил исправленные версии musl и zlib. |
|
||||
| Echo CVE-2026-118651 и CVE-2026-118653 | Лимит использует имя и общую квоту Redis. Заголовки IP не участвуют в определении квоты. |
|
||||
| Go HTTP/1 CVE-2026-97054 | Доступен путь HTTP/1. HAProxy отклоняет большой Content-Length. Потоковое тело ограничивает API. Остаточный риск DoS сохраняется. |
|
||||
| OpenSSL CVE-2026-107496, CVE-2026-95691 и CVE-2026-95692 | TLS в приложении выполняет стандартная библиотека Go. Сценарии CMS и QUIC в приложении не используются. Для системных библиотек остаётся риск при изменении способов запуска. |
|
||||
| OpenTelemetry CVE-2026-128085 и CVE-2026-81872 | Приложение отправляет ограниченный набор атрибутов. Клиент не управляет текстом лога. При большом количестве запросов остаётся риск нагрузки на SDK. Экспорт использует ограниченные очереди. |
|
||||
|
||||
Оценка применимости опирается на настройки и вызовы приложения. Наличие CVE пакета не подтверждает путь выполнения. Итоговый scan показывает состояние базы Trivy в дату запуска.
|
||||
|
||||
## Образы на границах доверия
|
||||
|
||||
```sh
|
||||
./scripts/scan.sh openbao/openbao:2.6.1 postgres:17-alpine redis:7.4-alpine haproxy:3.2-alpine \
|
||||
mtusi-lab7-minio:RELEASE.2025-09-07T16-13-09Z
|
||||
```
|
||||
|
||||
| Образ | Critical | High | Применимость |
|
||||
| --- | ---: | ---: | --- |
|
||||
| OpenBao 2.4.4, до обновления | 9 | 93 | В образе есть старый Go TLS. Cert auth использует TLS. OpenBao обновили. |
|
||||
| OpenBao 2.6.1 | 0 | 34 | В стенде включены только cert auth, локальный том и KV. Плагины SQL, облачные auth и recovery-mode выключены. Остальные находки требуют сопровождения образа. |
|
||||
| PostgreSQL 17.6, до обновления | 3 | 59 | Обновили до 17.12 в пределах одной основной версии. |
|
||||
| PostgreSQL 17.12 | 1 | 32 | Critical CVE-2025-68121 относится к `gosu`, а TLS принимает сервер PostgreSQL. Контейнер запускается сразу от `postgres`, без переключения пользователя через `gosu`. |
|
||||
| Redis 7.4 | 0 | 2 | Две находки относятся к OpenSSL QUIC. Redis принимает loopback TCP. Внешний слой использует Go TLS поверх TCP. |
|
||||
| HAProxy 3.2 | 0 | 0 | HAProxy принимает TLS 1.2 и новее поверх TCP. |
|
||||
| MinIO на Go 1.27.3 | 4 | 39 | Три Critical относятся к библиотеке уведомлений AMQP. Четвёртая относится к gRPC authz. В стенде разрешены S3 HTTPS и локальная консоль. Уведомления AMQP выключены. |
|
||||
|
||||
Журналы Trivy для этих образов также содержат Medium и Low. Список выше показывает критические и высокие находки. Сценарий без аргументов проверяет весь набор образов Compose. Для стенда сохраняются ограничения из модели угроз. [Модель угроз](../security/THREAT_MODEL.md)
|
||||
@@ -0,0 +1 @@
|
||||
{"sealed_to_unavailable_s": 39.86, "last_ready_after_seal_s": 37.55, "unseal_to_ready_s": 2.59, "previous_session_preserved": true}
|
||||
@@ -0,0 +1,6 @@
|
||||
python3 scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
python3 tests/smoke.py --base-url "https://localhost:8443" --ca-file ".runtime/trust/ca.crt"
|
||||
PASS: lab7 public API scenario; infrastructure and grading evidence remain separate.
|
||||
python3 tests/security.py --base-url "https://localhost:8443" --ca-file ".runtime/trust/ca.crt"
|
||||
PASS: trusted HTTPS works; untrusted CA rejected. This does NOT verify internal mTLS, OpenBao or hardening.
|
||||
@@ -0,0 +1,7 @@
|
||||
2026-11-29 Tempo recovery verification
|
||||
status=running restarts=0 oom=false memory_limit_bytes=536870912
|
||||
tempo-1 | level=info ts=2026-11-29T18:53:49.442546026Z caller=compactor.go:156 msg="compaction cycle complete. No more blocks to compact" tenantID=single-tenant
|
||||
tempo-1 | level=info ts=2026-11-29T18:54:19.443089576Z caller=compactor.go:156 msg="compaction cycle complete. No more blocks to compact" tenantID=single-tenant
|
||||
tempo-1 | level=info ts=2026-11-29T18:54:49.443179566Z caller=compactor.go:156 msg="compaction cycle complete. No more blocks to compact" tenantID=single-tenant
|
||||
mtusi2026lab7-tempo-1 240.2MiB / 512MiB
|
||||
PASS correlated login logs, traces and metrics present; no credential canaries
|
||||
@@ -0,0 +1,46 @@
|
||||
Container mtusi2026lab7-audit-run-5128938ac32d Creating
|
||||
Container mtusi2026lab7-audit-run-5128938ac32d Created
|
||||
PASS API 1 None: SSLV3_ALERT_HANDSHAKE_FAILURE
|
||||
PASS API 1 foreign: TLSV1_ALERT_UNKNOWN_CA
|
||||
PASS API 1 outsider: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS API 1 worker: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS API 1: gateway verified
|
||||
PASS API 2 None: SSLV3_ALERT_HANDSHAKE_FAILURE
|
||||
PASS API 2 foreign: TLSV1_ALERT_UNKNOWN_CA
|
||||
PASS API 2 outsider: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS API 2 worker: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS API 2: gateway verified
|
||||
PASS broker 6380 None: SSLV3_ALERT_HANDSHAKE_FAILURE
|
||||
PASS broker 6380 foreign: TLSV1_ALERT_UNKNOWN_CA
|
||||
PASS broker 6380 outsider: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS broker 6380 worker: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS broker 6381 None: SSLV3_ALERT_HANDSHAKE_FAILURE
|
||||
PASS broker 6381 foreign: TLSV1_ALERT_UNKNOWN_CA
|
||||
PASS broker 6381 outsider: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS broker 6381 api: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS collector None: SSLV3_ALERT_HANDSHAKE_FAILURE
|
||||
PASS collector foreign: TLSV1_ALERT_UNKNOWN_CA
|
||||
PASS collector outsider: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS collector:48888 worker: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS collector:48888 prometheus
|
||||
PASS collector:48889 worker: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS collector:48889 prometheus
|
||||
PASS loki:43102 worker: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS loki:43102 prometheus
|
||||
PASS tempo:43201 worker: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS tempo:43201 prometheus
|
||||
PASS prometheus:49090 worker: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS prometheus:49090 grafana
|
||||
PASS loki:43101 worker: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS loki:43101 grafana
|
||||
PASS tempo:43200 worker: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS tempo:43200 grafana
|
||||
PASS loki ingest wrong identity: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS tempo ingest wrong identity: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS ingress hostname verification
|
||||
PASS redis:6379 local hop closed
|
||||
PASS collector:4318 local hop closed
|
||||
PASS loki:3100 local hop closed
|
||||
PASS tempo:4318 local hop closed
|
||||
PASS tempo:3200 local hop closed
|
||||
PASS prometheus:9090 local hop closed
|
||||
@@ -0,0 +1,30 @@
|
||||
PASS worker can consume queue; publish, foreign queue, sessions and FLUSHALL denied
|
||||
PASS PostgreSQL verified TLS; job read/processing update granted, business data/delete/DDL/plaintext denied.
|
||||
PASS S3 HTTPS: worker can read staging and write originals. Foreign prefixes, staging writes and admin denied.
|
||||
PASS retired worker / broker: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS retired worker / Collector: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS renewed leaf, retired identity denied on three channels, old password rejected
|
||||
PASS PostgreSQL verified TLS; job read/processing update granted, business data/delete/DDL/plaintext denied.
|
||||
PASS PostgreSQL rejects the retired worker password.
|
||||
PASS S3 HTTPS: worker can read staging and write originals. Foreign prefixes, staging writes and admin denied.
|
||||
PASS MinIO rejects the retired worker access key.
|
||||
PASS worker can consume queue; publish, foreign queue, sessions and FLUSHALL denied
|
||||
PASS PostgreSQL verified TLS; job read/processing update granted, business data/delete/DDL/plaintext denied.
|
||||
PASS S3 HTTPS: worker can read staging and write originals. Foreign prefixes, staging writes and admin denied.
|
||||
PASS retired worker / broker: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS retired worker / Collector: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS renewed leaf, retired identity denied on three channels, old password rejected
|
||||
PASS PostgreSQL verified TLS; job read/processing update granted, business data/delete/DDL/plaintext denied.
|
||||
PASS PostgreSQL rejects the retired worker password.
|
||||
PASS S3 HTTPS: worker can read staging and write originals. Foreign prefixes, staging writes and admin denied.
|
||||
PASS MinIO rejects the retired worker access key.
|
||||
PASS worker can consume queue; publish, foreign queue, sessions and FLUSHALL denied
|
||||
PASS PostgreSQL verified TLS; job read/processing update granted, business data/delete/DDL/plaintext denied.
|
||||
PASS S3 HTTPS: worker can read staging and write originals. Foreign prefixes, staging writes and admin denied.
|
||||
PASS retired worker / broker: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS retired worker / Collector: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS renewed leaf, retired identity denied on three channels, old password rejected
|
||||
PASS PostgreSQL verified TLS; job read/processing update granted, business data/delete/DDL/plaintext denied.
|
||||
PASS PostgreSQL rejects the retired worker password.
|
||||
PASS S3 HTTPS: worker can read staging and write originals. Foreign prefixes, staging writes and admin denied.
|
||||
PASS MinIO rejects the retired worker access key.
|
||||
@@ -0,0 +1,136 @@
|
||||
{
|
||||
"docker_platform": "linux/aarch64",
|
||||
"docker_vcpus": 2,
|
||||
"docker_memory_bytes": 2054832128,
|
||||
"fixture_png_bytes": 111817,
|
||||
"closed_loop_concurrency": 4,
|
||||
"queue_observation_seconds": 2,
|
||||
"runs": [
|
||||
{
|
||||
"worker_image_id": "sha256:db4a3aab8e56b5ffc6352d1d35bcbcf242b38b05d711b26308277f67fc6af082",
|
||||
"baseline": {
|
||||
"jobs": 8,
|
||||
"verified": 8,
|
||||
"ready_latency": {
|
||||
"p50_ms": 596.7,
|
||||
"p95_ms": 927.4,
|
||||
"p99_ms": 927.4
|
||||
},
|
||||
"read_retries": 0,
|
||||
"worker_sample": {
|
||||
"cpu": "40.97%",
|
||||
"memory": "7.918MiB / 384MiB"
|
||||
},
|
||||
"submission_latency": {
|
||||
"p50_ms": 97.3,
|
||||
"p95_ms": 155.1,
|
||||
"p99_ms": 155.1
|
||||
},
|
||||
"verified_per_second": 7.22
|
||||
},
|
||||
"incident": {
|
||||
"queued": 8,
|
||||
"verified": 8,
|
||||
"lost_or_duplicate": 0,
|
||||
"submission_latency": {
|
||||
"p50_ms": 73.3,
|
||||
"p95_ms": 82.2,
|
||||
"p99_ms": 82.2
|
||||
},
|
||||
"ready_latency": {
|
||||
"p50_ms": 34644.6,
|
||||
"p95_ms": 35043.6,
|
||||
"p99_ms": 35043.6
|
||||
},
|
||||
"read_retries": 0,
|
||||
"rotation_seconds": 31.62,
|
||||
"worker_unavailable_seconds": 35.17,
|
||||
"drain_seconds_after_start": 1.22
|
||||
}
|
||||
},
|
||||
{
|
||||
"worker_image_id": "sha256:db4a3aab8e56b5ffc6352d1d35bcbcf242b38b05d711b26308277f67fc6af082",
|
||||
"baseline": {
|
||||
"jobs": 8,
|
||||
"verified": 8,
|
||||
"ready_latency": {
|
||||
"p50_ms": 678.8,
|
||||
"p95_ms": 970.5,
|
||||
"p99_ms": 970.5
|
||||
},
|
||||
"read_retries": 0,
|
||||
"worker_sample": {
|
||||
"cpu": "35.27%",
|
||||
"memory": "9.379MiB / 384MiB"
|
||||
},
|
||||
"submission_latency": {
|
||||
"p50_ms": 134.8,
|
||||
"p95_ms": 193.6,
|
||||
"p99_ms": 193.6
|
||||
},
|
||||
"verified_per_second": 6.76
|
||||
},
|
||||
"incident": {
|
||||
"queued": 8,
|
||||
"verified": 8,
|
||||
"lost_or_duplicate": 0,
|
||||
"submission_latency": {
|
||||
"p50_ms": 191.3,
|
||||
"p95_ms": 288.1,
|
||||
"p99_ms": 288.1
|
||||
},
|
||||
"ready_latency": {
|
||||
"p50_ms": 35133.3,
|
||||
"p95_ms": 35438.0,
|
||||
"p99_ms": 35438.0
|
||||
},
|
||||
"read_retries": 0,
|
||||
"rotation_seconds": 31.81,
|
||||
"worker_unavailable_seconds": 35.77,
|
||||
"drain_seconds_after_start": 1.33
|
||||
}
|
||||
},
|
||||
{
|
||||
"worker_image_id": "sha256:db4a3aab8e56b5ffc6352d1d35bcbcf242b38b05d711b26308277f67fc6af082",
|
||||
"baseline": {
|
||||
"jobs": 8,
|
||||
"verified": 8,
|
||||
"ready_latency": {
|
||||
"p50_ms": 688.9,
|
||||
"p95_ms": 988.6,
|
||||
"p99_ms": 988.6
|
||||
},
|
||||
"read_retries": 0,
|
||||
"worker_sample": {
|
||||
"cpu": "35.27%",
|
||||
"memory": "30.53MiB / 384MiB"
|
||||
},
|
||||
"submission_latency": {
|
||||
"p50_ms": 125.0,
|
||||
"p95_ms": 171.8,
|
||||
"p99_ms": 171.8
|
||||
},
|
||||
"verified_per_second": 6.67
|
||||
},
|
||||
"incident": {
|
||||
"queued": 8,
|
||||
"verified": 8,
|
||||
"lost_or_duplicate": 0,
|
||||
"submission_latency": {
|
||||
"p50_ms": 89.8,
|
||||
"p95_ms": 113.7,
|
||||
"p99_ms": 113.7
|
||||
},
|
||||
"ready_latency": {
|
||||
"p50_ms": 34903.0,
|
||||
"p95_ms": 35236.6,
|
||||
"p99_ms": 35236.6
|
||||
},
|
||||
"read_retries": 0,
|
||||
"rotation_seconds": 31.78,
|
||||
"worker_unavailable_seconds": 35.4,
|
||||
"drain_seconds_after_start": 1.26
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
PASS worker can consume queue; publish, foreign queue, sessions and FLUSHALL denied
|
||||
PASS PostgreSQL verified TLS; job read/processing update granted, business data/delete/DDL/plaintext denied.
|
||||
PASS S3 HTTPS: worker can read staging and write originals. Foreign prefixes, staging writes and admin denied.
|
||||
PASS retired worker / broker: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS retired worker / Collector: SSLV3_ALERT_BAD_CERTIFICATE
|
||||
PASS renewed leaf, retired identity denied on three channels, old password rejected
|
||||
PASS PostgreSQL verified TLS; job read/processing update granted, business data/delete/DDL/plaintext denied.
|
||||
PASS PostgreSQL rejects the retired worker password.
|
||||
PASS S3 HTTPS: worker can read staging and write originals. Foreign prefixes, staging writes and admin denied.
|
||||
PASS MinIO rejects the retired worker access key.
|
||||
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"docker_platform": "linux/aarch64",
|
||||
"docker_vcpus": 2,
|
||||
"docker_memory_bytes": 2054832128,
|
||||
"fixture_png_bytes": 111817,
|
||||
"closed_loop_concurrency": 4,
|
||||
"queue_observation_seconds": 2,
|
||||
"runs": [
|
||||
{
|
||||
"worker_image_id": "sha256:db4a3aab8e56b5ffc6352d1d35bcbcf242b38b05d711b26308277f67fc6af082",
|
||||
"baseline": {
|
||||
"jobs": 8,
|
||||
"verified": 8,
|
||||
"ready_latency": {
|
||||
"p50_ms": 537.0,
|
||||
"p95_ms": 863.6,
|
||||
"p99_ms": 863.6
|
||||
},
|
||||
"read_retries": 0,
|
||||
"worker_sample": {
|
||||
"cpu": "33.60%",
|
||||
"memory": "19.06MiB / 384MiB"
|
||||
},
|
||||
"submission_latency": {
|
||||
"p50_ms": 89.2,
|
||||
"p95_ms": 107.8,
|
||||
"p99_ms": 107.8
|
||||
},
|
||||
"verified_per_second": 7.78
|
||||
},
|
||||
"incident": {
|
||||
"queued": 8,
|
||||
"verified": 8,
|
||||
"lost_or_duplicate": 0,
|
||||
"submission_latency": {
|
||||
"p50_ms": 64.8,
|
||||
"p95_ms": 87.3,
|
||||
"p99_ms": 87.3
|
||||
},
|
||||
"ready_latency": {
|
||||
"p50_ms": 34727.6,
|
||||
"p95_ms": 35094.8,
|
||||
"p99_ms": 35094.8
|
||||
},
|
||||
"read_retries": 0,
|
||||
"rotation_seconds": 31.68,
|
||||
"worker_unavailable_seconds": 35.22,
|
||||
"drain_seconds_after_start": 1.22
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user