forked from mtusi2026/mtusi2026lab7
7 — Т2302 — ебедев — на 5
This commit is contained in:
@@ -3,3 +3,23 @@
|
||||
Храните небольшие обезличенные результаты: команды и stdout проверок, JSON/CSV агрегатов нагрузки, EXPLAIN, dashboard JSON, текст разбора отказа. Укажите дату, commit, аппаратные лимиты и профиль нагрузки.
|
||||
|
||||
Не добавляйте .env, session tokens, cookies, приватные ключи, credentials, реальные сообщения, raw dumps и signed URLs. Для скриншотов скрывайте секреты. Большие логи/бинарные traces сохраняйте отдельно по правилам преподавателя; одного скриншота без методики недостаточно.
|
||||
|
||||
## Содержимое (lab7, прогон `scripts/collect-evidence.sh` с нуля — 2026-11-22, 2 vCPU / 7 ГиБ)
|
||||
|
||||
| Файл | Что доказывает |
|
||||
| --- | --- |
|
||||
| `stack.txt`, `published-ports.txt` | версии, образы, состояние контейнеров; на хосте только 127.0.0.1:8443-8445/3000/8200 |
|
||||
| `pki-status.txt`, `openbao-status.txt` | локальный PKI (19 identity, 30 дней); OpenBao raft initialized/unsealed, KV-ключи и токены без значений |
|
||||
| `migrations.txt`, `broker-bootstrap.txt`, `s3-bootstrap.txt` | роли БД, stream/consumer, bucket и проверка prefix-прав |
|
||||
| `kdf-bench.txt` | выбор параметров Argon2id |
|
||||
| `make-check.txt`, `smoke.txt`, `test-security-public.txt` | публичные проверки по HTTPS с CA |
|
||||
| `internal-security.txt`, `internal-security-final.txt` | матрица доверия: mTLS/identity/ACL/policy/TLS-аудит (до и после всех ротаций) |
|
||||
| `test-security.txt`, `test-hardening.txt` (`hardening.json`) | граница, ACL, лимиты, Argon2id; привилегии, порты, секреты |
|
||||
| `dep-scan.txt` (`scan/deps.json`) | dependency scan с решениями из `security/scan-triage.json` |
|
||||
| `test-*.txt` (lab2–lab6) | регрессия поверх HTTPS/mTLS/OpenBao |
|
||||
| `failover-*.txt`, `restore-*.txt`, `failover-hook.txt`, `persistence.txt`, `restart-hook.txt` | отказ реплики и рестарт всех хранилищ (PID/StartedAt до/после) |
|
||||
| `test-lifecycle.txt` (`lifecycle.json`) | ротации БД/S3/сертификата под нагрузкой, sealed OpenBao, токены |
|
||||
| `track1-worker-compromise.txt`, `track1/` | трек 5.1: матрица до/после, реакция, восстановление |
|
||||
| `login-dos.txt` (`login_dos.json`) | бюджет защиты от login DoS |
|
||||
| `jobs-invariants.txt`, `smoke-final.txt`, `load.txt` (`load.json`) | итог: инварианты заданий, smoke и нагрузка после всех воздействий |
|
||||
| `secret-scan.txt` | в репозитории и evidence нет ключей, токенов и значений секретов |
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# 2026-11-22T19:18:55Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ dc logs --no-log-prefix broker-init
|
||||
{"ts": "2026-11-22T19:18:35.932Z", "level": "warning", "service": "messenger", "logger": "asyncio", "event": "returning true from eof_received() has no effect when using ssl", "msg": "returning true from eof_received() has no effect when using ssl"}
|
||||
{"ts": "2026-11-22T19:18:35.932Z", "level": "warning", "service": "messenger", "logger": "messenger.broker", "event": "broker disconnected", "msg": "broker disconnected"}
|
||||
{"created": {"stream": true, "consumer": true}, "stream": {"name": "ATTACHMENT_JOBS", "subjects": ["attachments.process.v1"], "storage": "file", "retention": "workqueue", "duplicate_window_s": 120.0, "max_msgs": 100000, "messages": 0}, "consumer": {"durable": "attachment-workers", "ack_policy": "explicit", "ack_wait_s": 20.0, "max_ack_pending": 16, "max_deliver": -1}}
|
||||
exit=0
|
||||
@@ -0,0 +1,43 @@
|
||||
# 2026-11-22T19:19:46Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 scripts/dep_scan.py --db /home/claude/deps/ghsa --json evidence/scan/deps.json
|
||||
## dependency scan: 42 components, 38021 advisories in DB, 13 findings, 0 untriaged
|
||||
HIGH GHSA-ffqx-q65f-36jf github.com/grafana/tempo 2.8.4 CVE-2026-28377 → fixed 2.10.3
|
||||
[grafana/tempo:2.8.4] Grafana Tempo has Inadequate Encryption Strength
|
||||
triage: not_applicable — Tempo раскрывает ключ S3 SSE-C через /status/config; у нас backend local (без S3 и SSE-C), а /status/* недоступен: шлюз tempo-gw пускает grafana только на /api/*, prometheus — на /metrics.
|
||||
HIGH GHSA-qrcv-3558-gj4f github.com/nats-io/nats-server/v2 2.11.17 CVE-2026-58213 → fixed 2.12.9
|
||||
[nats:2.11.17-alpine] NATS Server: MQTT SUBSCRIBE Protocol Injection via Leaf Node/Route Forwarding allows arbitrary NATS command injection
|
||||
triage: not_applicable — MQTT и leafnode/route не настроены в infra/nats/nats.conf (только client listener 4222 с mTLS).
|
||||
HIGH GHSA-r72h-j7qq-v6qg github.com/nats-io/nats-server/v2 2.11.17 CVE-2026-58210 → fixed 2.12.12
|
||||
[nats:2.11.17-alpine] NATS Server allows unauthenticated memory exhaustion through incomplete MQTT CONNECT packets
|
||||
triage: not_applicable — MQTT не включён (нет блока mqtt в nats.conf).
|
||||
HIGH GHSA-wg65-39gg-5wfj github.com/prometheus/prometheus 0.305.5 CVE-2026-42151 → fixed 0.311.3
|
||||
[prom/prometheus:v3.5.5 (module v0.305.5)] Prometheus Azure AD remote write OAuth client secret exposed via config API
|
||||
triage: not_applicable — Azure AD remote write не используется; /-/config недоступен снаружи namespace (шлюз пускает только API-пути по identity).
|
||||
MODERATE GHSA-497x-rrr9-68jp github.com/grafana/loki/v3 3.5.3 CVE-2026-21726 → fixed 3.6.4
|
||||
[grafana/loki:3.5.3] Grafana Loki Path Traversal - CVE-2021-36156 Bypass
|
||||
triage: mitigated — Обход path traversal в Ruler API /loki/api/v1/rules/{namespace}: ruler не настроен, шлюз loki-gw запрещает /loki/api/v1/rules и /api/ всем identity (internal_security.py: grafana → 403 на запись/ruler). Исправление только в 3.6.4 (минорный апгрейд) — запланирован.
|
||||
MODERATE GHSA-4g68-3pwx-5vfj github.com/nats-io/nats-server/v2 2.11.17 CVE-2026-58214 → fixed 2.12.12
|
||||
[nats:2.11.17-alpine] NATS Server MQTT subscribe permission bypass exposes internal QoS 2 metadata
|
||||
triage: not_applicable — MQTT не включён.
|
||||
MODERATE GHSA-7qmq-8cc4-hxwg github.com/nats-io/nats-server/v2 2.11.17 CVE-2026-58209 → fixed 2.12.12
|
||||
[nats:2.11.17-alpine] NATS Server MQTT retained messages and QoS replay bypass subscription deny rules
|
||||
triage: not_applicable — MQTT не включён.
|
||||
MODERATE GHSA-p3j5-5hrq-p75h github.com/nats-io/nats-server/v2 2.11.17 CVE-2026-58254 → fixed 2.12.8
|
||||
[nats:2.11.17-alpine] nats-server Leaf node connections bypass Nats-Trace-Dest permission check
|
||||
triage: not_applicable — Leafnode-соединений нет (нет блока leafnodes).
|
||||
MODERATE GHSA-p957-7v2w-g93g github.com/nats-io/nats-server/v2 2.11.17 CVE-2026-58208 → fixed 2.12.12
|
||||
[nats:2.11.17-alpine] NATS Server: MQTT-over-WebSocket Path Can Crash WebSocket-Only JetStream Servers Before MQTT Is Enabled
|
||||
triage: not_applicable — WebSocket-listener не настроен (нет блока websocket).
|
||||
MODERATE GHSA-vffh-x6r8-xx99 github.com/prometheus/prometheus 0.305.5 CVE-2026-40179 → fixed 0.311.2-0.20260410083055-07c6232d159b
|
||||
[prom/prometheus:v3.5.5 (module v0.305.5)] Prometheus has Stored XSS via metric names and label values in Prometheus web UI tooltips and metrics explorer
|
||||
triage: mitigated — XSS в web UI Prometheus: UI не опубликован (Prometheus слушает 127.0.0.1:9091, шлюз отдаёт только /api/v1/* identity grafana); метрики пишут только otel-collector и tempo (mTLS). Остаточно: скомпрометированный Collector + оператор, открывший UI через exec. Плановый переход на 3.11.x при следующем LTS.
|
||||
MODERATE GHSA-fw8g-cg8f-9j28 github.com/prometheus/prometheus 0.305.5 CVE-2026-44903 → fixed 0.311.3
|
||||
[prom/prometheus:v3.5.5 (module v0.305.5)] Prometheus vulnerable to stored XSS via crafted histogram bucket label values in the old web UI heatmap display
|
||||
triage: not_applicable — Legacy UI (--enable-feature=old-ui) не включён; UI не опубликован.
|
||||
MODERATE GHSA-xcq7-p3pf-p88h opentelemetry-api 1.45.0 CVE-2026-114603 → fixed 1.45.1
|
||||
[app image (requirements.txt)] OpenTelemetry Python: Unbounded tracestate parsing in opentelemetry-api
|
||||
triage: mitigated — Квадратичный разбор tracestate. API не принимает внешний traceparent/tracestate (новый корневой span, заголовки клиента игнорируются); worker извлекает контекст из сообщений NATS, а telemetry.extract() пропускает к парсеру только tracestate ≤ 512 байт без пробелов. SDK 1.45.0 требует api==1.45.0 — обновляем вместе с SDK.
|
||||
MODERATE GHSA-mf5v-w3w3-f6cg opentelemetry-api 1.45.0 CVE-2026-126360 → fixed 1.45.2
|
||||
[app image (requirements.txt)] OpenTelemetry Python API: Denial of service through quadratic-time traceparent parsing
|
||||
triage: mitigated — ReDoS traceparent: telemetry.extract() пропускает только строго валидный traceparent (regex ^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$) — длинные/с пробелами значения до парсера не доходят; внешние заголовки API не извлекает вовсе.
|
||||
exit=0
|
||||
@@ -0,0 +1,6 @@
|
||||
# 2026-11-22T19:32:45Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 tests/resilience.py --mode failover --action-script scripts/stop-one.sh --base-url https://127.0.0.1:8443 --ca-file /home/claude/work7/mtusi2026lab7/secrets/tls/trust/ca.crt
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 121, "failed_attempts": 4, "first_recovery_seconds": 6.667}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
exit=0
|
||||
@@ -0,0 +1,6 @@
|
||||
# 2026-11-22T19:33:10Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 tests/resilience.py --mode failover --action-script scripts/stop-one.sh --base-url https://127.0.0.1:8443 --ca-file /home/claude/work7/mtusi2026lab7/secrets/tls/trust/ca.crt
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 117, "failed_attempts": 4, "first_recovery_seconds": 6.743}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
exit=0
|
||||
@@ -0,0 +1,108 @@
|
||||
== 2026-11-22T19:32:48Z stop-one target=api-5c3ca745 container=mtusi-lab7-api-2
|
||||
api mtusi-lab7-api-1 status=running started=2026-11-22T19:32:38.319180855Z pid=18090
|
||||
api mtusi-lab7-api-2 status=running started=2026-11-22T19:32:38.501684609Z pid=18152
|
||||
api-fault mtusi-lab7-api-fault-1 status=exited started=2026-11-22T19:28:12.227762751Z pid=0
|
||||
api-ttl mtusi-lab7-api-ttl-1 status=running started=2026-11-22T19:32:23.34001516Z pid=15971
|
||||
broker-init mtusi-lab7-broker-init-1 status=exited started=2026-11-22T19:32:25.097435302Z pid=0
|
||||
grafana mtusi-lab7-grafana-1 status=running started=2026-11-22T19:32:02.835608136Z pid=13448
|
||||
lb mtusi-lab7-lb-1 status=running started=2026-11-22T19:32:28.903106946Z pid=16918
|
||||
loki mtusi-lab7-loki-1 status=running started=2026-11-22T19:32:03.092539543Z pid=13588
|
||||
loki-gw mtusi-lab7-loki-gw-1 status=running started=2026-11-22T19:31:55.958117769Z pid=12263
|
||||
migrate mtusi-lab7-migrate-1 status=exited started=2026-11-22T19:32:24.299213248Z pid=0
|
||||
nats mtusi-lab7-nats-1 status=running started=2026-11-22T19:31:55.889367104Z pid=12149
|
||||
openbao mtusi-lab7-openbao-1 status=running started=2026-11-22T19:31:56.795907096Z pid=12692
|
||||
ops mtusi-lab7-ops-1 status=running started=2026-11-22T19:18:51.277353279Z pid=32140
|
||||
otel-collector mtusi-lab7-otel-collector-1 status=running started=2026-11-22T19:32:02.455315938Z pid=13345
|
||||
otel-gw mtusi-lab7-otel-gw-1 status=running started=2026-11-22T19:31:55.847576679Z pid=12066
|
||||
postgres mtusi-lab7-postgres-1 status=running started=2026-11-22T19:31:55.99860804Z pid=12309
|
||||
prometheus mtusi-lab7-prometheus-1 status=running started=2026-11-22T19:32:02.453558848Z pid=13339
|
||||
prometheus-gw mtusi-lab7-prometheus-gw-1 status=running started=2026-11-22T19:31:55.784901171Z pid=12016
|
||||
redis mtusi-lab7-redis-1 status=running started=2026-11-22T19:31:55.877316004Z pid=12150
|
||||
s3 mtusi-lab7-s3-1 status=running started=2026-11-22T19:31:57.131455025Z pid=12800
|
||||
s3-init mtusi-lab7-s3-init-1 status=exited started=2026-11-22T19:32:24.81113587Z pid=0
|
||||
tempo mtusi-lab7-tempo-1 status=running started=2026-11-22T19:32:07.499704841Z pid=13948
|
||||
tempo-gw mtusi-lab7-tempo-gw-1 status=running started=2026-11-22T19:31:55.953820024Z pid=12254
|
||||
volumes-init mtusi-lab7-volumes-init-1 status=exited started=2026-11-22T19:32:24.123066082Z pid=0
|
||||
worker mtusi-lab7-worker-1 status=running started=2026-11-22T19:32:38.717919946Z pid=18224
|
||||
worker mtusi-lab7-worker-2 status=running started=2026-11-22T19:32:39.270612502Z pid=18332
|
||||
== 2026-11-22T19:32:53Z after stop
|
||||
api mtusi-lab7-api-1 status=running started=2026-11-22T19:32:38.319180855Z pid=18090
|
||||
api mtusi-lab7-api-2 status=exited started=2026-11-22T19:32:38.501684609Z pid=0
|
||||
api-fault mtusi-lab7-api-fault-1 status=exited started=2026-11-22T19:28:12.227762751Z pid=0
|
||||
api-ttl mtusi-lab7-api-ttl-1 status=running started=2026-11-22T19:32:23.34001516Z pid=15971
|
||||
broker-init mtusi-lab7-broker-init-1 status=exited started=2026-11-22T19:32:25.097435302Z pid=0
|
||||
grafana mtusi-lab7-grafana-1 status=running started=2026-11-22T19:32:02.835608136Z pid=13448
|
||||
lb mtusi-lab7-lb-1 status=running started=2026-11-22T19:32:28.903106946Z pid=16918
|
||||
loki mtusi-lab7-loki-1 status=running started=2026-11-22T19:32:03.092539543Z pid=13588
|
||||
loki-gw mtusi-lab7-loki-gw-1 status=running started=2026-11-22T19:31:55.958117769Z pid=12263
|
||||
migrate mtusi-lab7-migrate-1 status=exited started=2026-11-22T19:32:24.299213248Z pid=0
|
||||
nats mtusi-lab7-nats-1 status=running started=2026-11-22T19:31:55.889367104Z pid=12149
|
||||
openbao mtusi-lab7-openbao-1 status=running started=2026-11-22T19:31:56.795907096Z pid=12692
|
||||
ops mtusi-lab7-ops-1 status=running started=2026-11-22T19:18:51.277353279Z pid=32140
|
||||
otel-collector mtusi-lab7-otel-collector-1 status=running started=2026-11-22T19:32:02.455315938Z pid=13345
|
||||
otel-gw mtusi-lab7-otel-gw-1 status=running started=2026-11-22T19:31:55.847576679Z pid=12066
|
||||
postgres mtusi-lab7-postgres-1 status=running started=2026-11-22T19:31:55.99860804Z pid=12309
|
||||
prometheus mtusi-lab7-prometheus-1 status=running started=2026-11-22T19:32:02.453558848Z pid=13339
|
||||
prometheus-gw mtusi-lab7-prometheus-gw-1 status=running started=2026-11-22T19:31:55.784901171Z pid=12016
|
||||
redis mtusi-lab7-redis-1 status=running started=2026-11-22T19:31:55.877316004Z pid=12150
|
||||
s3 mtusi-lab7-s3-1 status=running started=2026-11-22T19:31:57.131455025Z pid=12800
|
||||
s3-init mtusi-lab7-s3-init-1 status=exited started=2026-11-22T19:32:24.81113587Z pid=0
|
||||
tempo mtusi-lab7-tempo-1 status=running started=2026-11-22T19:32:07.499704841Z pid=13948
|
||||
tempo-gw mtusi-lab7-tempo-gw-1 status=running started=2026-11-22T19:31:55.953820024Z pid=12254
|
||||
volumes-init mtusi-lab7-volumes-init-1 status=exited started=2026-11-22T19:32:24.123066082Z pid=0
|
||||
worker mtusi-lab7-worker-1 status=running started=2026-11-22T19:32:38.717919946Z pid=18224
|
||||
worker mtusi-lab7-worker-2 status=running started=2026-11-22T19:32:39.270612502Z pid=18332
|
||||
== 2026-11-22T19:33:12Z stop-one target=api-43ee2c02 container=mtusi-lab7-api-2
|
||||
api mtusi-lab7-api-1 status=running started=2026-11-22T19:32:38.319180855Z pid=18090
|
||||
api mtusi-lab7-api-2 status=running started=2026-11-22T19:33:03.081249507Z pid=20881
|
||||
api-fault mtusi-lab7-api-fault-1 status=exited started=2026-11-22T19:28:12.227762751Z pid=0
|
||||
api-ttl mtusi-lab7-api-ttl-1 status=running started=2026-11-22T19:32:23.34001516Z pid=15971
|
||||
broker-init mtusi-lab7-broker-init-1 status=exited started=2026-11-22T19:32:25.097435302Z pid=0
|
||||
grafana mtusi-lab7-grafana-1 status=running started=2026-11-22T19:32:02.835608136Z pid=13448
|
||||
lb mtusi-lab7-lb-1 status=running started=2026-11-22T19:32:28.903106946Z pid=16918
|
||||
loki mtusi-lab7-loki-1 status=running started=2026-11-22T19:32:03.092539543Z pid=13588
|
||||
loki-gw mtusi-lab7-loki-gw-1 status=running started=2026-11-22T19:31:55.958117769Z pid=12263
|
||||
migrate mtusi-lab7-migrate-1 status=exited started=2026-11-22T19:32:24.299213248Z pid=0
|
||||
nats mtusi-lab7-nats-1 status=running started=2026-11-22T19:31:55.889367104Z pid=12149
|
||||
openbao mtusi-lab7-openbao-1 status=running started=2026-11-22T19:31:56.795907096Z pid=12692
|
||||
ops mtusi-lab7-ops-1 status=running started=2026-11-22T19:18:51.277353279Z pid=32140
|
||||
otel-collector mtusi-lab7-otel-collector-1 status=running started=2026-11-22T19:32:02.455315938Z pid=13345
|
||||
otel-gw mtusi-lab7-otel-gw-1 status=running started=2026-11-22T19:31:55.847576679Z pid=12066
|
||||
postgres mtusi-lab7-postgres-1 status=running started=2026-11-22T19:31:55.99860804Z pid=12309
|
||||
prometheus mtusi-lab7-prometheus-1 status=running started=2026-11-22T19:32:02.453558848Z pid=13339
|
||||
prometheus-gw mtusi-lab7-prometheus-gw-1 status=running started=2026-11-22T19:31:55.784901171Z pid=12016
|
||||
redis mtusi-lab7-redis-1 status=running started=2026-11-22T19:31:55.877316004Z pid=12150
|
||||
s3 mtusi-lab7-s3-1 status=running started=2026-11-22T19:31:57.131455025Z pid=12800
|
||||
s3-init mtusi-lab7-s3-init-1 status=exited started=2026-11-22T19:32:24.81113587Z pid=0
|
||||
tempo mtusi-lab7-tempo-1 status=running started=2026-11-22T19:32:07.499704841Z pid=13948
|
||||
tempo-gw mtusi-lab7-tempo-gw-1 status=running started=2026-11-22T19:31:55.953820024Z pid=12254
|
||||
volumes-init mtusi-lab7-volumes-init-1 status=exited started=2026-11-22T19:32:24.123066082Z pid=0
|
||||
worker mtusi-lab7-worker-1 status=running started=2026-11-22T19:32:38.717919946Z pid=18224
|
||||
worker mtusi-lab7-worker-2 status=running started=2026-11-22T19:32:39.270612502Z pid=18332
|
||||
== 2026-11-22T19:33:16Z after stop
|
||||
api mtusi-lab7-api-1 status=running started=2026-11-22T19:32:38.319180855Z pid=18090
|
||||
api mtusi-lab7-api-2 status=exited started=2026-11-22T19:33:03.081249507Z pid=0
|
||||
api-fault mtusi-lab7-api-fault-1 status=exited started=2026-11-22T19:28:12.227762751Z pid=0
|
||||
api-ttl mtusi-lab7-api-ttl-1 status=running started=2026-11-22T19:32:23.34001516Z pid=15971
|
||||
broker-init mtusi-lab7-broker-init-1 status=exited started=2026-11-22T19:32:25.097435302Z pid=0
|
||||
grafana mtusi-lab7-grafana-1 status=running started=2026-11-22T19:32:02.835608136Z pid=13448
|
||||
lb mtusi-lab7-lb-1 status=running started=2026-11-22T19:32:28.903106946Z pid=16918
|
||||
loki mtusi-lab7-loki-1 status=running started=2026-11-22T19:32:03.092539543Z pid=13588
|
||||
loki-gw mtusi-lab7-loki-gw-1 status=running started=2026-11-22T19:31:55.958117769Z pid=12263
|
||||
migrate mtusi-lab7-migrate-1 status=exited started=2026-11-22T19:32:24.299213248Z pid=0
|
||||
nats mtusi-lab7-nats-1 status=running started=2026-11-22T19:31:55.889367104Z pid=12149
|
||||
openbao mtusi-lab7-openbao-1 status=running started=2026-11-22T19:31:56.795907096Z pid=12692
|
||||
ops mtusi-lab7-ops-1 status=running started=2026-11-22T19:18:51.277353279Z pid=32140
|
||||
otel-collector mtusi-lab7-otel-collector-1 status=running started=2026-11-22T19:32:02.455315938Z pid=13345
|
||||
otel-gw mtusi-lab7-otel-gw-1 status=running started=2026-11-22T19:31:55.847576679Z pid=12066
|
||||
postgres mtusi-lab7-postgres-1 status=running started=2026-11-22T19:31:55.99860804Z pid=12309
|
||||
prometheus mtusi-lab7-prometheus-1 status=running started=2026-11-22T19:32:02.453558848Z pid=13339
|
||||
prometheus-gw mtusi-lab7-prometheus-gw-1 status=running started=2026-11-22T19:31:55.784901171Z pid=12016
|
||||
redis mtusi-lab7-redis-1 status=running started=2026-11-22T19:31:55.877316004Z pid=12150
|
||||
s3 mtusi-lab7-s3-1 status=running started=2026-11-22T19:31:57.131455025Z pid=12800
|
||||
s3-init mtusi-lab7-s3-init-1 status=exited started=2026-11-22T19:32:24.81113587Z pid=0
|
||||
tempo mtusi-lab7-tempo-1 status=running started=2026-11-22T19:32:07.499704841Z pid=13948
|
||||
tempo-gw mtusi-lab7-tempo-gw-1 status=running started=2026-11-22T19:31:55.953820024Z pid=12254
|
||||
volumes-init mtusi-lab7-volumes-init-1 status=exited started=2026-11-22T19:32:24.123066082Z pid=0
|
||||
worker mtusi-lab7-worker-1 status=running started=2026-11-22T19:32:38.717919946Z pid=18224
|
||||
worker mtusi-lab7-worker-2 status=running started=2026-11-22T19:32:39.270612502Z pid=18332
|
||||
@@ -0,0 +1,37 @@
|
||||
[
|
||||
{
|
||||
"check": "контейнеры: нет privileged, host network/pid/ipc, docker.sock; заданы лимиты CPU/RAM/PIDs",
|
||||
"result": "PASS",
|
||||
"detail": "21 контейнеров проверено"
|
||||
},
|
||||
{
|
||||
"check": "контейнеры: не root, cap_drop ALL без cap_add, no-new-privileges, read-only rootfs",
|
||||
"result": "PASS",
|
||||
"detail": "users: api=10001:10001, api-ttl=10001:10001, grafana=472:0, lb=99:99, loki=10001:10001, loki-gw=99:99, nats=1000:1000, openbao=openbao, ops=10001:10001, otel-collector=10001:10001, otel-gw=99:99, postgres=70:70, prometheus=65534:65534, prometheus-gw=99:99, redis=999:1000, s3=1000:1000, tempo=10001:10001, tempo-gw=99:99, worker=10001:10001"
|
||||
},
|
||||
{
|
||||
"check": "наружу опубликованы только 127.0.0.1: 8443/8444/8445 (LB), 3000 (Grafana), 8200 (OpenBao)",
|
||||
"result": "PASS",
|
||||
"detail": "127.0.0.1:3000→grafana, 127.0.0.1:8200→openbao, 127.0.0.1:8443→lb, 127.0.0.1:8444→lb, 127.0.0.1:8445→lb"
|
||||
},
|
||||
{
|
||||
"check": "секреты не в переменных окружения контейнеров и образов; нет BAO_TOKEN/VAULT_TOKEN",
|
||||
"result": "PASS",
|
||||
"detail": "19 секретных значений не найдено ни в env 21 контейнеров, ни в metadata/history 12 образов"
|
||||
},
|
||||
{
|
||||
"check": "образ приложения: нет закрытых ключей и secrets/ внутри; файлы приложения не записываемы",
|
||||
"result": "PASS",
|
||||
"detail": "uid 10001; в /app нет PRIVATE KEY, secrets/; /app/src не записываем"
|
||||
},
|
||||
{
|
||||
"check": "у приложения нет root token / unseal shares / чужих SecretID (файлы и память процесса недоступны снаружи)",
|
||||
"result": "PASS",
|
||||
"detail": "api/worker: только свой role_id+SecretID; нет root token, shares, owner/admin паролей, /run/secrets"
|
||||
},
|
||||
{
|
||||
"check": "telemetry без секретов: Loki (24 ч) и label'ы Prometheus не содержат значений secrets/SecretID/root token",
|
||||
"result": "PASS",
|
||||
"detail": "19 значений × Loki 24 ч + 156 label'ов Prometheus — совпадений нет"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,71 @@
|
||||
# 2026-11-22T19:40:58Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ dc --profile tests run --rm -T probe student-tests/internal_security.py
|
||||
Container mtusi-lab7-probe-run-25c92428d544 Creating
|
||||
Container mtusi-lab7-probe-run-25c92428d544 Created
|
||||
## internal trust matrix (probe container, 2026-11-22 19:41:00)
|
||||
PASS [openbao] TLS: сервер проверяется по CA и имени; plaintext HTTP не обслуживается (0.3s)
|
||||
trusted=HTTP 200; foreign CA → tls: server cert: unable to get local issuer certificate; plaintext → HTTP 400 (TLS-only listener)
|
||||
PASS [openbao] AppRole: токен api — только policy messenger-api, TTL ≤ 5 мин, без default policy (0.0s)
|
||||
policies=['messenger-api'] ttl=300s bound_cidrs=['10.207.70.0/24']
|
||||
PASS [openbao] policy api: свой путь — да; чужой путь, list, запись, sys/*, создание токенов — 403 (0.0s)
|
||||
GET kv:api→200, GET kv:worker→403, LIST secret/metadata/messenger→403, GET secret/metadata/messenger/api→403, POST kv:api→403, PUT sys/policies/acl/evil→403, GET sys/mounts→403, POST auth/token/create→403, GET auth/approle/role/messenger-worker/role-id→403, POST auth/approle/role/messenger-api/secret-id→403
|
||||
PASS [openbao] policy worker: только messenger/worker; секреты API (Redis, роль БД API) недоступны (0.0s)
|
||||
own=200 api=403; worker keys=['db_password', 'db_user', 's3_access_key_id', 's3_secret_access_key'] (нет admin/owner/redis)
|
||||
PASS [openbao] неверный/чужой SecretID и чужой role_id → вход отклонён (0.0s)
|
||||
random SecretID → 400; SecretID worker с role_id api → 400
|
||||
PASS [lb] каждая реплика API: identity lb → /health/ready 200; бизнес-API доступен (401 без Bearer) (1.2s)
|
||||
2 реплик: mTLS lb → 200/401
|
||||
PASS [lb] без клиентского сертификата → TLS-отказ (certificate required) (0.0s)
|
||||
closed: EOF after handshake; closed: EOF after handshake
|
||||
PASS [lb] сертификат ЧУЖОГО CA с identity lb → TLS-отказ (unknown CA) (0.0s)
|
||||
closed: EOF after handshake; closed: EOF after handshake
|
||||
PASS [lb] НАШ CA, но identity не lb (worker, api, rogue) → соединение закрыто до HTTP (0.0s)
|
||||
worker→closed, api→closed, rogue→closed, otel-collector→closed
|
||||
PASS [lb] истёкший сертификат lb (тот же CA) → TLS-отказ; отозванный (CRL) → закрыто (0.0s)
|
||||
expired closed: EOF after handshake; revoked → closed
|
||||
PASS [lb] после ротации leaf LB старый сертификат (отозван в CRL) → закрыто; новый — 200 (0.6s)
|
||||
old lb → closed на всех репликах; new lb → 200
|
||||
PASS [lb] сервер API проверяется клиентом: чужое имя (SAN ≠ evil) → ошибка проверки сертификата (0.0s)
|
||||
server cert: Hostname mismatch, certificate is not valid for 'evil.example'.
|
||||
PASS [lb] обхода нет: plaintext на :8443 не обслуживается, health-listener :8081 снаружи недоступен (0.0s)
|
||||
plaintext :8443 → RemoteDisconnected; :8081 → ConnectionRefusedError
|
||||
PASS [nats] без сертификата / чужой CA / plaintext → отказ подключения (0.2s)
|
||||
no-cert: refused: TLS: TLSV13_ALERT_CERTIFICATE_REQUIRED | foreign: refused: TLS: TLSV1_ALERT_UNKNOWN_CA | plaintext: SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY
|
||||
PASS [nats] НАШ CA, но не клиент NATS (rogue, lb) → отказ (pinned_certs + нет пользователя) (0.0s)
|
||||
rogue → refused: connection closed by server (certificate not pinned; lb → refused: connection closed by server (certificate not pinned
|
||||
PASS [nats] identity api: публикация заданий — да; consumer/stream admin/чужой inbox — запрещено (6.3s)
|
||||
stream_info ok; denied: fetch, purge, delete consumer, sub _INBOX_worker.>, sub attachments.> (5 violations)
|
||||
PASS [nats] identity worker: свой consumer (info) — да; purge/delete/создание consumer/inbox api — запрещено (5.8s)
|
||||
consumer_info ok; denied: purge, delete stream, create consumer, sub _INBOX_api.> (4 violations)
|
||||
PASS [collector] без сертификата / чужой CA → TLS-отказ; rogue и lb (наш CA) → 403 (0.9s)
|
||||
no-cert tls: TLSV13_ALERT_CERTIFICATE_REQUIRED; foreign tls: TLSV1_ALERT_UNKNOWN_CA; rogue HTTP 403; lb HTTP 403; grafana HTTP 403
|
||||
PASS [collector] api и worker → OTLP 200; self-метрики :8888 — только prometheus (1.2s)
|
||||
api 200, worker 200; :8888 api 403, prometheus 200
|
||||
PASS [collector] подмена service.name: worker шлёт как messenger-api → сохранено как messenger-worker (3.1s)
|
||||
Loki: service_name=messenger-worker (identity из сертификата, не из данных клиента)
|
||||
PASS [backends] Collector только пишет: чтение Loki/Prometheus/Tempo — 403 (0.9s)
|
||||
loki HTTP 403; prometheus HTTP 403; tempo HTTP 403
|
||||
PASS [backends] Grafana только читает: push Loki, remote write/OTLP/admin Prometheus, OTLP Tempo — 403; query — 200 (2.8s)
|
||||
loki /otlp/v1/logs HTTP 403; loki /loki/api/v1/push HTTP 403; prometheus /api/v1/write HTTP 403; prometheus /api/v1/otlp/v1/metrics HTTP 403; prometheus /api/v1/admin/tsdb/delete_series?match[]=up HTTP 403; tempo /v1/traces HTTP 403; queries 200
|
||||
PASS [backends] rogue/foreign/no-cert к шлюзам → отказ; порты самих backend'ов из сети недоступны (0.9s)
|
||||
rogue 403, foreign/no-cert TLS-отказ (loki, prometheus, tempo); loopback-порты 3101/9091/3201/4319/14318 из сети закрыты
|
||||
PASS [postgres] plaintext, hostname≠SAN, без client cert, чужой CA, суперпользователь по сети → отказ (0.3s)
|
||||
plaintext: FATAL: pg_hba.conf rejects connection for host "172.23.0.10", user "me | hostname mismatch: server certificate for "postgres" (and 1 other name) does not match ho | no client cert: FATAL: connection requires a valid client certificate | foreign CA cert: SSL error: tlsv1 alert unknown ca | wrong password: FATAL: password authentication failed for user "messenger_worker_a" | superuser postgres: FATAL: pg_hba.conf rejects connection for host "172.23.0.10", user "po | owner by worker cert: FATAL: certificate authentication failed for user "messenger_owner"
|
||||
PASS [postgres] роль worker: только данные вложений/заданий; users/sessions/messages/DDL — permission denied (0.1s)
|
||||
SELECT users.password_hash→denied; SELECT sessions→denied; SELECT messages→denied; SELECT chat_members→denied; UPDATE attachments.owner_id→denied; DELETE attachments→denied; CREATE TABLE→denied; TRUNCATE job_events→denied; SELECT attachments→ok; UPDATE attachments.status→ok; SELECT attachment_jobs→ok
|
||||
PASS [postgres] роль api: нет DDL/DELETE пользователей/смены username/статуса вложений; DML своего пути — да (0.0s)
|
||||
DELETE users→denied; UPDATE users.username→denied; UPDATE attachments.status→denied; INSERT attachment_variants→denied; DROP TABLE→denied; SELECT users→ok; UPDATE users.password_hash→ok; session: user=messenger_api_a ssl=True TLSv1.3 client_dn=/O=mtusi-lab7/CN=api
|
||||
PASS [redis] plaintext/без client cert/чужой CA → отказ; default-пользователь выключен (0.3s)
|
||||
plaintext→ConnectionError; no client cert→ConnectionError; foreign CA cert→ConnectionError; default user→AuthenticationError; wrong password→AuthenticationError
|
||||
PASS [redis] ACL messenger-api: ключи sess:/rl: — да; KEYS, CONFIG, FLUSHALL, чужие ключи — NOPERM (0.0s)
|
||||
INCR rl:*→ok; GET sess:*→ok; DEL own→ok; SET other key→NoPermissionError; KEYS *→NoPermissionError; CONFIG GET→NoPermissionError; FLUSHALL→NoPermissionError; ACL LIST→NoPermissionError; PUBLISH→NoPermissionError
|
||||
PASS [s3] TLS: plaintext не обслуживается; чужое имя/CA → ошибка проверки; аноним → 403 (0.3s)
|
||||
plaintext → HTTP 400 (TLS-only); SAN≠имя → server cert: Hostname mismatch, certific; foreign CA → tls: server cert: unable to get local issuer certificate; anonymous list → 403
|
||||
PASS [s3] prefix-права: api не пишет originals/variants и не листит; worker не читает variants и не листит originals (0.9s)
|
||||
api PUT originals/→AccessDenied; api PUT variants/→AccessDenied; api LIST→AccessDenied; api PUT other bucket→AccessDenied; worker GET variants/→AccessDenied; worker LIST originals/→AccessDenied; worker PUT staging→evil/→AccessDenied; worker CreateBucket→AccessDenied; api PUT staging/ (own)→ok; worker LIST staging/ (own)→ok; worker DELETE staging/ (own)→ok
|
||||
PASS [audit] TLS-аудит: все TLS-endpoint'ы — TLS ≥ 1.2, наш CA, SAN = имя сервиса, срок > 0; где нужно — mTLS обязателен (0.4s)
|
||||
api:8443 TLSv1.3 TLS_AES_256_GCM_SHA384 mTLS=required days=29; otel-collector:4318 TLSv1.3 TLS_AES_256_GCM_SHA384 mTLS=required days=29; otel-collector:8888 TLSv1.3 TLS_AES_256_GCM_SHA384 mTLS=required days=29; prometheus:9090 TLSv1.3 TLS_AES_256_GCM_SHA384 mTLS=required days=29; loki:3100 TLSv1.3 TLS_AES_256_GCM_SHA384 mTLS=required days=29; tempo:3200 TLSv1.3 TLS_AES_256_GCM_SHA384 mTLS=required days=29; tempo:4318 TLSv1.3 TLS_AES_256_GCM_SHA384 mTLS=required days=29; redis:6379 TLSv1.3 TLS_AES_256_GCM_SHA384 mTLS=required days=29; s3:9000 TLSv1.3 TLS_AES_128_GCM_SHA256 mTLS=- days=29; openbao:8200 TLSv1.3 TLS_AES_128_GCM_SHA256 mTLS=- days=29; grafana:3000 TLSv1.3 TLS_AES_128_GCM_SHA256 mTLS=- days=29; postgres:5432 TLSv1.3 TLS_AES_256_GCM_SHA384 client=/O=mtusi-lab7/CN=worker (hostnossl → reject); nats:4222 TLS (verify_and_map + pinned_certs) mTLS=required
|
||||
PASS [audit] служебные/кластерные порты из сети закрыты: raft OpenBao, SeaweedFS master/volume/filer/gRPC, мониторинг и cluster/leafnode NATS, plaintext Redis, health API (0.0s)
|
||||
закрыты: openbao:8201, s3:9333, s3:19333, s3:8080, s3:18080, s3:8888, s3:18888, nats:8222, nats:6222, nats:7422, redis:6380 и :8081 всех реплик API
|
||||
summary: 32 passed, 0 failed
|
||||
exit=0
|
||||
@@ -0,0 +1,71 @@
|
||||
# 2026-11-22T19:19:03Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ dc --profile tests run --rm -T probe student-tests/internal_security.py
|
||||
Container mtusi-lab7-probe-run-7a14fdd63f47 Creating
|
||||
Container mtusi-lab7-probe-run-7a14fdd63f47 Created
|
||||
## internal trust matrix (probe container, 2026-11-22 19:19:04)
|
||||
PASS [openbao] TLS: сервер проверяется по CA и имени; plaintext HTTP не обслуживается (0.3s)
|
||||
trusted=HTTP 200; foreign CA → tls: server cert: unable to get local issuer certificate; plaintext → HTTP 400 (TLS-only listener)
|
||||
PASS [openbao] AppRole: токен api — только policy messenger-api, TTL ≤ 5 мин, без default policy (0.0s)
|
||||
policies=['messenger-api'] ttl=300s bound_cidrs=['10.207.70.0/24']
|
||||
PASS [openbao] policy api: свой путь — да; чужой путь, list, запись, sys/*, создание токенов — 403 (0.0s)
|
||||
GET kv:api→200, GET kv:worker→403, LIST secret/metadata/messenger→403, GET secret/metadata/messenger/api→403, POST kv:api→403, PUT sys/policies/acl/evil→403, GET sys/mounts→403, POST auth/token/create→403, GET auth/approle/role/messenger-worker/role-id→403, POST auth/approle/role/messenger-api/secret-id→403
|
||||
PASS [openbao] policy worker: только messenger/worker; секреты API (Redis, роль БД API) недоступны (0.0s)
|
||||
own=200 api=403; worker keys=['db_password', 'db_user', 's3_access_key_id', 's3_secret_access_key'] (нет admin/owner/redis)
|
||||
PASS [openbao] неверный/чужой SecretID и чужой role_id → вход отклонён (0.0s)
|
||||
random SecretID → 400; SecretID worker с role_id api → 400
|
||||
PASS [lb] каждая реплика API: identity lb → /health/ready 200; бизнес-API доступен (401 без Bearer) (1.2s)
|
||||
2 реплик: mTLS lb → 200/401
|
||||
PASS [lb] без клиентского сертификата → TLS-отказ (certificate required) (0.0s)
|
||||
closed: EOF after handshake; closed: EOF after handshake
|
||||
PASS [lb] сертификат ЧУЖОГО CA с identity lb → TLS-отказ (unknown CA) (0.0s)
|
||||
closed: EOF after handshake; closed: EOF after handshake
|
||||
PASS [lb] НАШ CA, но identity не lb (worker, api, rogue) → соединение закрыто до HTTP (0.0s)
|
||||
worker→closed, api→closed, rogue→closed, otel-collector→closed
|
||||
PASS [lb] истёкший сертификат lb (тот же CA) → TLS-отказ; отозванный (CRL) → закрыто (0.0s)
|
||||
expired closed: EOF after handshake; revoked → closed
|
||||
PASS [lb] после ротации leaf LB старый сертификат (отозван в CRL) → закрыто; новый — 200 (0.0s)
|
||||
SKIP: ротация ещё не выполнялась (нет secrets/test/old-lb)
|
||||
PASS [lb] сервер API проверяется клиентом: чужое имя (SAN ≠ evil) → ошибка проверки сертификата (0.0s)
|
||||
server cert: Hostname mismatch, certificate is not valid for 'evil.example'.
|
||||
PASS [lb] обхода нет: plaintext на :8443 не обслуживается, health-listener :8081 снаружи недоступен (0.0s)
|
||||
plaintext :8443 → RemoteDisconnected; :8081 → ConnectionRefusedError
|
||||
PASS [nats] без сертификата / чужой CA / plaintext → отказ подключения (0.1s)
|
||||
no-cert: refused: TLS: TLSV13_ALERT_CERTIFICATE_REQUIRED | foreign: refused: TLS: TLSV1_ALERT_UNKNOWN_CA | plaintext: SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY
|
||||
PASS [nats] НАШ CA, но не клиент NATS (rogue, lb) → отказ (pinned_certs + нет пользователя) (0.0s)
|
||||
rogue → refused: connection closed by server (certificate not pinned; lb → refused: connection closed by server (certificate not pinned
|
||||
PASS [nats] identity api: публикация заданий — да; consumer/stream admin/чужой inbox — запрещено (6.3s)
|
||||
stream_info ok; denied: fetch, purge, delete consumer, sub _INBOX_worker.>, sub attachments.> (5 violations)
|
||||
PASS [nats] identity worker: свой consumer (info) — да; purge/delete/создание consumer/inbox api — запрещено (5.8s)
|
||||
consumer_info ok; denied: purge, delete stream, create consumer, sub _INBOX_api.> (4 violations)
|
||||
PASS [collector] без сертификата / чужой CA → TLS-отказ; rogue и lb (наш CA) → 403 (0.9s)
|
||||
no-cert tls: TLSV13_ALERT_CERTIFICATE_REQUIRED; foreign tls: TLSV1_ALERT_UNKNOWN_CA; rogue HTTP 403; lb HTTP 403; grafana HTTP 403
|
||||
PASS [collector] api и worker → OTLP 200; self-метрики :8888 — только prometheus (1.2s)
|
||||
api 200, worker 200; :8888 api 403, prometheus 200
|
||||
PASS [collector] подмена service.name: worker шлёт как messenger-api → сохранено как messenger-worker (2.9s)
|
||||
Loki: service_name=messenger-worker (identity из сертификата, не из данных клиента)
|
||||
PASS [backends] Collector только пишет: чтение Loki/Prometheus/Tempo — 403 (0.9s)
|
||||
loki HTTP 403; prometheus HTTP 403; tempo HTTP 403
|
||||
PASS [backends] Grafana только читает: push Loki, remote write/OTLP/admin Prometheus, OTLP Tempo — 403; query — 200 (2.8s)
|
||||
loki /otlp/v1/logs HTTP 403; loki /loki/api/v1/push HTTP 403; prometheus /api/v1/write HTTP 403; prometheus /api/v1/otlp/v1/metrics HTTP 403; prometheus /api/v1/admin/tsdb/delete_series?match[]=up HTTP 403; tempo /v1/traces HTTP 403; queries 200
|
||||
PASS [backends] rogue/foreign/no-cert к шлюзам → отказ; порты самих backend'ов из сети недоступны (0.9s)
|
||||
rogue 403, foreign/no-cert TLS-отказ (loki, prometheus, tempo); loopback-порты 3101/9091/3201/4319/14318 из сети закрыты
|
||||
PASS [postgres] plaintext, hostname≠SAN, без client cert, чужой CA, суперпользователь по сети → отказ (0.3s)
|
||||
plaintext: FATAL: pg_hba.conf rejects connection for host "172.23.0.10", user "me | hostname mismatch: server certificate for "postgres" (and 1 other name) does not match ho | no client cert: FATAL: connection requires a valid client certificate | foreign CA cert: SSL error: tlsv1 alert unknown ca | wrong password: FATAL: password authentication failed for user "messenger_worker_a" | superuser postgres: FATAL: pg_hba.conf rejects connection for host "172.23.0.10", user "po | owner by worker cert: FATAL: certificate authentication failed for user "messenger_owner"
|
||||
PASS [postgres] роль worker: только данные вложений/заданий; users/sessions/messages/DDL — permission denied (0.0s)
|
||||
SELECT users.password_hash→denied; SELECT sessions→denied; SELECT messages→denied; SELECT chat_members→denied; UPDATE attachments.owner_id→denied; DELETE attachments→denied; CREATE TABLE→denied; TRUNCATE job_events→denied; SELECT attachments→ok; UPDATE attachments.status→ok; SELECT attachment_jobs→ok
|
||||
PASS [postgres] роль api: нет DDL/DELETE пользователей/смены username/статуса вложений; DML своего пути — да (0.0s)
|
||||
DELETE users→denied; UPDATE users.username→denied; UPDATE attachments.status→denied; INSERT attachment_variants→denied; DROP TABLE→denied; SELECT users→ok; UPDATE users.password_hash→ok; session: user=messenger_api_a ssl=True TLSv1.3 client_dn=/O=mtusi-lab7/CN=api
|
||||
PASS [redis] plaintext/без client cert/чужой CA → отказ; default-пользователь выключен (0.1s)
|
||||
plaintext→ConnectionError; no client cert→ConnectionError; foreign CA cert→ConnectionError; default user→AuthenticationError; wrong password→AuthenticationError
|
||||
PASS [redis] ACL messenger-api: ключи sess:/rl: — да; KEYS, CONFIG, FLUSHALL, чужие ключи — NOPERM (0.0s)
|
||||
INCR rl:*→ok; GET sess:*→ok; DEL own→ok; SET other key→NoPermissionError; KEYS *→NoPermissionError; CONFIG GET→NoPermissionError; FLUSHALL→NoPermissionError; ACL LIST→NoPermissionError; PUBLISH→NoPermissionError
|
||||
PASS [s3] TLS: plaintext не обслуживается; чужое имя/CA → ошибка проверки; аноним → 403 (0.3s)
|
||||
plaintext → HTTP 400 (TLS-only); SAN≠имя → server cert: Hostname mismatch, certific; foreign CA → tls: server cert: unable to get local issuer certificate; anonymous list → 403
|
||||
PASS [s3] prefix-права: api не пишет originals/variants и не листит; worker не читает variants и не листит originals (0.4s)
|
||||
api PUT originals/→AccessDenied; api PUT variants/→AccessDenied; api LIST→AccessDenied; api PUT other bucket→AccessDenied; worker GET variants/→AccessDenied; worker LIST originals/→AccessDenied; worker PUT staging→evil/→AccessDenied; worker CreateBucket→AccessDenied; api PUT staging/ (own)→ok; worker LIST staging/ (own)→ok; worker DELETE staging/ (own)→ok
|
||||
PASS [audit] TLS-аудит: все TLS-endpoint'ы — TLS ≥ 1.2, наш CA, SAN = имя сервиса, срок > 0; где нужно — mTLS обязателен (0.2s)
|
||||
api:8443 TLSv1.3 TLS_AES_256_GCM_SHA384 mTLS=required days=29; otel-collector:4318 TLSv1.3 TLS_AES_256_GCM_SHA384 mTLS=required days=29; otel-collector:8888 TLSv1.3 TLS_AES_256_GCM_SHA384 mTLS=required days=29; prometheus:9090 TLSv1.3 TLS_AES_256_GCM_SHA384 mTLS=required days=29; loki:3100 TLSv1.3 TLS_AES_256_GCM_SHA384 mTLS=required days=29; tempo:3200 TLSv1.3 TLS_AES_256_GCM_SHA384 mTLS=required days=29; tempo:4318 TLSv1.3 TLS_AES_256_GCM_SHA384 mTLS=required days=29; redis:6379 TLSv1.3 TLS_AES_256_GCM_SHA384 mTLS=required days=29; s3:9000 TLSv1.3 TLS_AES_128_GCM_SHA256 mTLS=- days=29; openbao:8200 TLSv1.3 TLS_AES_128_GCM_SHA256 mTLS=- days=29; grafana:3000 TLSv1.3 TLS_AES_128_GCM_SHA256 mTLS=- days=29; postgres:5432 TLSv1.3 TLS_AES_256_GCM_SHA384 client=/O=mtusi-lab7/CN=worker (hostnossl → reject); nats:4222 TLS (verify_and_map + pinned_certs) mTLS=required
|
||||
PASS [audit] служебные/кластерные порты из сети закрыты: raft OpenBao, SeaweedFS master/volume/filer/gRPC, мониторинг и cluster/leafnode NATS, plaintext Redis, health API (0.0s)
|
||||
закрыты: openbao:8201, s3:9333, s3:19333, s3:8080, s3:18080, s3:8888, s3:18888, nats:8222, nats:6222, nats:7422, redis:6380 и :8081 всех реплик API
|
||||
summary: 32 passed, 0 failed
|
||||
exit=0
|
||||
@@ -0,0 +1,24 @@
|
||||
# 2026-11-22T19:41:30Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ dc --profile tools exec -T ops python -m messenger jobs invariants --settled --verify-bytes
|
||||
{
|
||||
"ok": true,
|
||||
"violations": {},
|
||||
"violation_counts": {},
|
||||
"stats": {
|
||||
"attachments": 295,
|
||||
"jobs": 298,
|
||||
"variants": 882,
|
||||
"events": 1852,
|
||||
"job_status": {
|
||||
"failed": 3,
|
||||
"ready": 293,
|
||||
"superseded": 2
|
||||
},
|
||||
"attachment_status": {
|
||||
"failed": 3,
|
||||
"ready": 292
|
||||
},
|
||||
"s3_objects": 1176
|
||||
}
|
||||
}
|
||||
exit=0
|
||||
@@ -0,0 +1,64 @@
|
||||
# 2026-11-22T19:18:56Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ dc exec -T api python -m messenger kdf-bench
|
||||
{
|
||||
"cpu_count": 2,
|
||||
"rows": [
|
||||
{
|
||||
"m_kib": 19456,
|
||||
"t": 2,
|
||||
"p": 1,
|
||||
"median_ms": 21.1,
|
||||
"p95_ms": 33.8,
|
||||
"max_logins_per_core_s": 47.4
|
||||
},
|
||||
{
|
||||
"m_kib": 19456,
|
||||
"t": 3,
|
||||
"p": 1,
|
||||
"median_ms": 35.1,
|
||||
"p95_ms": 83.9,
|
||||
"max_logins_per_core_s": 28.5
|
||||
},
|
||||
{
|
||||
"m_kib": 32768,
|
||||
"t": 2,
|
||||
"p": 1,
|
||||
"median_ms": 47.8,
|
||||
"p95_ms": 59.6,
|
||||
"max_logins_per_core_s": 20.9
|
||||
},
|
||||
{
|
||||
"m_kib": 47104,
|
||||
"t": 1,
|
||||
"p": 1,
|
||||
"median_ms": 44.4,
|
||||
"p95_ms": 46.1,
|
||||
"max_logins_per_core_s": 22.5
|
||||
},
|
||||
{
|
||||
"m_kib": 47104,
|
||||
"t": 2,
|
||||
"p": 1,
|
||||
"median_ms": 69.6,
|
||||
"p95_ms": 88.2,
|
||||
"max_logins_per_core_s": 14.4
|
||||
},
|
||||
{
|
||||
"m_kib": 65536,
|
||||
"t": 2,
|
||||
"p": 1,
|
||||
"median_ms": 101.5,
|
||||
"p95_ms": 385.1,
|
||||
"max_logins_per_core_s": 9.9
|
||||
},
|
||||
{
|
||||
"m_kib": 65536,
|
||||
"t": 3,
|
||||
"p": 1,
|
||||
"median_ms": 180.7,
|
||||
"p95_ms": 375.7,
|
||||
"max_logins_per_core_s": 5.5
|
||||
}
|
||||
]
|
||||
}
|
||||
exit=0
|
||||
@@ -0,0 +1,32 @@
|
||||
[
|
||||
{
|
||||
"check": "db: ротация пароля роли БД worker (blue/green) под нагрузкой — без ошибок и потерь",
|
||||
"result": "PASS",
|
||||
"detail": "messenger_worker_a → messenger_worker_b, KV v2, переход за 14.0 с, закрыто 24 сессий старой роли; старый пароль: REJECTED .3\", port 5432 failed; нагрузка: 54 ok / 0 err, вложений ready 27/27"
|
||||
},
|
||||
{
|
||||
"check": "s3: ротация ключа S3 identity api (два ключа на время перехода) под нагрузкой",
|
||||
"result": "PASS",
|
||||
"detail": "KV v2, 2 реплик перешли за 8.0 с; старый ключ: REJECTED 403 InvalidAccessKeyId; нагрузка 39 ok / 0 err; ready 19/19"
|
||||
},
|
||||
{
|
||||
"check": "cert: ротация leaf LB + отзыв старого (CRL) под нагрузкой; старый сертификат отклонён новым подключением",
|
||||
"result": "PASS",
|
||||
"detail": "serial f9a80723bb → 55d9055998, CRL+reload за 6.0 с (lb:USR2,otel-gw:USR2); нагрузка 56 ok / 0 err; ready 28/28; старый cert → отказ (probe), живых соединений со старым cert закрыто API: 0"
|
||||
},
|
||||
{
|
||||
"check": "sealed: OpenBao запечатан — работающие API обслуживают; новая реплика НЕ стартует; после unseal — стартует",
|
||||
"result": "PASS",
|
||||
"detail": "sealed 45 с: нагрузка 134 ok / 0 err (реплики на кэшированных секретах); новая реплика при sealed: running/starting; после unseal healthy за 5.4 с; событий bao_unavailable: 4"
|
||||
},
|
||||
{
|
||||
"check": "tokens: отзыв токенов api → 403 → новый вход по SecretID; ротация SecretID без рестарта",
|
||||
"result": "PASS",
|
||||
"detail": "отозвано 11 токенов → bao_denied 4, повторных входов 4 (в т.ч. с новым SecretID: старый уничтожен=True); нагрузка 162 ok / 0 err; действующих токенов api: 3 (TTL ≤ 300 с)"
|
||||
},
|
||||
{
|
||||
"check": "renewal: токены продлеваются на 2/3 TTL (renew-self), у max TTL — новый вход; TTL рабочего токена 5 мин",
|
||||
"result": "PASS",
|
||||
"detail": "продлений: 2 (выданный TTL после продления, с: [300]), входов: 14; токены worker: TTL [295, 296], last_renewal есть у 2"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 7,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 30.0,
|
||||
"elapsed_seconds": 30.027,
|
||||
"concurrency": 4,
|
||||
"successful_requests": 2839,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 94.548,
|
||||
"successful_latency_ms": {
|
||||
"p50": 33.688,
|
||||
"p95": 98.899,
|
||||
"p99": 148.205
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
# 2026-11-22T19:41:35Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 tests/load.py --base-url https://127.0.0.1:8443 --ca-file /home/claude/work7/mtusi2026lab7/secrets/tls/trust/ca.crt --duration 30 --concurrency 4 --output evidence/load.json
|
||||
{
|
||||
"lab": 7,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 30.0,
|
||||
"elapsed_seconds": 30.027,
|
||||
"concurrency": 4,
|
||||
"successful_requests": 2839,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 94.548,
|
||||
"successful_latency_ms": {
|
||||
"p50": 33.688,
|
||||
"p95": 98.899,
|
||||
"p99": 148.205
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
exit=0
|
||||
@@ -0,0 +1,6 @@
|
||||
# 2026-11-22T19:39:04Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 research/login_dos.py --out evidence/login_dos.json
|
||||
{"scenario": "A1 one IP, one username (password guessing)", "attempts": 100, "threads": 32, "duration_s": 0.7, "codes": {"429": 95, "401": 5}, "kdf_per_s": 7.1, "api_cpu_s": 0.8, "api_cpu_cores_avg": 1.08, "cpu_ms_per_kdf": 150.8, "api_peak_rss_mib": [168, 166], "normal_requests": 13, "normal_failed": 0, "normal_p50_ms": 11.6, "normal_p95_ms": null}
|
||||
{"scenario": "A2 one IP, many unknown usernames", "attempts": 400, "threads": 32, "duration_s": 4.1, "codes": {"401": 18, "503-lb": 17, "429": 365}, "kdf_per_s": 4.4, "api_cpu_s": 3.2, "api_cpu_cores_avg": 0.78, "cpu_ms_per_kdf": 177.3, "api_peak_rss_mib": [263, 248], "normal_requests": 36, "normal_failed": 0, "normal_p50_ms": 32.6, "normal_p95_ms": 134.1}
|
||||
{"scenario": "B distributed (per-IP limit off): only KDF budget", "attempts": 400, "threads": 32, "duration_s": 13.8, "codes": {"401": 304, "503-lb": 96}, "kdf_per_s": 22.0, "api_cpu_s": 16.5, "api_cpu_cores_avg": 1.2, "cpu_ms_per_kdf": 54.3, "api_peak_rss_mib": [199, 201], "normal_requests": 122, "normal_failed": 0, "normal_p50_ms": 17.7, "normal_p95_ms": 49.0}
|
||||
exit=0
|
||||
@@ -0,0 +1,69 @@
|
||||
[
|
||||
{
|
||||
"scenario": "A1 one IP, one username (password guessing)",
|
||||
"attempts": 100,
|
||||
"threads": 32,
|
||||
"duration_s": 0.7,
|
||||
"codes": {
|
||||
"429": 95,
|
||||
"401": 5
|
||||
},
|
||||
"kdf_per_s": 7.1,
|
||||
"api_cpu_s": 0.8,
|
||||
"api_cpu_cores_avg": 1.08,
|
||||
"cpu_ms_per_kdf": 150.8,
|
||||
"api_peak_rss_mib": [
|
||||
168,
|
||||
166
|
||||
],
|
||||
"normal_requests": 13,
|
||||
"normal_failed": 0,
|
||||
"normal_p50_ms": 11.6,
|
||||
"normal_p95_ms": null
|
||||
},
|
||||
{
|
||||
"scenario": "A2 one IP, many unknown usernames",
|
||||
"attempts": 400,
|
||||
"threads": 32,
|
||||
"duration_s": 4.1,
|
||||
"codes": {
|
||||
"401": 18,
|
||||
"503-lb": 17,
|
||||
"429": 365
|
||||
},
|
||||
"kdf_per_s": 4.4,
|
||||
"api_cpu_s": 3.2,
|
||||
"api_cpu_cores_avg": 0.78,
|
||||
"cpu_ms_per_kdf": 177.3,
|
||||
"api_peak_rss_mib": [
|
||||
263,
|
||||
248
|
||||
],
|
||||
"normal_requests": 36,
|
||||
"normal_failed": 0,
|
||||
"normal_p50_ms": 32.6,
|
||||
"normal_p95_ms": 134.1
|
||||
},
|
||||
{
|
||||
"scenario": "B distributed (per-IP limit off): only KDF budget",
|
||||
"attempts": 400,
|
||||
"threads": 32,
|
||||
"duration_s": 13.8,
|
||||
"codes": {
|
||||
"401": 304,
|
||||
"503-lb": 96
|
||||
},
|
||||
"kdf_per_s": 22.0,
|
||||
"api_cpu_s": 16.5,
|
||||
"api_cpu_cores_avg": 1.2,
|
||||
"cpu_ms_per_kdf": 54.3,
|
||||
"api_peak_rss_mib": [
|
||||
199,
|
||||
201
|
||||
],
|
||||
"normal_requests": 122,
|
||||
"normal_failed": 0,
|
||||
"normal_p50_ms": 17.7,
|
||||
"normal_p95_ms": 49.0
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,5 @@
|
||||
# 2026-11-22T19:19:02Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ make check
|
||||
python3 scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
exit=0
|
||||
@@ -0,0 +1,36 @@
|
||||
# 2026-11-22T19:18:54Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ sh -c docker compose --env-file .env exec -T -u postgres postgres psql -d messenger -c 'SELECT version, left(checksum,12) AS checksum, applied_at FROM schema_migrations ORDER BY version' -c '\du'; docker compose --env-file .env logs --no-log-prefix migrate
|
||||
version | checksum | applied_at
|
||||
--------------------------------+--------------+-------------------------------
|
||||
0001_init | 64c1576d88cc | 2026-11-22 19:18:34.926952+00
|
||||
0002_cache_invalidation_outbox | fcebf1c9345a | 2026-11-22 19:18:34.930706+00
|
||||
0003_idempotency_keys | e2564612d780 | 2026-11-22 19:18:34.935111+00
|
||||
0004_attachments | 52090521af1b | 2026-11-22 19:18:34.945525+00
|
||||
0005_jobs | 34e5b9a70f4d | 2026-11-22 19:18:35.001433+00
|
||||
0006_observability | b56c84655e84 | 2026-11-22 19:18:35.019353+00
|
||||
0007_security | 45dc5c504f42 | 2026-11-22 19:18:35.022768+00
|
||||
(7 rows)
|
||||
|
||||
List of roles
|
||||
Role name | Attributes
|
||||
--------------------+------------------------------------------------------------
|
||||
messenger_api | Cannot login
|
||||
messenger_api_a | 80 connections
|
||||
messenger_api_b | Cannot login +
|
||||
| 80 connections
|
||||
messenger_owner | 10 connections
|
||||
messenger_worker | Cannot login
|
||||
messenger_worker_a | 40 connections
|
||||
messenger_worker_b | Cannot login +
|
||||
| 40 connections
|
||||
postgres | Superuser, Create role, Create DB, Replication, Bypass RLS
|
||||
|
||||
{"ts": "2026-11-22T19:18:34.928Z", "level": "info", "service": "messenger", "logger": "messenger.db", "event": "migration applied", "msg": "migration applied", "version": "0001_init"}
|
||||
{"ts": "2026-11-22T19:18:34.931Z", "level": "info", "service": "messenger", "logger": "messenger.db", "event": "migration applied", "msg": "migration applied", "version": "0002_cache_invalidation_outbox"}
|
||||
{"ts": "2026-11-22T19:18:34.936Z", "level": "info", "service": "messenger", "logger": "messenger.db", "event": "migration applied", "msg": "migration applied", "version": "0003_idempotency_keys"}
|
||||
{"ts": "2026-11-22T19:18:34.946Z", "level": "info", "service": "messenger", "logger": "messenger.db", "event": "migration applied", "msg": "migration applied", "version": "0004_attachments"}
|
||||
{"ts": "2026-11-22T19:18:35.003Z", "level": "info", "service": "messenger", "logger": "messenger.db", "event": "migration applied", "msg": "migration applied", "version": "0005_jobs"}
|
||||
{"ts": "2026-11-22T19:18:35.019Z", "level": "info", "service": "messenger", "logger": "messenger.db", "event": "migration applied", "msg": "migration applied", "version": "0006_observability"}
|
||||
{"ts": "2026-11-22T19:18:35.023Z", "level": "info", "service": "messenger", "logger": "messenger.db", "event": "migration applied", "msg": "migration applied", "version": "0007_security"}
|
||||
{"applied": ["0001_init", "0002_cache_invalidation_outbox", "0003_idempotency_keys", "0004_attachments", "0005_jobs", "0006_observability", "0007_security"]}
|
||||
exit=0
|
||||
@@ -0,0 +1,53 @@
|
||||
# 2026-11-22T19:18:54Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ sh -c python3 scripts/bao_admin.py status; python3 scripts/bao_admin.py kv-keys api; python3 scripts/bao_admin.py kv-keys worker; python3 scripts/bao_admin.py tokens api
|
||||
{"initialized": true, "sealed": false, "t": 2, "n": 3, "progress": 0, "version": "2.7.2", "storage_type": "raft", "cluster_name": "vault-cluster-4d1ed61e"}
|
||||
{"path": "secret/data/messenger/api", "version": 1, "keys": ["db_password", "db_user", "redis_password", "redis_username", "s3_access_key_id", "s3_secret_access_key"], "db_user": "messenger_api_a"}
|
||||
{"path": "secret/data/messenger/worker", "version": 1, "keys": ["db_password", "db_user", "s3_access_key_id", "s3_secret_access_key"], "db_user": "messenger_worker_a"}
|
||||
{
|
||||
"service": "api",
|
||||
"tokens": [
|
||||
{
|
||||
"policies": [
|
||||
"messenger-api"
|
||||
],
|
||||
"ttl": 292,
|
||||
"creation_ttl": 300,
|
||||
"explicit_max_ttl": 0,
|
||||
"renewable": true,
|
||||
"issue_time": "2026-11-22T19:18:46.192972431Z",
|
||||
"last_renewal": null,
|
||||
"bound_cidrs": [
|
||||
"10.207.70.0/24"
|
||||
]
|
||||
},
|
||||
{
|
||||
"policies": [
|
||||
"messenger-api"
|
||||
],
|
||||
"ttl": 291,
|
||||
"creation_ttl": 300,
|
||||
"explicit_max_ttl": 0,
|
||||
"renewable": true,
|
||||
"issue_time": "2026-11-22T19:18:45.168530361Z",
|
||||
"last_renewal": null,
|
||||
"bound_cidrs": [
|
||||
"10.207.70.0/24"
|
||||
]
|
||||
},
|
||||
{
|
||||
"policies": [
|
||||
"messenger-api"
|
||||
],
|
||||
"ttl": 291,
|
||||
"creation_ttl": 300,
|
||||
"explicit_max_ttl": 0,
|
||||
"renewable": true,
|
||||
"issue_time": "2026-11-22T19:18:45.379587264Z",
|
||||
"last_renewal": null,
|
||||
"bound_cidrs": [
|
||||
"10.207.70.0/24"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
exit=0
|
||||
@@ -0,0 +1,5 @@
|
||||
# 2026-11-22T19:33:34Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 tests/resilience.py --mode persistence --action-script scripts/restart.sh --base-url https://127.0.0.1:8443 --ca-file /home/claude/work7/mtusi2026lab7/secrets/tls/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.
|
||||
exit=0
|
||||
@@ -0,0 +1,24 @@
|
||||
# 2026-11-22T19:18:53Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ dc --profile tools run --rm --no-deps -T pki status
|
||||
Container mtusi-lab7-pki-run-87c3839b3100 Creating
|
||||
Container mtusi-lab7-pki-run-87c3839b3100 Created
|
||||
ingress serial=268c644b8e7f666d5fe710db6d025bf13521a1ec days_left=30.0 status=valid
|
||||
lb serial=f9a80723bb12f4dc5622c44a00f4f6876f0c78f days_left=30.0 status=valid
|
||||
api serial=4549b7772bf574cdd2ee1c175947fd60ed08c64a days_left=30.0 status=valid
|
||||
worker serial=70432b83622e508c8d6406bd7ea94b828c2d36f3 days_left=30.0 status=valid
|
||||
migrate serial=15f2b0cbb83ecf0a6c1df3c8130a5238539440cc days_left=30.0 status=valid
|
||||
bootstrap serial=564052a65ebe264f0d20a2b06779ce20e7ce361e days_left=30.0 status=valid
|
||||
postgres serial=77fc37bde08ee06a371317200964992d1c701fd days_left=30.0 status=valid
|
||||
redis serial=40e4b75a76f2ba27fbb2b1e3b60b062b5214cef3 days_left=30.0 status=valid
|
||||
s3 serial=41f5e6f13e626ccfa4485f3eb1173d755240fe18 days_left=30.0 status=valid
|
||||
nats serial=15ce2547413a9895e2220d7ae0c8a378a7c6e119 days_left=30.0 status=valid
|
||||
openbao serial=1006ef264c9477b26a4ba61586f1de967b9b5949 days_left=30.0 status=valid
|
||||
otel-gw serial=2cb34994d4e60533fdd662287f7ffefce0485fe5 days_left=30.0 status=valid
|
||||
otel-collector serial=7ef3fc5635934343b59ce9aac6886577f5fdbf6 days_left=30.0 status=valid
|
||||
prometheus-gw serial=fdaf16b10e0050888bfe9cca00a3a8bf893d7c5 days_left=30.0 status=valid
|
||||
loki-gw serial=17020d3d6a58f9f98b7677440892e11b90696d69 days_left=30.0 status=valid
|
||||
tempo-gw serial=4d13a7107213239625481c7b8768c502cac80824 days_left=30.0 status=valid
|
||||
prometheus serial=dafe8bbea4268ece2b9d3c2fdc2acf78e8ca8e5 days_left=30.0 status=valid
|
||||
tempo serial=34cf5f4a6ee073c03603cf067a88d95f4492d4c3 days_left=30.0 status=valid
|
||||
grafana serial=54a041e117c280103a459118a5eaf7d9ace62f7f days_left=30.0 status=valid
|
||||
exit=0
|
||||
@@ -0,0 +1,22 @@
|
||||
# 2026-11-22T19:18:55Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ sh -c docker compose --env-file .env ps --format '{{.Service}} {{.Ports}}' | sort -u
|
||||
api 8443/tcp
|
||||
api-ttl 8443/tcp
|
||||
grafana 127.0.0.1:3000->3000/tcp
|
||||
lb 127.0.0.1:8443-8445->8443-8445/tcp
|
||||
loki
|
||||
loki-gw
|
||||
nats
|
||||
openbao 127.0.0.1:8200->8200/tcp
|
||||
ops 8443/tcp
|
||||
otel-collector
|
||||
otel-gw
|
||||
postgres
|
||||
prometheus
|
||||
prometheus-gw
|
||||
redis
|
||||
s3
|
||||
tempo
|
||||
tempo-gw
|
||||
worker 8443/tcp
|
||||
exit=0
|
||||
@@ -0,0 +1,73 @@
|
||||
== 2026-11-22T19:33:35Z before restart
|
||||
api mtusi-lab7-api-1 status=running started=2026-11-22T19:32:38.319180855Z pid=18090
|
||||
api mtusi-lab7-api-2 status=running started=2026-11-22T19:33:27.437827743Z pid=23953
|
||||
api-fault mtusi-lab7-api-fault-1 status=exited started=2026-11-22T19:28:12.227762751Z pid=0
|
||||
api-ttl mtusi-lab7-api-ttl-1 status=running started=2026-11-22T19:32:23.34001516Z pid=15971
|
||||
broker-init mtusi-lab7-broker-init-1 status=exited started=2026-11-22T19:32:25.097435302Z pid=0
|
||||
grafana mtusi-lab7-grafana-1 status=running started=2026-11-22T19:32:02.835608136Z pid=13448
|
||||
lb mtusi-lab7-lb-1 status=running started=2026-11-22T19:32:28.903106946Z pid=16918
|
||||
loki mtusi-lab7-loki-1 status=running started=2026-11-22T19:32:03.092539543Z pid=13588
|
||||
loki-gw mtusi-lab7-loki-gw-1 status=running started=2026-11-22T19:31:55.958117769Z pid=12263
|
||||
migrate mtusi-lab7-migrate-1 status=exited started=2026-11-22T19:32:24.299213248Z pid=0
|
||||
nats mtusi-lab7-nats-1 status=running started=2026-11-22T19:31:55.889367104Z pid=12149
|
||||
openbao mtusi-lab7-openbao-1 status=running started=2026-11-22T19:31:56.795907096Z pid=12692
|
||||
ops mtusi-lab7-ops-1 status=running started=2026-11-22T19:18:51.277353279Z pid=32140
|
||||
otel-collector mtusi-lab7-otel-collector-1 status=running started=2026-11-22T19:32:02.455315938Z pid=13345
|
||||
otel-gw mtusi-lab7-otel-gw-1 status=running started=2026-11-22T19:31:55.847576679Z pid=12066
|
||||
postgres mtusi-lab7-postgres-1 status=running started=2026-11-22T19:31:55.99860804Z pid=12309
|
||||
prometheus mtusi-lab7-prometheus-1 status=running started=2026-11-22T19:32:02.453558848Z pid=13339
|
||||
prometheus-gw mtusi-lab7-prometheus-gw-1 status=running started=2026-11-22T19:31:55.784901171Z pid=12016
|
||||
redis mtusi-lab7-redis-1 status=running started=2026-11-22T19:31:55.877316004Z pid=12150
|
||||
s3 mtusi-lab7-s3-1 status=running started=2026-11-22T19:31:57.131455025Z pid=12800
|
||||
s3-init mtusi-lab7-s3-init-1 status=exited started=2026-11-22T19:32:24.81113587Z pid=0
|
||||
tempo mtusi-lab7-tempo-1 status=running started=2026-11-22T19:32:07.499704841Z pid=13948
|
||||
tempo-gw mtusi-lab7-tempo-gw-1 status=running started=2026-11-22T19:31:55.953820024Z pid=12254
|
||||
volumes-init mtusi-lab7-volumes-init-1 status=exited started=2026-11-22T19:32:24.123066082Z pid=0
|
||||
worker mtusi-lab7-worker-1 status=running started=2026-11-22T19:32:38.717919946Z pid=18224
|
||||
worker mtusi-lab7-worker-2 status=running started=2026-11-22T19:32:39.270612502Z pid=18332
|
||||
volume mtusi-lab7_baodata
|
||||
volume mtusi-lab7_baologs
|
||||
volume mtusi-lab7_grafanadata
|
||||
volume mtusi-lab7_lokidata
|
||||
volume mtusi-lab7_natsdata
|
||||
volume mtusi-lab7_pgdata
|
||||
volume mtusi-lab7_promdata
|
||||
volume mtusi-lab7_s3data
|
||||
volume mtusi-lab7_tempodata
|
||||
sealed=False progress=0/2
|
||||
== 2026-11-22T19:34:25Z after restart
|
||||
api mtusi-lab7-api-1 status=running started=2026-11-22T19:34:14.974580256Z pid=30228
|
||||
api mtusi-lab7-api-2 status=running started=2026-11-22T19:34:15.238451324Z pid=30307
|
||||
api-fault mtusi-lab7-api-fault-1 status=exited started=2026-11-22T19:28:12.227762751Z pid=0
|
||||
api-ttl mtusi-lab7-api-ttl-1 status=running started=2026-11-22T19:34:19.403180412Z pid=30940
|
||||
broker-init mtusi-lab7-broker-init-1 status=exited started=2026-11-22T19:34:21.328797875Z pid=0
|
||||
grafana mtusi-lab7-grafana-1 status=running started=2026-11-22T19:33:53.264603705Z pid=28049
|
||||
lb mtusi-lab7-lb-1 status=running started=2026-11-22T19:34:24.973586058Z pid=31856
|
||||
loki mtusi-lab7-loki-1 status=running started=2026-11-22T19:33:53.478619115Z pid=28155
|
||||
loki-gw mtusi-lab7-loki-gw-1 status=running started=2026-11-22T19:33:46.929282763Z pid=26759
|
||||
migrate mtusi-lab7-migrate-1 status=exited started=2026-11-22T19:34:20.508025644Z pid=0
|
||||
nats mtusi-lab7-nats-1 status=running started=2026-11-22T19:33:46.804487404Z pid=26710
|
||||
openbao mtusi-lab7-openbao-1 status=running started=2026-11-22T19:33:47.759235754Z pid=27260
|
||||
ops mtusi-lab7-ops-1 status=running started=2026-11-22T19:18:51.277353279Z pid=32140
|
||||
otel-collector mtusi-lab7-otel-collector-1 status=running started=2026-11-22T19:33:52.951004718Z pid=27959
|
||||
otel-gw mtusi-lab7-otel-gw-1 status=running started=2026-11-22T19:33:47.145067947Z pid=26927
|
||||
postgres mtusi-lab7-postgres-1 status=running started=2026-11-22T19:33:46.977170932Z pid=26842
|
||||
prometheus mtusi-lab7-prometheus-1 status=running started=2026-11-22T19:33:53.021816898Z pid=27985
|
||||
prometheus-gw mtusi-lab7-prometheus-gw-1 status=running started=2026-11-22T19:33:46.679897599Z pid=26680
|
||||
redis mtusi-lab7-redis-1 status=running started=2026-11-22T19:33:46.868473453Z pid=26826
|
||||
s3 mtusi-lab7-s3-1 status=running started=2026-11-22T19:33:51.647617462Z pid=27555
|
||||
s3-init mtusi-lab7-s3-init-1 status=exited started=2026-11-22T19:34:21.005106492Z pid=0
|
||||
tempo mtusi-lab7-tempo-1 status=running started=2026-11-22T19:33:58.052374438Z pid=28522
|
||||
tempo-gw mtusi-lab7-tempo-gw-1 status=running started=2026-11-22T19:33:46.756051201Z pid=26679
|
||||
volumes-init mtusi-lab7-volumes-init-1 status=exited started=2026-11-22T19:34:20.194002702Z pid=0
|
||||
worker mtusi-lab7-worker-1 status=running started=2026-11-22T19:34:23.837771395Z pid=31597
|
||||
worker mtusi-lab7-worker-2 status=running started=2026-11-22T19:34:24.011093686Z pid=31656
|
||||
volume mtusi-lab7_baodata
|
||||
volume mtusi-lab7_baologs
|
||||
volume mtusi-lab7_grafanadata
|
||||
volume mtusi-lab7_lokidata
|
||||
volume mtusi-lab7_natsdata
|
||||
volume mtusi-lab7_pgdata
|
||||
volume mtusi-lab7_promdata
|
||||
volume mtusi-lab7_s3data
|
||||
volume mtusi-lab7_tempodata
|
||||
@@ -0,0 +1,5 @@
|
||||
# 2026-11-22T19:33:02Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ ./scripts/start-replicas.sh
|
||||
api mtusi-lab7-api-1 status=running started=2026-11-22T19:32:38.319180855Z pid=18090
|
||||
api mtusi-lab7-api-2 status=running started=2026-11-22T19:33:03.081249507Z pid=20881
|
||||
exit=0
|
||||
@@ -0,0 +1,5 @@
|
||||
# 2026-11-22T19:33:27Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ ./scripts/start-replicas.sh
|
||||
api mtusi-lab7-api-1 status=running started=2026-11-22T19:32:38.319180855Z pid=18090
|
||||
api mtusi-lab7-api-2 status=running started=2026-11-22T19:33:27.437827743Z pid=23953
|
||||
exit=0
|
||||
@@ -0,0 +1,4 @@
|
||||
# 2026-11-22T19:18:55Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ dc logs --no-log-prefix s3-init
|
||||
{"bucket": "messenger-attachments", "created": true, "checks": {"anonymous ListObjects": ["403", 403, true], "anonymous GetObject": ["403", 403, true], "anonymous PutObject": ["403", 403, true], "anonymous ListBuckets": ["403", 403, true], "api PUT staging/": ["allowed", "allowed", true], "api DELETE staging/": ["allowed", "allowed", true], "api PUT originals/ (worker publishes)": ["AccessDenied", "AccessDenied", true], "api PUT variants/": ["AccessDenied", "AccessDenied", true], "api ListObjects": ["AccessDenied", "AccessDenied", true], "api CreateBucket": ["AccessDenied", "AccessDenied", true], "worker PUT variants/": ["allowed", "allowed", true], "worker DELETE variants/": ["allowed", "allowed", true], "worker List staging/": ["allowed", "allowed", true], "worker List originals/": ["AccessDenied", "AccessDenied", true], "worker PUT other prefix": ["AccessDenied", "AccessDenied", true], "worker CreateBucket": ["AccessDenied", "AccessDenied", true], "attempts": ["1", 1, true]}}
|
||||
exit=0
|
||||
@@ -0,0 +1,494 @@
|
||||
{
|
||||
"components": [
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "starlette",
|
||||
"version": "1.7.0",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "anyio",
|
||||
"version": "4.15.1",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "idna",
|
||||
"version": "3.20",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "typing_extensions",
|
||||
"version": "4.16.0",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "uvicorn",
|
||||
"version": "0.54.0",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "h11",
|
||||
"version": "0.16.0",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "click",
|
||||
"version": "8.5.0",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "psycopg",
|
||||
"version": "3.2.10",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "psycopg-binary",
|
||||
"version": "3.2.10",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "psycopg-pool",
|
||||
"version": "3.2.6",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "redis",
|
||||
"version": "5.2.1",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "httpx",
|
||||
"version": "0.28.1",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "httpcore",
|
||||
"version": "1.0.9",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "certifi",
|
||||
"version": "2026.10.18",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "nats-py",
|
||||
"version": "2.11.0",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "Pillow",
|
||||
"version": "13.0.0",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "opentelemetry-api",
|
||||
"version": "1.45.0",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "opentelemetry-sdk",
|
||||
"version": "1.45.0",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "opentelemetry-semantic-conventions",
|
||||
"version": "0.66b0",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "opentelemetry-proto",
|
||||
"version": "1.45.0",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "opentelemetry-exporter-otlp-proto-common",
|
||||
"version": "1.45.0",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "opentelemetry-exporter-otlp-common",
|
||||
"version": "0.66b0",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "opentelemetry-exporter-http-transport",
|
||||
"version": "0.66b0",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "opentelemetry-exporter-otlp-proto-http",
|
||||
"version": "1.45.0",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "googleapis-common-protos",
|
||||
"version": "1.75.5",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "protobuf",
|
||||
"version": "7.36.1",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "cryptography",
|
||||
"version": "50.0.1",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "cffi",
|
||||
"version": "2.1.1",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "PyPI",
|
||||
"name": "pycparser",
|
||||
"version": "3.0",
|
||||
"where": "app image (requirements.txt)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "Go",
|
||||
"name": "github.com/openbao/openbao",
|
||||
"version": "2.7.2",
|
||||
"pseudo": "0.0.0-20261026193227-9e0a0d3c3504",
|
||||
"where": "openbao/openbao:2.7.2"
|
||||
},
|
||||
{
|
||||
"ecosystem": "Go",
|
||||
"name": "github.com/nats-io/nats-server/v2",
|
||||
"version": "2.11.17",
|
||||
"where": "nats:2.11.17-alpine"
|
||||
},
|
||||
{
|
||||
"ecosystem": "Go",
|
||||
"name": "github.com/seaweedfs/seaweedfs",
|
||||
"version": "4.52",
|
||||
"pseudo": "0.0.0-20261102112406-984eac6a790b",
|
||||
"where": "chrislusf/seaweedfs:4.52"
|
||||
},
|
||||
{
|
||||
"ecosystem": "Go",
|
||||
"name": "github.com/prometheus/prometheus",
|
||||
"version": "0.305.5",
|
||||
"where": "prom/prometheus:v3.5.5 (module v0.305.5)"
|
||||
},
|
||||
{
|
||||
"ecosystem": "Go",
|
||||
"name": "github.com/grafana/loki/v3",
|
||||
"version": "3.5.3",
|
||||
"where": "grafana/loki:3.5.3"
|
||||
},
|
||||
{
|
||||
"ecosystem": "Go",
|
||||
"name": "github.com/grafana/tempo",
|
||||
"version": "2.8.4",
|
||||
"where": "grafana/tempo:2.8.4"
|
||||
},
|
||||
{
|
||||
"ecosystem": "Go",
|
||||
"name": "github.com/grafana/grafana",
|
||||
"version": "13.3.1",
|
||||
"where": "grafana/grafana:13.3.1"
|
||||
},
|
||||
{
|
||||
"ecosystem": "Go",
|
||||
"name": "go.opentelemetry.io/collector/config/confighttp",
|
||||
"version": "0.130.0",
|
||||
"where": "otel/opentelemetry-collector-contrib:0.130.0"
|
||||
},
|
||||
{
|
||||
"ecosystem": "Go",
|
||||
"name": "go.opentelemetry.io/collector/config/configgrpc",
|
||||
"version": "0.130.0",
|
||||
"where": "otel/opentelemetry-collector-contrib:0.130.0"
|
||||
},
|
||||
{
|
||||
"ecosystem": "Go",
|
||||
"name": "github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor",
|
||||
"version": "0.130.0",
|
||||
"where": "otel/opentelemetry-collector-contrib:0.130.0"
|
||||
},
|
||||
{
|
||||
"ecosystem": "Go",
|
||||
"name": "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor",
|
||||
"version": "0.130.0",
|
||||
"where": "otel/opentelemetry-collector-contrib:0.130.0"
|
||||
},
|
||||
{
|
||||
"ecosystem": "Go",
|
||||
"name": "github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor",
|
||||
"version": "0.130.0",
|
||||
"where": "otel/opentelemetry-collector-contrib:0.130.0"
|
||||
},
|
||||
{
|
||||
"ecosystem": "Go",
|
||||
"name": "github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension",
|
||||
"version": "0.130.0",
|
||||
"where": "otel/opentelemetry-collector-contrib:0.130.0"
|
||||
}
|
||||
],
|
||||
"findings": [
|
||||
{
|
||||
"id": "GHSA-ffqx-q65f-36jf",
|
||||
"aliases": [
|
||||
"CVE-2026-28377"
|
||||
],
|
||||
"severity": "HIGH",
|
||||
"package": "github.com/grafana/tempo",
|
||||
"version": "2.8.4",
|
||||
"where": "grafana/tempo:2.8.4",
|
||||
"fixed": [
|
||||
"2.10.3"
|
||||
],
|
||||
"summary": "Grafana Tempo has Inadequate Encryption Strength",
|
||||
"triage": {
|
||||
"decision": "not_applicable",
|
||||
"reason": "Tempo раскрывает ключ S3 SSE-C через /status/config; у нас backend local (без S3 и SSE-C), а /status/* недоступен: шлюз tempo-gw пускает grafana только на /api/*, prometheus — на /metrics."
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "GHSA-qrcv-3558-gj4f",
|
||||
"aliases": [
|
||||
"CVE-2026-58213"
|
||||
],
|
||||
"severity": "HIGH",
|
||||
"package": "github.com/nats-io/nats-server/v2",
|
||||
"version": "2.11.17",
|
||||
"where": "nats:2.11.17-alpine",
|
||||
"fixed": [
|
||||
"2.12.9"
|
||||
],
|
||||
"summary": "NATS Server: MQTT SUBSCRIBE Protocol Injection via Leaf Node/Route Forwarding allows arbitrary NATS command injection",
|
||||
"triage": {
|
||||
"decision": "not_applicable",
|
||||
"reason": "MQTT и leafnode/route не настроены в infra/nats/nats.conf (только client listener 4222 с mTLS)."
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "GHSA-r72h-j7qq-v6qg",
|
||||
"aliases": [
|
||||
"CVE-2026-58210"
|
||||
],
|
||||
"severity": "HIGH",
|
||||
"package": "github.com/nats-io/nats-server/v2",
|
||||
"version": "2.11.17",
|
||||
"where": "nats:2.11.17-alpine",
|
||||
"fixed": [
|
||||
"2.12.12"
|
||||
],
|
||||
"summary": "NATS Server allows unauthenticated memory exhaustion through incomplete MQTT CONNECT packets",
|
||||
"triage": {
|
||||
"decision": "not_applicable",
|
||||
"reason": "MQTT не включён (нет блока mqtt в nats.conf)."
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "GHSA-wg65-39gg-5wfj",
|
||||
"aliases": [
|
||||
"CVE-2026-42151"
|
||||
],
|
||||
"severity": "HIGH",
|
||||
"package": "github.com/prometheus/prometheus",
|
||||
"version": "0.305.5",
|
||||
"where": "prom/prometheus:v3.5.5 (module v0.305.5)",
|
||||
"fixed": [
|
||||
"0.311.3"
|
||||
],
|
||||
"summary": "Prometheus Azure AD remote write OAuth client secret exposed via config API",
|
||||
"triage": {
|
||||
"decision": "not_applicable",
|
||||
"reason": "Azure AD remote write не используется; /-/config недоступен снаружи namespace (шлюз пускает только API-пути по identity)."
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "GHSA-497x-rrr9-68jp",
|
||||
"aliases": [
|
||||
"CVE-2026-21726"
|
||||
],
|
||||
"severity": "MODERATE",
|
||||
"package": "github.com/grafana/loki/v3",
|
||||
"version": "3.5.3",
|
||||
"where": "grafana/loki:3.5.3",
|
||||
"fixed": [
|
||||
"3.6.4"
|
||||
],
|
||||
"summary": "Grafana Loki Path Traversal - CVE-2021-36156 Bypass",
|
||||
"triage": {
|
||||
"decision": "mitigated",
|
||||
"reason": "Обход path traversal в Ruler API /loki/api/v1/rules/{namespace}: ruler не настроен, шлюз loki-gw запрещает /loki/api/v1/rules и /api/ всем identity (internal_security.py: grafana → 403 на запись/ruler). Исправление только в 3.6.4 (минорный апгрейд) — запланирован."
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "GHSA-4g68-3pwx-5vfj",
|
||||
"aliases": [
|
||||
"CVE-2026-58214"
|
||||
],
|
||||
"severity": "MODERATE",
|
||||
"package": "github.com/nats-io/nats-server/v2",
|
||||
"version": "2.11.17",
|
||||
"where": "nats:2.11.17-alpine",
|
||||
"fixed": [
|
||||
"2.12.12"
|
||||
],
|
||||
"summary": "NATS Server MQTT subscribe permission bypass exposes internal QoS 2 metadata",
|
||||
"triage": {
|
||||
"decision": "not_applicable",
|
||||
"reason": "MQTT не включён."
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "GHSA-7qmq-8cc4-hxwg",
|
||||
"aliases": [
|
||||
"CVE-2026-58209"
|
||||
],
|
||||
"severity": "MODERATE",
|
||||
"package": "github.com/nats-io/nats-server/v2",
|
||||
"version": "2.11.17",
|
||||
"where": "nats:2.11.17-alpine",
|
||||
"fixed": [
|
||||
"2.12.12"
|
||||
],
|
||||
"summary": "NATS Server MQTT retained messages and QoS replay bypass subscription deny rules",
|
||||
"triage": {
|
||||
"decision": "not_applicable",
|
||||
"reason": "MQTT не включён."
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "GHSA-p3j5-5hrq-p75h",
|
||||
"aliases": [
|
||||
"CVE-2026-58254"
|
||||
],
|
||||
"severity": "MODERATE",
|
||||
"package": "github.com/nats-io/nats-server/v2",
|
||||
"version": "2.11.17",
|
||||
"where": "nats:2.11.17-alpine",
|
||||
"fixed": [
|
||||
"2.12.8"
|
||||
],
|
||||
"summary": "nats-server Leaf node connections bypass Nats-Trace-Dest permission check",
|
||||
"triage": {
|
||||
"decision": "not_applicable",
|
||||
"reason": "Leafnode-соединений нет (нет блока leafnodes)."
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "GHSA-p957-7v2w-g93g",
|
||||
"aliases": [
|
||||
"CVE-2026-58208"
|
||||
],
|
||||
"severity": "MODERATE",
|
||||
"package": "github.com/nats-io/nats-server/v2",
|
||||
"version": "2.11.17",
|
||||
"where": "nats:2.11.17-alpine",
|
||||
"fixed": [
|
||||
"2.12.12"
|
||||
],
|
||||
"summary": "NATS Server: MQTT-over-WebSocket Path Can Crash WebSocket-Only JetStream Servers Before MQTT Is Enabled",
|
||||
"triage": {
|
||||
"decision": "not_applicable",
|
||||
"reason": "WebSocket-listener не настроен (нет блока websocket)."
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "GHSA-vffh-x6r8-xx99",
|
||||
"aliases": [
|
||||
"CVE-2026-40179"
|
||||
],
|
||||
"severity": "MODERATE",
|
||||
"package": "github.com/prometheus/prometheus",
|
||||
"version": "0.305.5",
|
||||
"where": "prom/prometheus:v3.5.5 (module v0.305.5)",
|
||||
"fixed": [
|
||||
"0.311.2-0.20260410083055-07c6232d159b"
|
||||
],
|
||||
"summary": "Prometheus has Stored XSS via metric names and label values in Prometheus web UI tooltips and metrics explorer",
|
||||
"triage": {
|
||||
"decision": "mitigated",
|
||||
"reason": "XSS в web UI Prometheus: UI не опубликован (Prometheus слушает 127.0.0.1:9091, шлюз отдаёт только /api/v1/* identity grafana); метрики пишут только otel-collector и tempo (mTLS). Остаточно: скомпрометированный Collector + оператор, открывший UI через exec. Плановый переход на 3.11.x при следующем LTS."
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "GHSA-fw8g-cg8f-9j28",
|
||||
"aliases": [
|
||||
"CVE-2026-44903"
|
||||
],
|
||||
"severity": "MODERATE",
|
||||
"package": "github.com/prometheus/prometheus",
|
||||
"version": "0.305.5",
|
||||
"where": "prom/prometheus:v3.5.5 (module v0.305.5)",
|
||||
"fixed": [
|
||||
"0.311.3"
|
||||
],
|
||||
"summary": "Prometheus vulnerable to stored XSS via crafted histogram bucket label values in the old web UI heatmap display",
|
||||
"triage": {
|
||||
"decision": "not_applicable",
|
||||
"reason": "Legacy UI (--enable-feature=old-ui) не включён; UI не опубликован."
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "GHSA-xcq7-p3pf-p88h",
|
||||
"aliases": [
|
||||
"CVE-2026-114603"
|
||||
],
|
||||
"severity": "MODERATE",
|
||||
"package": "opentelemetry-api",
|
||||
"version": "1.45.0",
|
||||
"where": "app image (requirements.txt)",
|
||||
"fixed": [
|
||||
"1.45.1"
|
||||
],
|
||||
"summary": "OpenTelemetry Python: Unbounded tracestate parsing in opentelemetry-api",
|
||||
"triage": {
|
||||
"decision": "mitigated",
|
||||
"reason": "Квадратичный разбор tracestate. API не принимает внешний traceparent/tracestate (новый корневой span, заголовки клиента игнорируются); worker извлекает контекст из сообщений NATS, а telemetry.extract() пропускает к парсеру только tracestate ≤ 512 байт без пробелов. SDK 1.45.0 требует api==1.45.0 — обновляем вместе с SDK."
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "GHSA-mf5v-w3w3-f6cg",
|
||||
"aliases": [
|
||||
"CVE-2026-126360"
|
||||
],
|
||||
"severity": "MODERATE",
|
||||
"package": "opentelemetry-api",
|
||||
"version": "1.45.0",
|
||||
"where": "app image (requirements.txt)",
|
||||
"fixed": [
|
||||
"1.45.2"
|
||||
],
|
||||
"summary": "OpenTelemetry Python API: Denial of service through quadratic-time traceparent parsing",
|
||||
"triage": {
|
||||
"decision": "mitigated",
|
||||
"reason": "ReDoS traceparent: telemetry.extract() пропускает только строго валидный traceparent (regex ^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$) — длинные/с пробелами значения до парсера не доходят; внешние заголовки API не извлекает вовсе."
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
# 2026-11-22T19:42:06Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 scripts/secret_scan.py
|
||||
secret scan: 215 files, 26 known secret values, 0 findings
|
||||
exit=0
|
||||
@@ -0,0 +1,4 @@
|
||||
# 2026-11-22T19:41:27Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 tests/smoke.py --base-url https://127.0.0.1:8443 --ca-file /home/claude/work7/mtusi2026lab7/secrets/tls/trust/ca.crt
|
||||
PASS: lab7 public API scenario; infrastructure and grading evidence remain separate.
|
||||
exit=0
|
||||
@@ -0,0 +1,4 @@
|
||||
# 2026-11-22T19:19:02Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 tests/smoke.py --base-url https://127.0.0.1:8443 --ca-file /home/claude/work7/mtusi2026lab7/secrets/tls/trust/ca.crt
|
||||
PASS: lab7 public API scenario; infrastructure and grading evidence remain separate.
|
||||
exit=0
|
||||
@@ -0,0 +1,80 @@
|
||||
# 2026-11-22T19:18:51Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
docker 29.10.0
|
||||
Docker Compose version v5.7.1
|
||||
CONTAINER REPOSITORY TAG PLATFORM IMAGE ID SIZE CREATED
|
||||
mtusi-lab7-api-1 mtusi-lab7-app local linux/amd64 59691057177d 246MB 34 seconds ago
|
||||
mtusi-lab7-api-2 mtusi-lab7-app local linux/amd64 59691057177d 246MB 34 seconds ago
|
||||
mtusi-lab7-api-ttl-1 mtusi-lab7-app local linux/amd64 59691057177d 246MB 34 seconds ago
|
||||
mtusi-lab7-broker-init-1 mtusi-lab7-app local linux/amd64 59691057177d 246MB 34 seconds ago
|
||||
mtusi-lab7-grafana-1 mtusi-local/grafana 13.3.1 linux/amd64 e5dc6fd6c2e0 2.03GB 25 hours ago
|
||||
mtusi-lab7-lb-1 mtusi-local/haproxy 3.0 linux/amd64 29722943fffb 78.6MB 6 hours ago
|
||||
mtusi-lab7-loki-1 mtusi-local/loki 3.5.3 linux/amd64 4249c0ad0211 208MB 25 hours ago
|
||||
mtusi-lab7-loki-gw-1 mtusi-local/haproxy 3.0 linux/amd64 29722943fffb 78.6MB 6 hours ago
|
||||
mtusi-lab7-migrate-1 mtusi-lab7-app local linux/amd64 59691057177d 246MB 34 seconds ago
|
||||
mtusi-lab7-nats-1 mtusi-local/nats 2.11.17 linux/amd64 09af92b2ed2c 75.8MB 4 hours ago
|
||||
mtusi-lab7-openbao-1 mtusi-local/openbao 2.7.2 linux/amd64 9c39d8564b5c 311MB 6 hours ago
|
||||
mtusi-lab7-ops-1 mtusi-lab7-app local linux/amd64 59691057177d 246MB 34 seconds ago
|
||||
mtusi-lab7-otel-collector-1 mtusi-local/otelcol-contrib 0.130.0 linux/amd64 03c06afb86eb 439MB 26 hours ago
|
||||
mtusi-lab7-otel-gw-1 mtusi-local/haproxy 3.0 linux/amd64 29722943fffb 78.6MB 6 hours ago
|
||||
mtusi-lab7-postgres-1 mtusi-local/postgres 16 linux/amd64 a35fc8764f75 595MB 5 hours ago
|
||||
mtusi-lab7-prometheus-1 mtusi-local/prometheus v3.5.5 linux/amd64 e96cf8b2efec 476MB 4 hours ago
|
||||
mtusi-lab7-prometheus-gw-1 mtusi-local/haproxy 3.0 linux/amd64 29722943fffb 78.6MB 6 hours ago
|
||||
mtusi-lab7-redis-1 mtusi-local/redis 7 linux/amd64 b65dc0caa411 69.2MB 5 hours ago
|
||||
mtusi-lab7-s3-1 mtusi-local/seaweedfs 4.52 linux/amd64 cec1afdfce84 258MB 25 hours ago
|
||||
mtusi-lab7-s3-init-1 mtusi-lab7-app local linux/amd64 59691057177d 246MB 34 seconds ago
|
||||
mtusi-lab7-tempo-1 mtusi-local/tempo 2.8.4 linux/amd64 8086e4d15497 186MB 4 hours ago
|
||||
mtusi-lab7-tempo-gw-1 mtusi-local/haproxy 3.0 linux/amd64 29722943fffb 78.6MB 6 hours ago
|
||||
mtusi-lab7-volumes-init-1 mtusi-lab7-app local linux/amd64 59691057177d 246MB 34 seconds ago
|
||||
mtusi-lab7-worker-1 mtusi-lab7-app local linux/amd64 59691057177d 246MB 34 seconds ago
|
||||
mtusi-lab7-worker-2 mtusi-lab7-app local linux/amd64 59691057177d 246MB 34 seconds ago
|
||||
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
|
||||
mtusi-lab7-api-1 mtusi-lab7-app:local "python -m messenger…" api 25 seconds ago Up 9 seconds (healthy) 8443/tcp
|
||||
mtusi-lab7-api-2 mtusi-lab7-app:local "python -m messenger…" api 25 seconds ago Up 8 seconds (healthy) 8443/tcp
|
||||
mtusi-lab7-api-ttl-1 mtusi-lab7-app:local "python -m messenger…" api-ttl 25 seconds ago Up 8 seconds (healthy) 8443/tcp
|
||||
mtusi-lab7-broker-init-1 mtusi-lab7-app:local "python -m messenger…" broker-init 25 seconds ago Exited (0) 16 seconds ago
|
||||
mtusi-lab7-grafana-1 mtusi-local/grafana:13.3.1 "/run.sh" grafana 25 seconds ago Up 22 seconds (healthy) 127.0.0.1:3000->3000/tcp
|
||||
mtusi-lab7-lb-1 mtusi-local/haproxy:3.0 "haproxy -W -db -f /…" lb 25 seconds ago Up 24 seconds (healthy) 127.0.0.1:8443-8445->8443-8445/tcp
|
||||
mtusi-lab7-loki-1 mtusi-local/loki:3.5.3 "/usr/bin/loki -conf…" loki 25 seconds ago Up 24 seconds
|
||||
mtusi-lab7-loki-gw-1 mtusi-local/haproxy:3.0 "haproxy -W -db -f /…" loki-gw 25 seconds ago Up 24 seconds
|
||||
mtusi-lab7-migrate-1 mtusi-lab7-app:local "python -m messenger…" migrate 25 seconds ago Exited (0) 17 seconds ago
|
||||
mtusi-lab7-nats-1 mtusi-local/nats:2.11.17 "nats-server --confi…" nats 25 seconds ago Up 22 seconds (healthy)
|
||||
mtusi-lab7-openbao-1 mtusi-local/openbao:2.7.2 "bao server -config=…" openbao 33 seconds ago Up 32 seconds (healthy) 127.0.0.1:8200->8200/tcp
|
||||
mtusi-lab7-ops-1 mtusi-lab7-app:local "python -c 'import s…" ops 1 second ago Up Less than a second 8443/tcp
|
||||
mtusi-lab7-otel-collector-1 mtusi-local/otelcol-contrib:0.130.0 "/otelcol-contrib --…" otel-collector 25 seconds ago Up 22 seconds
|
||||
mtusi-lab7-otel-gw-1 mtusi-local/haproxy:3.0 "haproxy -W -db -f /…" otel-gw 25 seconds ago Up 23 seconds
|
||||
mtusi-lab7-postgres-1 mtusi-local/postgres:16 "sh -c 'install -d -…" postgres 25 seconds ago Up 23 seconds (healthy)
|
||||
mtusi-lab7-prometheus-1 mtusi-local/prometheus:v3.5.5 "/bin/prometheus --c…" prometheus 25 seconds ago Up 22 seconds (healthy)
|
||||
mtusi-lab7-prometheus-gw-1 mtusi-local/haproxy:3.0 "haproxy -W -db -f /…" prometheus-gw 25 seconds ago Up 23 seconds
|
||||
mtusi-lab7-redis-1 mtusi-local/redis:7 "sh -c 'umask 077\nh(…" redis 25 seconds ago Up 23 seconds (healthy)
|
||||
mtusi-lab7-s3-1 mtusi-local/seaweedfs:4.52 "/usr/bin/weed -logt…" s3 25 seconds ago Up 21 seconds (healthy)
|
||||
mtusi-lab7-s3-init-1 mtusi-lab7-app:local "python -m messenger…" s3-init 25 seconds ago Exited (0) 9 seconds ago
|
||||
mtusi-lab7-tempo-1 mtusi-local/tempo:2.8.4 "/tempo -config.file…" tempo 25 seconds ago Up 22 seconds
|
||||
mtusi-lab7-tempo-gw-1 mtusi-local/haproxy:3.0 "haproxy -W -db -f /…" tempo-gw 25 seconds ago Up 23 seconds
|
||||
mtusi-lab7-volumes-init-1 mtusi-lab7-app:local "sh -c 'chown -R 100…" volumes-init 25 seconds ago Exited (0) 22 seconds ago
|
||||
mtusi-lab7-worker-1 mtusi-lab7-app:local "python -m messenger…" worker 25 seconds ago Up 8 seconds (healthy) 8443/tcp
|
||||
mtusi-lab7-worker-2 mtusi-lab7-app:local "python -m messenger…" worker 25 seconds ago Up 8 seconds (healthy) 8443/tcp
|
||||
api mtusi-lab7-api-1 status=running started=2026-11-22T19:18:43.058208695Z pid=31129
|
||||
api mtusi-lab7-api-2 status=running started=2026-11-22T19:18:43.305838529Z pid=31214
|
||||
api-ttl mtusi-lab7-api-ttl-1 status=running started=2026-11-22T19:18:43.773944102Z pid=31329
|
||||
broker-init mtusi-lab7-broker-init-1 status=exited started=2026-11-22T19:18:34.991029483Z pid=0
|
||||
grafana mtusi-lab7-grafana-1 status=running started=2026-11-22T19:18:30.066590485Z pid=29991
|
||||
lb mtusi-lab7-lb-1 status=running started=2026-11-22T19:18:27.718371564Z pid=29097
|
||||
loki mtusi-lab7-loki-1 status=running started=2026-11-22T19:18:28.107555246Z pid=29263
|
||||
loki-gw mtusi-lab7-loki-gw-1 status=running started=2026-11-22T19:18:27.933565596Z pid=29205
|
||||
migrate mtusi-lab7-migrate-1 status=exited started=2026-11-22T19:18:34.009360405Z pid=0
|
||||
nats mtusi-lab7-nats-1 status=running started=2026-11-22T19:18:29.809011914Z pid=29878
|
||||
openbao mtusi-lab7-openbao-1 status=running started=2026-11-22T19:18:19.899946001Z pid=28827
|
||||
ops mtusi-lab7-ops-1 status=running started=2026-11-22T19:18:51.277353279Z pid=32140
|
||||
otel-collector mtusi-lab7-otel-collector-1 status=running started=2026-11-22T19:18:29.305302102Z pid=29737
|
||||
otel-gw mtusi-lab7-otel-gw-1 status=running started=2026-11-22T19:18:28.216774371Z pid=29318
|
||||
postgres mtusi-lab7-postgres-1 status=running started=2026-11-22T19:18:28.352458688Z pid=29378
|
||||
prometheus mtusi-lab7-prometheus-1 status=running started=2026-11-22T19:18:29.455222813Z pid=29808
|
||||
prometheus-gw mtusi-lab7-prometheus-gw-1 status=running started=2026-11-22T19:18:28.508566378Z pid=29448
|
||||
redis mtusi-lab7-redis-1 status=running started=2026-11-22T19:18:28.690575007Z pid=29515
|
||||
s3 mtusi-lab7-s3-1 status=running started=2026-11-22T19:18:30.236824529Z pid=30077
|
||||
s3-init mtusi-lab7-s3-init-1 status=exited started=2026-11-22T19:18:40.360015045Z pid=0
|
||||
tempo mtusi-lab7-tempo-1 status=running started=2026-11-22T19:18:29.965545796Z pid=29941
|
||||
tempo-gw mtusi-lab7-tempo-gw-1 status=running started=2026-11-22T19:18:28.945760113Z pid=29587
|
||||
volumes-init mtusi-lab7-volumes-init-1 status=exited started=2026-11-22T19:18:29.17293726Z pid=0
|
||||
worker mtusi-lab7-worker-1 status=running started=2026-11-22T19:18:43.501938978Z pid=31270
|
||||
worker mtusi-lab7-worker-2 status=running started=2026-11-22T19:18:44.201987681Z pid=31434
|
||||
@@ -0,0 +1,23 @@
|
||||
# 2026-11-22T19:19:59Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 student-tests/test_api.py
|
||||
## API, auth, validation, ACL, transactions (https://127.0.0.1:8443)
|
||||
PASS password stored only as Argon2id hash (lab7; salt+params in PHC); User has no secret fields 0.65s
|
||||
PASS wrong password and unknown user: identical 401 + Basic challenge 0.18s
|
||||
PASS malformed Basic / Bearer on /auth/sessions / body on login 0.04s
|
||||
PASS password with ':' and non-ASCII UTF-8 works (RFC 7617) 0.15s
|
||||
PASS opaque 256-bit token, unique per login, DB stores only SHA-256 0.82s
|
||||
PASS only Bearer accepted; Basic and X-User-Id never authenticate 0.04s
|
||||
PASS logout revokes only the current session; repeat -> 401 0.52s
|
||||
PASS strict JSON validation -> 400 0.11s
|
||||
PASS message text: 4000 code points OK, 4001 / whitespace / sender_id -> 400 0.06s
|
||||
PASS SQL is parameterized: injection payloads stored verbatim 0.03s
|
||||
PASS ACL: outsider gets 404 everywhere (even for invalid body) 0.06s
|
||||
PASS create chat validation: duplicates, caller missing, unknown member 0.03s
|
||||
PASS compound create-chat rolls back on FK failure (no orphan chat) 1.05s chats before=4, failed insert left 0 rows
|
||||
PASS registration race: 20 parallel same username -> exactly one 201 0.80s 201x1, 409x19, rows=1
|
||||
PASS keyset pagination: 120 msgs, varying limit, no gaps/duplicates 2.22s 4 pages
|
||||
PASS chat list: only own chats, ordered, cursor bound to user 0.17s
|
||||
PASS read-after-write: confirmed message visible to next read 0.02s
|
||||
PASS unknown route 404 / wrong method 405 in error format 0.01s
|
||||
summary: 18 passed, 0 failed
|
||||
exit=0
|
||||
@@ -0,0 +1,18 @@
|
||||
# 2026-11-22T19:20:12Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 student-tests/test_attachments.py
|
||||
## attachments (https://127.0.0.1:8443)
|
||||
PASS valid PNG and JPEG: 202 queued → ready, byte-exact download by other member 0.94s
|
||||
PASS exactly-near limit (~10 MiB) accepted, Content-Length > limit -> 413 0.44s 10.00 MiB accepted
|
||||
PASS oversize rejected BEFORE body is read (early 413, socket) 0.05s HTTP/1.1 413 Request Entity Too Large in 0.016s, 50 MiB never sent
|
||||
PASS pixel limit: 8000x6000 header -> 413 without decoding 0.10s 0.103s
|
||||
PASS decompression bomb: IDAT inflates beyond declared size -> 415 0.26s 65295-byte file claiming 64 MiB raw, rejected in 0.087s
|
||||
PASS corrupted images -> 415 (truncated, bad CRC, no EOI, garbage, empty) 0.42s 9 variants
|
||||
PASS MIME spoofing by Content-Type/filename -> 415 0.11s
|
||||
PASS dangerous/invalid filenames -> 400; filename never becomes a path 0.17s
|
||||
PASS missing/invalid Content-Length -> 400 (chunked upload is not accepted) 0.02s HTTP/1.1 400 Bad Request
|
||||
PASS ACL: outsider gets 404 for upload/metadata/content; anonymous 401 0.62s outsider 10 MiB upload rejected in 0.30s
|
||||
PASS variants (lab5): original/thumbnail/crop/optimized OK after ready, unknown -> 400 0.76s
|
||||
PASS message: foreign/unknown attachment_id -> 404, file of other chat -> 404, limits -> 400 0.51s
|
||||
PASS idempotency includes attachment_ids (replay same, conflict on change) 0.19s
|
||||
summary: 13 passed, 0 failed
|
||||
exit=0
|
||||
@@ -0,0 +1,15 @@
|
||||
# 2026-11-22T19:20:24Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ dc run --rm --no-deps -T -v /home/claude/work7/mtusi2026lab7/student-tests:/app/student-tests:ro --entrypoint python api student-tests/test_cache_race.py
|
||||
Container mtusi-lab7-api-run-ae4315ec9236 Creating
|
||||
Container mtusi-lab7-api-run-ae4315ec9236 Created
|
||||
PASS read-through put makes entry readable
|
||||
PASS entry TTL capped by SESSION_CACHE_TTL_SECONDS pttl=59999ms
|
||||
PASS invalidate removes entry
|
||||
PASS late put after logout is refused by tombstone
|
||||
PASS tombstone outlives any cache entry pttl=74999ms
|
||||
PASS entry never outlives session expiry pttl=1199ms
|
||||
PASS expired session not served from cache
|
||||
cache unavailable; falling back to PostgreSQL
|
||||
PASS degraded mode: cache is not read until outbox drained
|
||||
summary: all passed
|
||||
exit=0
|
||||
@@ -0,0 +1,8 @@
|
||||
# 2026-11-22T19:20:17Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 student-tests/test_expiry.py
|
||||
## session expiry, SESSION_TTL_SECONDS=2 (https://127.0.0.1:8444)
|
||||
PASS expires_at = now + SESSION_TTL_SECONDS 0.19s remaining 1.99s
|
||||
PASS token valid before expiry, 401 Bearer after (cache warmed) 3.66s
|
||||
PASS re-login after expiry issues a new valid session 3.20s
|
||||
summary: 3 passed, 0 failed
|
||||
exit=0
|
||||
@@ -0,0 +1,7 @@
|
||||
# 2026-11-22T19:20:56Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 student-tests/test_failures.py
|
||||
## dependency failures (https://127.0.0.1:8443)
|
||||
PASS Redis down: API bypasses cache via PostgreSQL, no anonymous trust 6.46s fallback latency 0.069s; outbox rows during outage=1, drained after recovery
|
||||
PASS PostgreSQL down: bounded 503 in error format; anonymous still 401 14.92s latency(s)={'ready': 1.51, 'post_message': 2.01, 'history': 2.01, 'login': 2.01, 'register': 2.01}; ready again in 2.2s
|
||||
summary: 2 passed, 0 failed
|
||||
exit=0
|
||||
@@ -0,0 +1,19 @@
|
||||
# 2026-11-22T19:19:38Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 student-tests/test_hardening.py --json evidence/hardening.json
|
||||
## lab7 hardening & secrets audit (2026-11-22 22:19:38)
|
||||
PASS контейнеры: нет privileged, host network/pid/ipc, docker.sock; заданы лимиты CPU/RAM/PIDs (0.4s)
|
||||
21 контейнеров проверено
|
||||
PASS контейнеры: не root, cap_drop ALL без cap_add, no-new-privileges, read-only rootfs (0.3s)
|
||||
users: api=10001:10001, api-ttl=10001:10001, grafana=472:0, lb=99:99, loki=10001:10001, loki-gw=99:99, nats=1000:1000, openbao=openbao, ops=10001:10001, otel-collector=10001:10001, otel-gw=99:99, postgres=70:70, prometheus=65534:65534, prometheus-gw=99:99, redis=999:1000, s3=1000:1000, tempo=10001:10001, tempo-gw=99:99, worker=10001:10001
|
||||
PASS наружу опубликованы только 127.0.0.1: 8443/8444/8445 (LB), 3000 (Grafana), 8200 (OpenBao) (0.3s)
|
||||
127.0.0.1:3000→grafana, 127.0.0.1:8200→openbao, 127.0.0.1:8443→lb, 127.0.0.1:8444→lb, 127.0.0.1:8445→lb
|
||||
PASS секреты не в переменных окружения контейнеров и образов; нет BAO_TOKEN/VAULT_TOKEN (1.4s)
|
||||
19 секретных значений не найдено ни в env 21 контейнеров, ни в metadata/history 12 образов
|
||||
PASS образ приложения: нет закрытых ключей и secrets/ внутри; файлы приложения не записываемы (0.2s)
|
||||
uid 10001; в /app нет PRIVATE KEY, secrets/; /app/src не записываем
|
||||
PASS у приложения нет root token / unseal shares / чужих SecretID (файлы и память процесса недоступны снаружи) (1.2s)
|
||||
api/worker: только свой role_id+SecretID; нет root token, shares, owner/admin паролей, /run/secrets
|
||||
PASS telemetry без секретов: Loki (24 ч) и label'ы Prometheus не содержат значений secrets/SecretID/root token (3.7s)
|
||||
19 значений × Loki 24 ч + 156 label'ов Prometheus — совпадений нет
|
||||
summary: 7 passed, 0 failed
|
||||
exit=0
|
||||
@@ -0,0 +1,14 @@
|
||||
# 2026-11-22T19:20:07Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 student-tests/test_idempotency.py
|
||||
## idempotency across replicas (https://127.0.0.1:8443)
|
||||
PASS sequential replays: same 201 + same Message from different replicas 0.51s replicas=2, rows=1
|
||||
PASS 30 concurrent POSTs, same key + body, via LB -> exactly one message 1.13s per-replica responses {'api-1e51aed7': 17, 'api-bcdd60ed': 13}, rows=1
|
||||
PASS concurrent same key, two different bodies -> one message, others 201-same or 409 1.06s 201x10, 409x10
|
||||
PASS after commit: different body -> 409; reordered/whitespace JSON -> replay 0.04s
|
||||
PASS scope: user + chat + key (same key elsewhere is independent) 0.05s
|
||||
PASS key format: missing/empty/129 chars/invalid -> 400; 128 chars ok 0.09s
|
||||
PASS failed attempt does not claim the key (400/404 not recorded) 0.07s
|
||||
PASS replay re-checks session and access 0.32s
|
||||
PASS key older than IDEMPOTENCY_TTL_SECONDS is reusable (24 h window) 1.16s
|
||||
summary: 9 passed, 0 failed
|
||||
exit=0
|
||||
@@ -0,0 +1,14 @@
|
||||
# 2026-11-22T19:20:49Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ dc run --rm --no-deps -T -v /home/claude/work7/mtusi2026lab7/student-tests:/app/student-tests:ro --entrypoint python worker student-tests/test_imgproc.py
|
||||
Container mtusi-lab7-worker-run-d20b9d82d614 Creating
|
||||
Container mtusi-lab7-worker-run-d20b9d82d614 Created
|
||||
PASS fixture 320×200 → thumbnail 256×160, crop 128×128, optimized WebP 320×200 0.72s
|
||||
PASS rounding down and minimum 1 px: 3000×10 → 256×1, 1280×4 0.22s
|
||||
PASS EXIF orientation 6 applied (400×200 stored → 128×256); orientation tag not copied 0.30s
|
||||
PASS alpha composited on white for JPEG variants; WebP keeps alpha 0.39s
|
||||
PASS metadata removed: EXIF/XMP/ICC of the source are not in any variant 0.31s
|
||||
PASS deterministic output (same bytes on re-run) — basis of idempotent effect; v2 differs 0.96s
|
||||
PASS limits: pixels by header (413-class), memory (RLIMIT_AS), undecodable → permanent 1.51s too_large / resource_limit / invalid_image
|
||||
PASS worker wall-clock timeout kills the subprocess → transient (retry), not a hang 0.54s killed after 0.05s; undecodable → Permanent(invalid_image)
|
||||
summary: 8 passed, 0 failed
|
||||
exit=0
|
||||
@@ -0,0 +1,19 @@
|
||||
# 2026-11-22T19:22:04Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 student-tests/test_jobs_failures.py
|
||||
## pipeline failures (https://127.0.0.1:8443)
|
||||
PASS defense: worker stopped → 202 → 409 → message ok → restart API+broker (volumes kept) → worker → ready 25.12s attachment 478e6b75: stream held 1→1 msgs across restart; ready 1.9s after worker start
|
||||
PASS broker down: upload still 202 (job durable in outbox), ready after broker returns 11.88s 202 with broker stopped; events ['enqueued', 'published', 'claimed']
|
||||
PASS crash between COMMIT and publish: relay of another process publishes, job reaches ready 22.50s api-fault (api-eb64d070) died after COMMIT; published by relay worker-7f11f86c; events ['enqueued', 'published', 'claimed', 'committed', 'published_version_changed', 'staging_cleaned']
|
||||
PASS crash between publish ack and outbox mark: duplicate publish dropped by Nats-Msg-Id 25.01s second publish: duplicate=true, stream_seq=37; processed once
|
||||
PASS worker crash after claim, before any side effect → lease takeover → ready 23.33s ['enqueued', 'published', 'claimed', 'lease_takeover', 'committed', 'published_version_changed', 'staging_cleaned'] in 23.3s
|
||||
PASS worker crash after S3 writes, before COMMIT → takeover rewrites the same keys, one result 24.12s ['enqueued', 'published', 'claimed', 'lease_takeover', 'committed', 'published_version_changed', 'staging_cleaned'] in 23.7s; keys deterministic: ['crop.jpg', 'optimized.webp', 'thumbnail.jpg']
|
||||
PASS worker crash after COMMIT, before ack → redelivery is a no-op (duplicate_ignored) 21.85s ['enqueued', 'published', 'claimed', 'committed', 'published_version_changed', 'staging_cleaned', 'duplicate_ignored']
|
||||
PASS hung worker (event loop blocked 45 s) loses lease; takeover commits; zombie commit is fenced 49.22s claimed t38 → takeover t39 → committed t39; zombie (t38) → lease_lost
|
||||
PASS long but alive job (35 s > lease 20 s): heartbeat keeps the lease, no takeover, no duplicate 36.76s ready after 36.7s, ['enqueued', 'published', 'claimed', 'committed', 'published_version_changed', 'staging_cleaned']
|
||||
PASS transient errors: retry with backoff + jitter (2 failures), then ready 6.85s delays 1.60s, 2.69s (windows [1,2], [2,4]); actual gaps [1.99, 3.01]; attempts [1, 2, 3]
|
||||
PASS retries exhausted → failed retry_exhausted (in registry) → operator replay → ready 28.58s 5 attempts → retry_exhausted; replay (attempt 6) → ready
|
||||
PASS processing with expired lease and LOST message → reaper requeues → ready 11.27s purged 1 stream msgs; ['claimed', 'committed', 'published_version_changed', 'staging_cleaned']
|
||||
PASS bounded concurrency: never more than replicas × WORKER_CONCURRENCY jobs in processing 20.31s 8 jobs × ~4 s: peak concurrency 4 (limit 4), wall 9.5s
|
||||
PASS staging removed after ready; failed staging kept until retention, then replay refuses honestly 9.80s ready: staging gone, originals/ present; failed: staging kept, removed after retention; replay refused
|
||||
summary: 14 passed, 0 failed
|
||||
exit=0
|
||||
@@ -0,0 +1,17 @@
|
||||
# 2026-11-22T19:34:27Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 student-tests/test_lifecycle.py --json evidence/lifecycle.json
|
||||
## lab7 lifecycle under load (https://127.0.0.1:8443, 2026-11-22 22:34:27)
|
||||
PASS db: ротация пароля роли БД worker (blue/green) под нагрузкой — без ошибок и потерь (26s)
|
||||
messenger_worker_a → messenger_worker_b, KV v2, переход за 14.0 с, закрыто 24 сессий старой роли; старый пароль: REJECTED .3", port 5432 failed; нагрузка: 54 ok / 0 err, вложений ready 27/27
|
||||
PASS s3: ротация ключа S3 identity api (два ключа на время перехода) под нагрузкой (19s)
|
||||
KV v2, 2 реплик перешли за 8.0 с; старый ключ: REJECTED 403 InvalidAccessKeyId; нагрузка 39 ok / 0 err; ready 19/19
|
||||
PASS cert: ротация leaf LB + отзыв старого (CRL) под нагрузкой; старый сертификат отклонён новым подключением (20s)
|
||||
serial f9a80723bb → 55d9055998, CRL+reload за 6.0 с (lb:USR2,otel-gw:USR2); нагрузка 56 ok / 0 err; ready 28/28; старый cert → отказ (probe), живых соединений со старым cert закрыто API: 0
|
||||
PASS sealed: OpenBao запечатан — работающие API обслуживают; новая реплика НЕ стартует; после unseal — стартует (77s)
|
||||
sealed 45 с: нагрузка 134 ok / 0 err (реплики на кэшированных секретах); новая реплика при sealed: running/starting; после unseal healthy за 5.4 с; событий bao_unavailable: 4
|
||||
PASS tokens: отзыв токенов api → 403 → новый вход по SecretID; ротация SecretID без рестарта (71s)
|
||||
отозвано 11 токенов → bao_denied 4, повторных входов 4 (в т.ч. с новым SecretID: старый уничтожен=True); нагрузка 162 ok / 0 err; действующих токенов api: 3 (TTL ≤ 300 с)
|
||||
PASS renewal: токены продлеваются на 2/3 TTL (renew-self), у max TTL — новый вход; TTL рабочего токена 5 мин (0s)
|
||||
продлений: 2 (выданный TTL после продления, с: [300]), входов: 14; токены worker: TTL [295, 296], last_renewal есть у 2
|
||||
summary: 6 passed, 0 failed
|
||||
exit=0
|
||||
@@ -0,0 +1,15 @@
|
||||
# 2026-11-22T19:21:18Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 student-tests/test_observability.py
|
||||
## lab6: наблюдаемость — provisioning, сигналы, корреляция, безопасность telemetry
|
||||
PASS provisioning: Prometheus/Loki/Tempo из Git, health OK 0.14s health OK: prometheus, loki, tempo
|
||||
PASS provisioning: dashboard импортирован, все запросы панелей выполняются 1.77s 33 панелей, 60 запросов без ошибок, с данными 56
|
||||
PASS HTTP: X-Request-Id → структурный лог → trace (server + DB spans) 2.27s request_id → trace 4f5676a4c68f…, 8 spans (5 DB)
|
||||
PASS безопасность: пароль, токен, тело сообщения не попадают в логи/трассы 2.29s проверено в Loki и 2 trace: пароль, токен, текст сообщения, Authorization
|
||||
PASS upload → create → send → process → S3/DB: один trace; лог worker с тем же trace_id 19.58s 55 spans: SERVER→create→send→process(messenger-worker)→S3×4; queue -0.00 с
|
||||
PASS retry: 2 временные ошибки + успех — три попытки в одном trace 19.31s попытки 1→2→3: ['retry', 'retry', 'ready']; паузы backoff 1.6 с и 2.4 с
|
||||
PASS метрики контракта: имена, низкая кардинальность, шаблоны маршрутов 0.32s 20 метрик; серий 3854 (HTTP count — 134); маршрутов 13; запрещённых labels нет
|
||||
PASS метрики отражают обработку: jobs, retry, time-to-ready, p95 из histogram 0.05s ready=23 retry=2 time_to_ready count=23; p95 HTTP 184 мс, p95 ready 3.10 с
|
||||
PASS алерты: правила загружены и вычисляются без ошибок 0.02s 18 правил (10 алертов), firing сейчас: нет
|
||||
PASS SDK: spans/logs не отбрасываются при работающем Collector 0.02s обработано spans 5660, отброшено 0
|
||||
summary: 10 passed, 0 failed
|
||||
exit=0
|
||||
@@ -0,0 +1,12 @@
|
||||
# 2026-11-22T19:28:30Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 student-tests/test_pipeline_idempotency.py
|
||||
## track 2: pipeline idempotency (https://127.0.0.1:8443)
|
||||
PASS D: 8 duplicate copies of one job delivered concurrently → one claim, one commit 34.24s 9 deliveries: claimed 1, committed 1, duplicate_ignored 8
|
||||
PASS R: reorder — stale attempts (1, 2) and a future one arrive DURING attempt 3 → ignored 23.22s during attempt 3: attempts 2, 1 → stale_ignored; 9 → stale_ignored(future) + term; one commit
|
||||
PASS C: crash before/after side effect, after COMMIT, hung worker — all reach one result 66.32s {'crash-before-s3': 'takeover', 'crash-after-s3': 'takeover', 'crash-after-commit': 'dup_ignored', 'hang-40': 'takeover'}
|
||||
PASS V1: stale v1 job after v2 is published → superseded, no v1 side effects 22.07s v2 ready first; v1 → superseded at claim; variants only v2, pointer 2
|
||||
PASS V2: version race — slow v1 commits after v2 → pointer stays on v2 (no overwrite by older) 17.26s v1 finished after v2 → superseded at commit; pointer history [(None, 2)]
|
||||
PASS V3: redelivered v1 after v2 rollout and repeated reprocess are no-ops 10.06s v1 ready → v2 ready (pointer 1→2); 3 v1 duplicates ignored; reprocess v1/v2 again → noop
|
||||
PASS invariants I1–I7 hold for everything this suite produced (settled, bytes verified) 3.61s attachments 9, jobs 12 {'ready': 10, 'superseded': 2}, variants 33, events 91
|
||||
summary: 7 passed, 0 failed
|
||||
exit=0
|
||||
@@ -0,0 +1,13 @@
|
||||
# 2026-11-22T19:20:27Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 student-tests/test_pipeline.py
|
||||
## attachment pipeline (https://127.0.0.1:8443)
|
||||
PASS upload → 202 queued snapshot, then ready; original byte-exact; three variants by contract 0.73s ready 0.64s after 202; thumbnail 256×160, crop 128×128, optimized 320×200 WebP
|
||||
PASS big image: optimized fits 1280 without upscale, thumbnail rounds down 1.09s thumbnail 256x170, optimized 1280x852
|
||||
PASS EXIF orientation applied (stored 400×200, orientation 6 → 200×400); tiny image not upscaled 2.53s
|
||||
PASS variant parameter: unknown → 400; default original; outsider → 404 0.43s
|
||||
PASS undecodable image → failed with safe error_code, no retries; content 409; cannot attach (409) 3.04s events ['enqueued', 'published', 'claimed', 'failed']; listed in failed registry
|
||||
PASS queued/processing attachment can be attached to a message right away 1.17s
|
||||
PASS duplicate deliveries of a finished job are no-ops (5 raw duplicates) 7.19s committed ×1, duplicate_ignored ×5, metadata unchanged
|
||||
PASS replay is safe: ready → noop; failed (permanent) → re-executed once, failed again 5.26s ready: noop; failed: replayed (audit by student) → failed again (permanent error)
|
||||
summary: 8 passed, 0 failed
|
||||
exit=0
|
||||
@@ -0,0 +1,4 @@
|
||||
# 2026-11-22T19:19:03Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 tests/security.py --base-url https://127.0.0.1:8443 --ca-file /home/claude/work7/mtusi2026lab7/secrets/tls/trust/ca.crt
|
||||
PASS: trusted HTTPS works; untrusted CA rejected. This does NOT verify internal mTLS, OpenBao or hardening.
|
||||
exit=0
|
||||
@@ -0,0 +1,13 @@
|
||||
# 2026-11-22T19:19:29Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 student-tests/test_security.py
|
||||
## lab7 external security (https://127.0.0.1:8443)
|
||||
PASS TLS: доверенный CA + hostname → 200; пустой/чужой trust store и чужое имя → ошибка ПРОВЕРКИ сертификата 0.03s empty trust store → unable to get local issuer certificate; foreign CA → unable to get local issuer certificate; system CAs only → unable to get local issuer certificate; wrong hostname → Hostname mismatch, certificate is not valid for 'evil.example'.
|
||||
PASS TLS: версии < 1.2 отклоняются; согласуется TLS 1.3/1.2; HSTS; plaintext на :8443 не обслуживается 0.01s TLS1.1→TLSV1_ALERT_PROTOCOL_VERSION; TLS1.2 ok (ECDHE-ECDSA-AES128-GCM-SHA256); default TLSv1.3; HSTS=max-age=31536000; plaintext→closed (RemoteDisconnected); host ports closed: [8080, 8081, 9000, 5432, 6379, 4222, 4318]
|
||||
PASS ACL: посторонний не видит чат/сообщения/вложение (404); X-User-Id не меняет Bearer identity 1.66s outsider 404 ×4, foreign attachment 404, X-User-Id ignored (me=eve), anonymous+X-User-Id 401
|
||||
PASS logout отзывает сессию; истечение TTL (api-ttl, профиль ttl) → 401 3.36s logout → 401; TTL 2 s → 401 после истечения
|
||||
PASS лимит входа ОБЩИЙ для реплик: 5 неудач (IP+username) → 429 + Retry-After, даже с верным паролем 0.39s 401×5 от реплик ['api-2c95f68a', 'api-b71c78e6'] → 429 Retry-After=300s (shared via Redis); XFF spoof → 429; другой user → 201
|
||||
PASS ограничения размера: JSON > 64 KiB → 413 (API), URI > 4 KiB → 414, > 64 заголовков → 400, заголовок > 16 KiB → 400 (LB) 0.12s json 70 KB→413 payload_too_large, URI 5 KB→414, 70 headers→400, 20 KB header→400, upload Content-Length 50 MiB→413 (LB, до чтения тела)
|
||||
PASS Argon2id: соль+параметры в PHC; ≥ 19 MiB/t≥2/p=1; legacy scrypt и слабый Argon2id перехешируются при входе 3.09s current m=19456 t=3 p=1; scrypt → argon2id ✓; argon2id t=2 → t=3 ✓
|
||||
PASS ошибки не раскрывают credentials: 401 одинаков для неизвестного/неверного; нет Server/версий; пароль не эхо 0.24s 401 identical, no Server header, no credential echo
|
||||
summary: 8 passed, 0 failed
|
||||
exit=0
|
||||
@@ -0,0 +1,10 @@
|
||||
# 2026-11-22T19:27:21Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 student-tests/test_storage_failures.py
|
||||
## object storage failures (https://127.0.0.1:8443)
|
||||
PASS bucket is private outside API: anonymous GET/LIST/PUT denied, API key limited 2.80s anon GET 403; s3-check 4/4 PASS
|
||||
PASS S3 down: upload/download 503 fast, text messages and readiness keep working 31.13s 503 in 0.04s/0.03s; after start: reads 4.4s, writes 23.7s
|
||||
PASS interrupted upload: no object and no intent left behind 5.13s objects 2, intents 1 — unchanged
|
||||
PASS uploads rejected at the very end (truncated PNG) leave no staging object (race regression) 6.04s 30 × 415 at finish(); staging objects 2 → 2
|
||||
PASS crash between staging PUT and DB COMMIT: intent recorded, janitor removes object after grace 23.75s orphan staging/cc74d21f760c… removed 12.2s after crash (grace 10 s)
|
||||
summary: 5 passed, 0 failed
|
||||
exit=0
|
||||
@@ -0,0 +1,9 @@
|
||||
# 2026-11-22T19:31:27Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 student-tests/test_telemetry_persistence.py
|
||||
## lab6: сохранность истории telemetry после перезапуска
|
||||
PASS до рестарта: лог, trace и метрика контрольного запроса сохранены 17.31s request_id → trace 7e73f96b3105…, счётчик POST messages = 3
|
||||
PASS перезапуск всех сервисов и хранилищ (volumes сохраняются) 45.47s hook scripts/restart.sh + готовность за 45 с
|
||||
PASS после рестарта: тот же лог, тот же trace, то же значение метрики в прошлом 0.23s лог, trace (8 spans), метрика (3) и dashboard на месте
|
||||
PASS после рестарта: новые данные доходят во все три хранилища 2.35s новый trace 908a5c09afbe…, текущий RPS API 1.16
|
||||
summary: 4 passed, 0 failed
|
||||
exit=0
|
||||
@@ -0,0 +1,153 @@
|
||||
# 2026-11-22T19:38:00Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 research/worker_compromise.py --out evidence/track1
|
||||
(0) baseline: 4 uploads → ready
|
||||
(1) before least privilege: shared credentials (lab6 model)
|
||||
(2) compromise: snapshot of worker material → attacker container
|
||||
(3) job theft: workers stopped, 6 uploads queued, attacker acks 3 messages
|
||||
(4) detection → operator response (scripts/compromise_response.py)
|
||||
"at": "2026-11-22T19:38:28Z",
|
||||
"seconds": 0.2,
|
||||
"result": {
|
||||
"service": "worker",
|
||||
"role": "messenger-worker",
|
||||
"secret_ids_destroyed": 1,
|
||||
"tokens_revoked": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "2 PKI: rotate worker leaf, revoke old serial, reload CRL/pins",
|
||||
"at": "2026-11-22T19:38:31Z",
|
||||
"seconds": 3.5,
|
||||
"result": {
|
||||
"at": "2026-11-22T19:38:28Z",
|
||||
"pki": {
|
||||
"identity": "worker",
|
||||
"old_serial": "70432b83622e508c8d6406bd7ea94b828c2d36f3",
|
||||
"new_serial": "7ce2f74406b2dcd8c947eda0d14f17b8643fa2b9",
|
||||
"revoked": [
|
||||
"70432b83622e508c8d6406bd7ea94b828c2d36f3"
|
||||
]
|
||||
},
|
||||
"reloaded": [
|
||||
"lb:USR2",
|
||||
"otel-gw:USR2",
|
||||
"prometheus-gw:USR2",
|
||||
"loki-gw:USR2",
|
||||
"tempo-gw:USR2",
|
||||
"nats:HUP",
|
||||
"postgres:reload",
|
||||
"openbao:HUP"
|
||||
],
|
||||
"total_s": 3.5
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "3 PostgreSQL: emergency role switch (old NOLOGIN + kill)",
|
||||
"at": "2026-11-22T19:38:34Z",
|
||||
"seconds": 3.1,
|
||||
"result": {
|
||||
"rotated": "db",
|
||||
"service": "worker",
|
||||
"at": "2026-11-22T19:38:34Z",
|
||||
"old_role": "messenger_worker_b",
|
||||
"new_role": "messenger_worker_a",
|
||||
"kv_version": 3,
|
||||
"services_switched_after_s": null,
|
||||
"old_sessions_terminated": 0,
|
||||
"old_credential_check": "REJECTED .3\", port 5432 failed: FATAL: password authentication failed for user \"messenger_worker_b\"",
|
||||
"total_s": 3.0
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "4 S3: emergency key rotation (old key removed)",
|
||||
"at": "2026-11-22T19:38:39Z",
|
||||
"seconds": 4.4,
|
||||
"result": {
|
||||
"rotated": "s3",
|
||||
"service": "worker",
|
||||
"at": "2026-11-22T19:38:39Z",
|
||||
"kv_version": 4,
|
||||
"replicas": 0,
|
||||
"services_switched_after_s": null,
|
||||
"old_credential_check": "REJECTED 403 InvalidAccessKeyId",
|
||||
"total_s": 4.3
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "5 OpenBao: issue new SecretID for worker",
|
||||
"at": "2026-11-22T19:38:39Z",
|
||||
"seconds": 0.1,
|
||||
"result": {
|
||||
"service": "worker",
|
||||
"secret_id": "rotated (file updated, value not shown)",
|
||||
"old_secret_id_destroyed": "already"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "6 recreate worker containers, wait healthy",
|
||||
"at": "2026-11-22T19:38:47Z",
|
||||
"seconds": 8.2,
|
||||
"result": 2
|
||||
},
|
||||
{
|
||||
"step": "7 republish jobs lost from the broker (from PostgreSQL)",
|
||||
"at": "2026-11-22T19:38:49Z",
|
||||
"seconds": 1.7,
|
||||
"result": {
|
||||
"republished": 3,
|
||||
"jobs": [
|
||||
"f8631f3a-70ff-4700-b398-3dad3e927bf7",
|
||||
"7a520f6d-2bc5-4e9b-b8ca-aeab81ae1fed",
|
||||
"43fe7de7-4c5d-4899-870c-b75f6d3e4905"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
(5) recovery: all queued attachments must become ready
|
||||
# Трек 1: матрица возможностей злоумышленника
|
||||
|
||||
| Система | Действие | До least privilege (общие креды, модель lab6) | Украден материал worker (lab7) | После отзыва и ротации |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| openbao | login with stolen SecretID | n/a | ALLOWED | denied |
|
||||
| openbao | read worker secrets (DB/S3) | — | ALLOWED | — |
|
||||
| openbao | read API secrets (Redis, роль БД API) | — | denied | — |
|
||||
| openbao | list secret/ (поиск чужих путей) | — | denied | — |
|
||||
| openbao | write policy / sys/* | — | denied | — |
|
||||
| openbao | issue SecretID другим ролям | — | denied | — |
|
||||
| openbao | fallback: secrets stolen earlier (loot) | — | — | использованы (loot) |
|
||||
| postgres | connect | ALLOWED | ALLOWED | denied |
|
||||
| postgres | read users.password_hash | ALLOWED | denied | — |
|
||||
| postgres | read messages.text | ALLOWED | denied | — |
|
||||
| postgres | read sessions | ALLOWED | denied | — |
|
||||
| postgres | read chat membership | ALLOWED | denied | — |
|
||||
| postgres | enumerate attachment object keys | ALLOWED | ALLOWED | — |
|
||||
| postgres | UPDATE attachments.status (rolled back) | ALLOWED | ALLOWED | — |
|
||||
| postgres | DELETE attachments (rolled back) | ALLOWED | denied | — |
|
||||
| postgres | UPDATE users.password_hash (rolled back) | ALLOWED | denied | — |
|
||||
| postgres | INSERT messages (rolled back) | ALLOWED | denied | — |
|
||||
| postgres | CREATE TABLE | ALLOWED | denied | — |
|
||||
| postgres | CREATE ROLE | denied | denied | — |
|
||||
| postgres | COPY TO PROGRAM (RCE на сервере БД) | denied | denied | — |
|
||||
| s3 | LIST originals/ | ALLOWED | denied | denied |
|
||||
| s3 | LIST whole bucket | ALLOWED | denied | denied |
|
||||
| s3 | GET original by key from DB (чужие файлы) | ALLOWED | ALLOWED | — |
|
||||
| s3 | GET variants/ | ALLOWED | denied | denied |
|
||||
| s3 | PUT variants/ (подмена превью) | ALLOWED | ALLOWED | denied |
|
||||
| s3 | DELETE originals/ (несуществующий ключ) | ALLOWED | ALLOWED | denied |
|
||||
| s3 | PUT вне своих prefix | ALLOWED | denied | denied |
|
||||
| s3 | CreateBucket | ALLOWED | denied | denied |
|
||||
| nats | connect | ALLOWED | ALLOWED | denied |
|
||||
| nats | consumer info (видеть очередь) | ALLOWED | ALLOWED | — |
|
||||
| nats | purge stream (уничтожить очередь) | ALLOWED | denied | — |
|
||||
| nats | delete stream | ALLOWED | denied | — |
|
||||
| nats | create consumer (тайное копирование заданий) | ALLOWED | denied | — |
|
||||
| nats | subscribe attachments.> (подслушивать) | denied | denied | — |
|
||||
| redis | connect (сессии) | denied | denied | denied |
|
||||
| api | call API replica with worker cert (bypass LB) | denied | denied | denied |
|
||||
|
||||
Кража заданий: 3; задания после кражи: {'queued': 6}; после реакции: {'ready': 6}, все готовы через 26.0 с после начала реакции.
|
||||
Доступ злоумышленника перекрыт через 11.2 с; обработка восстановлена через 21.2 с; кража после реакции: [].
|
||||
Инварианты (jobs invariants --settled --since): {"ok": true, "violations": {}}
|
||||
exit=0
|
||||
@@ -0,0 +1,44 @@
|
||||
# Трек 1: матрица возможностей злоумышленника
|
||||
|
||||
| Система | Действие | До least privilege (общие креды, модель lab6) | Украден материал worker (lab7) | После отзыва и ротации |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| openbao | login with stolen SecretID | n/a | ALLOWED | denied |
|
||||
| openbao | read worker secrets (DB/S3) | — | ALLOWED | — |
|
||||
| openbao | read API secrets (Redis, роль БД API) | — | denied | — |
|
||||
| openbao | list secret/ (поиск чужих путей) | — | denied | — |
|
||||
| openbao | write policy / sys/* | — | denied | — |
|
||||
| openbao | issue SecretID другим ролям | — | denied | — |
|
||||
| openbao | fallback: secrets stolen earlier (loot) | — | — | использованы (loot) |
|
||||
| postgres | connect | ALLOWED | ALLOWED | denied |
|
||||
| postgres | read users.password_hash | ALLOWED | denied | — |
|
||||
| postgres | read messages.text | ALLOWED | denied | — |
|
||||
| postgres | read sessions | ALLOWED | denied | — |
|
||||
| postgres | read chat membership | ALLOWED | denied | — |
|
||||
| postgres | enumerate attachment object keys | ALLOWED | ALLOWED | — |
|
||||
| postgres | UPDATE attachments.status (rolled back) | ALLOWED | ALLOWED | — |
|
||||
| postgres | DELETE attachments (rolled back) | ALLOWED | denied | — |
|
||||
| postgres | UPDATE users.password_hash (rolled back) | ALLOWED | denied | — |
|
||||
| postgres | INSERT messages (rolled back) | ALLOWED | denied | — |
|
||||
| postgres | CREATE TABLE | ALLOWED | denied | — |
|
||||
| postgres | CREATE ROLE | denied | denied | — |
|
||||
| postgres | COPY TO PROGRAM (RCE на сервере БД) | denied | denied | — |
|
||||
| s3 | LIST originals/ | ALLOWED | denied | denied |
|
||||
| s3 | LIST whole bucket | ALLOWED | denied | denied |
|
||||
| s3 | GET original by key from DB (чужие файлы) | ALLOWED | ALLOWED | — |
|
||||
| s3 | GET variants/ | ALLOWED | denied | denied |
|
||||
| s3 | PUT variants/ (подмена превью) | ALLOWED | ALLOWED | denied |
|
||||
| s3 | DELETE originals/ (несуществующий ключ) | ALLOWED | ALLOWED | denied |
|
||||
| s3 | PUT вне своих prefix | ALLOWED | denied | denied |
|
||||
| s3 | CreateBucket | ALLOWED | denied | denied |
|
||||
| nats | connect | ALLOWED | ALLOWED | denied |
|
||||
| nats | consumer info (видеть очередь) | ALLOWED | ALLOWED | — |
|
||||
| nats | purge stream (уничтожить очередь) | ALLOWED | denied | — |
|
||||
| nats | delete stream | ALLOWED | denied | — |
|
||||
| nats | create consumer (тайное копирование заданий) | ALLOWED | denied | — |
|
||||
| nats | subscribe attachments.> (подслушивать) | denied | denied | — |
|
||||
| redis | connect (сессии) | denied | denied | denied |
|
||||
| api | call API replica with worker cert (bypass LB) | denied | denied | denied |
|
||||
|
||||
Кража заданий: 3; задания после кражи: {'queued': 6}; после реакции: {'ready': 6}, все готовы через 26.0 с после начала реакции.
|
||||
Доступ злоумышленника перекрыт через 11.2 с; обработка восстановлена через 21.2 с; кража после реакции: [].
|
||||
Инварианты (jobs invariants --settled --since): {"ok": true, "violations": {}}
|
||||
@@ -0,0 +1,107 @@
|
||||
{
|
||||
"service": "worker",
|
||||
"started": "2026-11-22T19:38:28Z",
|
||||
"access_cut_after_s": 11.2,
|
||||
"processing_restored_after_s": 21.2,
|
||||
"timeline": [
|
||||
{
|
||||
"step": "1 OpenBao: revoke all SecretID + tokens of messenger-worker",
|
||||
"at": "2026-11-22T19:38:28Z",
|
||||
"seconds": 0.2,
|
||||
"result": {
|
||||
"service": "worker",
|
||||
"role": "messenger-worker",
|
||||
"secret_ids_destroyed": 1,
|
||||
"tokens_revoked": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "2 PKI: rotate worker leaf, revoke old serial, reload CRL/pins",
|
||||
"at": "2026-11-22T19:38:31Z",
|
||||
"seconds": 3.5,
|
||||
"result": {
|
||||
"at": "2026-11-22T19:38:28Z",
|
||||
"pki": {
|
||||
"identity": "worker",
|
||||
"old_serial": "70432b83622e508c8d6406bd7ea94b828c2d36f3",
|
||||
"new_serial": "7ce2f74406b2dcd8c947eda0d14f17b8643fa2b9",
|
||||
"revoked": [
|
||||
"70432b83622e508c8d6406bd7ea94b828c2d36f3"
|
||||
]
|
||||
},
|
||||
"reloaded": [
|
||||
"lb:USR2",
|
||||
"otel-gw:USR2",
|
||||
"prometheus-gw:USR2",
|
||||
"loki-gw:USR2",
|
||||
"tempo-gw:USR2",
|
||||
"nats:HUP",
|
||||
"postgres:reload",
|
||||
"openbao:HUP"
|
||||
],
|
||||
"total_s": 3.5
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "3 PostgreSQL: emergency role switch (old NOLOGIN + kill)",
|
||||
"at": "2026-11-22T19:38:34Z",
|
||||
"seconds": 3.1,
|
||||
"result": {
|
||||
"rotated": "db",
|
||||
"service": "worker",
|
||||
"at": "2026-11-22T19:38:34Z",
|
||||
"old_role": "messenger_worker_b",
|
||||
"new_role": "messenger_worker_a",
|
||||
"kv_version": 3,
|
||||
"services_switched_after_s": null,
|
||||
"old_sessions_terminated": 0,
|
||||
"old_credential_check": "REJECTED .3\", port 5432 failed: FATAL: password authentication failed for user \"messenger_worker_b\"",
|
||||
"total_s": 3.0
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "4 S3: emergency key rotation (old key removed)",
|
||||
"at": "2026-11-22T19:38:39Z",
|
||||
"seconds": 4.4,
|
||||
"result": {
|
||||
"rotated": "s3",
|
||||
"service": "worker",
|
||||
"at": "2026-11-22T19:38:39Z",
|
||||
"kv_version": 4,
|
||||
"replicas": 0,
|
||||
"services_switched_after_s": null,
|
||||
"old_credential_check": "REJECTED 403 InvalidAccessKeyId",
|
||||
"total_s": 4.3
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "5 OpenBao: issue new SecretID for worker",
|
||||
"at": "2026-11-22T19:38:39Z",
|
||||
"seconds": 0.1,
|
||||
"result": {
|
||||
"service": "worker",
|
||||
"secret_id": "rotated (file updated, value not shown)",
|
||||
"old_secret_id_destroyed": "already"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "6 recreate worker containers, wait healthy",
|
||||
"at": "2026-11-22T19:38:47Z",
|
||||
"seconds": 8.2,
|
||||
"result": 2
|
||||
},
|
||||
{
|
||||
"step": "7 republish jobs lost from the broker (from PostgreSQL)",
|
||||
"at": "2026-11-22T19:38:49Z",
|
||||
"seconds": 1.7,
|
||||
"result": {
|
||||
"republished": 3,
|
||||
"jobs": [
|
||||
"f8631f3a-70ff-4700-b398-3dad3e927bf7",
|
||||
"7a520f6d-2bc5-4e9b-b8ca-aeab81ae1fed",
|
||||
"43fe7de7-4c5d-4899-870c-b75f6d3e4905"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,285 @@
|
||||
{
|
||||
"started": "2026-11-22T19:38:01Z",
|
||||
"base_url": "https://127.0.0.1:8443",
|
||||
"matrix_before": {
|
||||
"openbao": {
|
||||
"login with stolen SecretID": "n/a (в lab6 секреты лежали в файлах)"
|
||||
},
|
||||
"postgres": {
|
||||
"connect": "ALLOWED as messenger_owner",
|
||||
"read users.password_hash": "ALLOWED (5)",
|
||||
"read messages.text": "ALLOWED (5)",
|
||||
"read sessions": "ALLOWED (5)",
|
||||
"read chat membership": "ALLOWED (5)",
|
||||
"enumerate attachment object keys": "ALLOWED (50)",
|
||||
"UPDATE attachments.status (rolled back)": "ALLOWED",
|
||||
"DELETE attachments (rolled back)": "ALLOWED",
|
||||
"UPDATE users.password_hash (rolled back)": "ALLOWED",
|
||||
"INSERT messages (rolled back)": "ALLOWED",
|
||||
"CREATE TABLE": "ALLOWED",
|
||||
"CREATE ROLE": "DENIED InsufficientPrivilege",
|
||||
"COPY TO PROGRAM (RCE на сервере БД)": "DENIED InsufficientPrivilege"
|
||||
},
|
||||
"s3": {
|
||||
"LIST originals/": "ALLOWED (285)",
|
||||
"LIST whole bucket": "ALLOWED (1148)",
|
||||
"GET original by key from DB (чужие файлы)": "ALLOWED (111817)",
|
||||
"GET variants/": "ALLOWED (NoSuchKey: доступ есть, объекта нет)",
|
||||
"PUT variants/ (подмена превью)": "ALLOWED",
|
||||
"DELETE originals/ (несуществующий ключ)": "ALLOWED",
|
||||
"PUT вне своих prefix": "ALLOWED",
|
||||
"CreateBucket": "ALLOWED (True)"
|
||||
},
|
||||
"nats": {
|
||||
"connect": "ALLOWED",
|
||||
"consumer info (видеть очередь)": "ALLOWED",
|
||||
"purge stream (уничтожить очередь)": "ALLOWED",
|
||||
"delete stream": "ALLOWED",
|
||||
"create consumer (тайное копирование заданий)": "ALLOWED",
|
||||
"subscribe attachments.> (подслушивать)": "DENIED (permissions violation)"
|
||||
},
|
||||
"redis": {
|
||||
"connect (сессии)": "DENIED AuthenticationError: Authentication required."
|
||||
},
|
||||
"api": {
|
||||
"call API replica with worker cert (bypass LB)": "DENIED BrokenPipeError (identity не lb → соединение закрыто)"
|
||||
}
|
||||
},
|
||||
"matrix_compromised": {
|
||||
"openbao": {
|
||||
"login with stolen SecretID": "ALLOWED (policies ['messenger-worker'], TTL 300s)",
|
||||
"read worker secrets (DB/S3)": "ALLOWED",
|
||||
"read API secrets (Redis, роль БД API)": "DENIED (403)",
|
||||
"list secret/ (поиск чужих путей)": "DENIED (403)",
|
||||
"write policy / sys/*": "DENIED (403)",
|
||||
"issue SecretID другим ролям": "DENIED (403)"
|
||||
},
|
||||
"postgres": {
|
||||
"connect": "ALLOWED as messenger_worker_b",
|
||||
"read users.password_hash": "DENIED InsufficientPrivilege",
|
||||
"read messages.text": "DENIED InsufficientPrivilege",
|
||||
"read sessions": "DENIED InsufficientPrivilege",
|
||||
"read chat membership": "DENIED InsufficientPrivilege",
|
||||
"enumerate attachment object keys": "ALLOWED (50)",
|
||||
"UPDATE attachments.status (rolled back)": "ALLOWED",
|
||||
"DELETE attachments (rolled back)": "DENIED InsufficientPrivilege",
|
||||
"UPDATE users.password_hash (rolled back)": "DENIED InsufficientPrivilege",
|
||||
"INSERT messages (rolled back)": "DENIED InsufficientPrivilege",
|
||||
"CREATE TABLE": "DENIED InsufficientPrivilege",
|
||||
"CREATE ROLE": "DENIED InsufficientPrivilege",
|
||||
"COPY TO PROGRAM (RCE на сервере БД)": "DENIED InsufficientPrivilege"
|
||||
},
|
||||
"s3": {
|
||||
"LIST originals/": "DENIED AccessDenied",
|
||||
"LIST whole bucket": "DENIED AccessDenied",
|
||||
"GET original by key from DB (чужие файлы)": "ALLOWED (111817)",
|
||||
"GET variants/": "DENIED AccessDenied",
|
||||
"PUT variants/ (подмена превью)": "ALLOWED",
|
||||
"DELETE originals/ (несуществующий ключ)": "ALLOWED",
|
||||
"PUT вне своих prefix": "DENIED AccessDenied",
|
||||
"CreateBucket": "DENIED AccessDenied"
|
||||
},
|
||||
"nats": {
|
||||
"connect": "ALLOWED",
|
||||
"consumer info (видеть очередь)": "ALLOWED",
|
||||
"purge stream (уничтожить очередь)": "DENIED (permissions violation)",
|
||||
"delete stream": "DENIED (permissions violation)",
|
||||
"create consumer (тайное копирование заданий)": "DENIED (permissions violation)",
|
||||
"subscribe attachments.> (подслушивать)": "DENIED (permissions violation)"
|
||||
},
|
||||
"redis": {
|
||||
"connect (сессии)": "DENIED AuthenticationError: Authentication required."
|
||||
},
|
||||
"api": {
|
||||
"call API replica with worker cert (bypass LB)": "DENIED BrokenPipeError (identity не lb → соединение закрыто)"
|
||||
}
|
||||
},
|
||||
"stolen": {
|
||||
"stolen_jobs": [
|
||||
"f8631f3a-70ff-4700-b398-3dad3e927bf7",
|
||||
"7a520f6d-2bc5-4e9b-b8ca-aeab81ae1fed",
|
||||
"43fe7de7-4c5d-4899-870c-b75f6d3e4905"
|
||||
]
|
||||
},
|
||||
"jobs_after_theft": {
|
||||
"queued": 6
|
||||
},
|
||||
"response": {
|
||||
"service": "worker",
|
||||
"started": "2026-11-22T19:38:28Z",
|
||||
"access_cut_after_s": 11.2,
|
||||
"processing_restored_after_s": 21.2,
|
||||
"timeline": [
|
||||
{
|
||||
"step": "1 OpenBao: revoke all SecretID + tokens of messenger-worker",
|
||||
"at": "2026-11-22T19:38:28Z",
|
||||
"seconds": 0.2,
|
||||
"result": {
|
||||
"service": "worker",
|
||||
"role": "messenger-worker",
|
||||
"secret_ids_destroyed": 1,
|
||||
"tokens_revoked": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "2 PKI: rotate worker leaf, revoke old serial, reload CRL/pins",
|
||||
"at": "2026-11-22T19:38:31Z",
|
||||
"seconds": 3.5,
|
||||
"result": {
|
||||
"at": "2026-11-22T19:38:28Z",
|
||||
"pki": {
|
||||
"identity": "worker",
|
||||
"old_serial": "70432b83622e508c8d6406bd7ea94b828c2d36f3",
|
||||
"new_serial": "7ce2f74406b2dcd8c947eda0d14f17b8643fa2b9",
|
||||
"revoked": [
|
||||
"70432b83622e508c8d6406bd7ea94b828c2d36f3"
|
||||
]
|
||||
},
|
||||
"reloaded": [
|
||||
"lb:USR2",
|
||||
"otel-gw:USR2",
|
||||
"prometheus-gw:USR2",
|
||||
"loki-gw:USR2",
|
||||
"tempo-gw:USR2",
|
||||
"nats:HUP",
|
||||
"postgres:reload",
|
||||
"openbao:HUP"
|
||||
],
|
||||
"total_s": 3.5
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "3 PostgreSQL: emergency role switch (old NOLOGIN + kill)",
|
||||
"at": "2026-11-22T19:38:34Z",
|
||||
"seconds": 3.1,
|
||||
"result": {
|
||||
"rotated": "db",
|
||||
"service": "worker",
|
||||
"at": "2026-11-22T19:38:34Z",
|
||||
"old_role": "messenger_worker_b",
|
||||
"new_role": "messenger_worker_a",
|
||||
"kv_version": 3,
|
||||
"services_switched_after_s": null,
|
||||
"old_sessions_terminated": 0,
|
||||
"old_credential_check": "REJECTED .3\", port 5432 failed: FATAL: password authentication failed for user \"messenger_worker_b\"",
|
||||
"total_s": 3.0
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "4 S3: emergency key rotation (old key removed)",
|
||||
"at": "2026-11-22T19:38:39Z",
|
||||
"seconds": 4.4,
|
||||
"result": {
|
||||
"rotated": "s3",
|
||||
"service": "worker",
|
||||
"at": "2026-11-22T19:38:39Z",
|
||||
"kv_version": 4,
|
||||
"replicas": 0,
|
||||
"services_switched_after_s": null,
|
||||
"old_credential_check": "REJECTED 403 InvalidAccessKeyId",
|
||||
"total_s": 4.3
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "5 OpenBao: issue new SecretID for worker",
|
||||
"at": "2026-11-22T19:38:39Z",
|
||||
"seconds": 0.1,
|
||||
"result": {
|
||||
"service": "worker",
|
||||
"secret_id": "rotated (file updated, value not shown)",
|
||||
"old_secret_id_destroyed": "already"
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "6 recreate worker containers, wait healthy",
|
||||
"at": "2026-11-22T19:38:47Z",
|
||||
"seconds": 8.2,
|
||||
"result": 2
|
||||
},
|
||||
{
|
||||
"step": "7 republish jobs lost from the broker (from PostgreSQL)",
|
||||
"at": "2026-11-22T19:38:49Z",
|
||||
"seconds": 1.7,
|
||||
"result": {
|
||||
"republished": 3,
|
||||
"jobs": [
|
||||
"f8631f3a-70ff-4700-b398-3dad3e927bf7",
|
||||
"7a520f6d-2bc5-4e9b-b8ca-aeab81ae1fed",
|
||||
"43fe7de7-4c5d-4899-870c-b75f6d3e4905"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"matrix_after": {
|
||||
"openbao": {
|
||||
"login with stolen SecretID": "DENIED (HTTP 400)",
|
||||
"fallback: secrets stolen earlier (loot)": "используются"
|
||||
},
|
||||
"postgres": {
|
||||
"connect": "DENIED SSL error: sslv3 alert certificate revoked"
|
||||
},
|
||||
"s3": {
|
||||
"LIST originals/": "DENIED InvalidAccessKeyId",
|
||||
"LIST whole bucket": "DENIED InvalidAccessKeyId",
|
||||
"GET variants/": "DENIED InvalidAccessKeyId",
|
||||
"PUT variants/ (подмена превью)": "DENIED InvalidAccessKeyId",
|
||||
"DELETE originals/ (несуществующий ключ)": "DENIED InvalidAccessKeyId",
|
||||
"PUT вне своих prefix": "DENIED InvalidAccessKeyId",
|
||||
"CreateBucket": "DENIED InvalidAccessKeyId"
|
||||
},
|
||||
"nats": {
|
||||
"connect": "DENIED ConnectionRefusedError: connection closed by server (certificate not pinned / not mapped)"
|
||||
},
|
||||
"redis": {
|
||||
"connect (сессии)": "DENIED AuthenticationError: Authentication required."
|
||||
},
|
||||
"api": {
|
||||
"call API replica with worker cert (bypass LB)": "DENIED BrokenPipeError (identity не lb → соединение закрыто)"
|
||||
}
|
||||
},
|
||||
"steal_after": {
|
||||
"stolen_jobs": [],
|
||||
"error": "ConnectionRefusedError: connection closed by server (certificate not pinned / not mapped)"
|
||||
},
|
||||
"recovery_all_ready_after_s": 26.0,
|
||||
"final_status": {
|
||||
"ready": 6
|
||||
},
|
||||
"stolen_jobs_events": {
|
||||
"f8631f3a-70ff-4700-b398-3dad3e927bf7": [
|
||||
"enqueued",
|
||||
"published",
|
||||
"republished_stuck",
|
||||
"published",
|
||||
"claimed",
|
||||
"committed",
|
||||
"published_version_changed",
|
||||
"staging_cleaned"
|
||||
],
|
||||
"7a520f6d-2bc5-4e9b-b8ca-aeab81ae1fed": [
|
||||
"enqueued",
|
||||
"published",
|
||||
"republished_stuck",
|
||||
"published",
|
||||
"claimed",
|
||||
"committed",
|
||||
"published_version_changed",
|
||||
"staging_cleaned"
|
||||
],
|
||||
"43fe7de7-4c5d-4899-870c-b75f6d3e4905": [
|
||||
"enqueued",
|
||||
"published",
|
||||
"republished_stuck",
|
||||
"published",
|
||||
"claimed",
|
||||
"committed",
|
||||
"published_version_changed",
|
||||
"staging_cleaned"
|
||||
]
|
||||
},
|
||||
"invariants": {
|
||||
"ok": true,
|
||||
"violations": {}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user