Files
mtusi2026lab7/evidence/security/rotation-revocation.txt
T

379 lines
28 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Что доказывает: ротация одного рабочего secret и одного leaf без пересборки образов,
# отзыв старой identity и ограниченное поведение при expiry / sealed OpenBao (рубрика
# «4»), отзыв secret / cert с учётом действующих соединений и токенов и новое подключение
# (проверка 6 матрицы), PKI lifecycle (рубрика «5», вариант): перенос rotation-revocation.
# Команды оператора make rotate-leaf / revoke-identity / pki-renew / rotate-secret
# (infra/rotation/rotation.py) на работающем стенде, учения make rotation-check под
# нагрузкой, сбой посреди команды и его сведение, отказ pki.sh без базы CA.
# Дата: 2026-12-02 UTC, 04:50–06:00 (2 декабря, 07:50–09:00 MSK).
# Окружение: машина переноса (не машина замеров): macOS 26.7.1, Docker 29.9.3
# (linux/arm64, ВМ 12 CPU / 11,6 ГиБ), Compose 5.7.1, python3 хоста 3.11 (синтаксис
# скриптов проверен /usr/bin/python3 3.9.6), OpenSSL 3 Homebrew. Рядом — только
# контейнеры другого проекта domains-*; load average перед учениями 1,9–2,1.
# Стенд: рабочий vladimirceva-lab7 (LB https://localhost:18443, OpenBao 18200, брокер
# 15673). Временная PKI проб — каталог scratchpad (PKI_OPERATOR_DIR и PKI_STAND_DIR).
# Роль оператора CA и OpenBao — агент переноса, только командами make и scripts/lab7.py
# её репозитория; ключ CA, доли, root token и значения .env не открывались.
# Код: src_sha256 2aab6fa2f690688dafd09d881e54b47d57819416bf4e0de3079dcb11160e58c2
# (src/db.py — 28P01 недоступность, src/client_tls.py — комментарий).
# Повторить: make unit-test; make rotate-leaf IDENTITY=relay; make revoke-identity
# IDENTITY=worker; make rotate-leaf IDENTITY=worker; make rotate-secret
# SECRET=postgres/api; make pki-renew; make rotation-check; make rotation-check
# CONTROL=skip-crl.
# Домашний каталог — <home>, временный — <tmp>. Значений секретов, ключей и токенов в
# выводе нет: только имена, серийные номера, версии и секунды.
# --- 1. Быстрые тесты: красные до переноса, мутации ---
# student-tests/unit/test_rotation.py на коде 7620f9e:
$ uv run pytest -q -m unit student-tests/unit/test_rotation.py
ERROR student-tests/unit/test_rotation.py - FileNotFoundError: [Errno 2] No s...
1 error in 0.08s
# тот же код 7620f9e плюс только новые infra/rotation/rotation.py и infra/openbao/bao.py:
FAILED student-tests/unit/test_rotation.py::test_recreated_steps_match_pki_sh
FAILED student-tests/unit/test_rotation.py::test_rotate_keeps_the_previous_leaf_valid
FAILED student-tests/unit/test_rotation.py::test_hold_blocks_stand_until_rotate
FAILED student-tests/unit/test_rotation.py::test_hold_refuses_a_name_not_in_the_list
FAILED student-tests/unit/test_rotation.py::test_lost_ca_database_is_refused
FAILED student-tests/unit/test_rotation.py::test_role_password_refusal_is_unavailable
FAILED student-tests/unit/test_rotation.py::test_neighbour_files - assert 'ch...
FAILED student-tests/unit/test_rotation.py::test_make_targets_and_codex_rules
8 failed, 22 passed in 1.25s
# мутации копии дерева (каждая — своя строка): cmd_leaf отзывает прежний раньше перехода
# владельца; pki.sh stand не смотрит на удержание; require_index выключен:
FAILED student-tests/unit/test_rotation.py::test_leaf_order_issue_owner_revoke_crl
FAILED student-tests/unit/test_rotation.py::test_failure_names_phase_and_repeat
FAILED student-tests/unit/test_rotation.py::test_hold_blocks_stand_until_rotate
FAILED student-tests/unit/test_rotation.py::test_lost_ca_database_is_refused
4 failed, 26 passed in 2.05s
# после переноса:
30 passed in 2.08s
# --- 2. Ротация leaf каждой identity с проверяющими (и представителей без них) ---
# Строки «serial … in use» и итог каждой команды; применение у владельца и проверяющих.
$ make rotate-leaf IDENTITY=ingress
[ 2.0 s] rotated ingress: serial 01A1669353DC029D45D5137E797255CD -> 01A1669353DC029D45D5137E797256A4; the previous leaf is not revoked yet
[ 2.3 s] haproxy: pair ingress 01A1669353DC029D45D5137E797256A4
[ 2.5 s] revoked ingress: serial 01A1669353DC029D45D5137E797255C8
[ 2.5 s] revoked ingress: serial 01A1669353DC029D45D5137E797255CD
[ 2.5 s] done
# (первый же отзыв --superseded нашёл забытый прежний leaf ingress …55C8 — перевыпуск по
# списку переноса https-tooling; у нас — та же находка, design, «Уточнения apply», п. 16)
$ make rotate-leaf IDENTITY=haproxy
[ 3.3 s] haproxy: pair haproxy 01A1669353DC029D45D5137E797256A5
[ 3.5 s] revoked haproxy: serial 01A1669353DC029D45D5137E797255C6
[ 14.3 s] api: done: 2 replicas 94ef589ae422 775bb391c54c UP in 9s
[ 14.3 s] api: new CRL applied
[ 14.3 s] done
$ make rotate-leaf IDENTITY=relay
[ 7.5 s] relay: restarted in 5.3 s
[ 7.7 s] revoked relay: serial 01A1669353DC029D45D5137E797255D6
[ 7.8 s] openbao: new CRL applied
[ 7.9 s] openbao: role relay: revoked 1 tokens, kept 1
[ 8.1 s] rabbitmq: new CRL applied
[ 14.2 s] otel-gateway: new CRL applied
[ 27.0 s] rabbitmq: connections begun before the CRL and opened after it, closed: 0
[ 27.0 s] done
# остальные (итог: код, секунды, что перезапущено):
api 0, 17 s — замена реплик (rolling-update.sh без сборки), CRL LB
api-client 0, 18 s — замена реплик, рестарт otel-gateway, CRL OpenBao
worker 0, 24 s — рестарт worker 1,8 с, CRL OpenBao / брокер / otel-gateway, 17 с начатых входов
cleaner 0, 7 s — рестарт cleaner 4,6 с, CRL OpenBao, токен прежнего отозван
rabbitmq 0, 9 s — пара на работающем узле (serial сверен с рукопожатием), рестарт relay и worker
otel-collector 0, 26 s — рестарт otel-gateway 2,7 с, CRL — relay, worker, замена реплик
otel-collector-client 0, 12 s — рестарт Collector 0,5 с, CRL loki-gateway, tempo-gateway, LB
prometheus-client 0, 16 s — рестарт Prometheus 1,3 с, CRL трём шлюзам
grafana-client 0, 24 s — рестарт Grafana 9,9 с, CRL трём шлюзам хранилищ
migrate 0, 3 s — одноразовый: CRL OpenBao
loki 0, 5 s — рестарт loki-gateway 3,1 с (без проверяющих)
postgres 0, 4 s — «postgres: storage restart, downtime 1.6 s»
$ make test
PASS: lab7 public API scenario; infrastructure and grading evidence remain separate.
# --- 3. Отзыв identity: CRL проверяющим, соединения и токены закрыты, удержание ---
$ make revoke-identity IDENTITY=haproxy
rotation: haproxy: replicas with the new CRL would refuse the LB and never become UP; to isolate the LB: docker compose stop haproxy. Run make rotate-leaf IDENTITY=haproxy; nothing changed
make: *** [revoke-identity] Error 2
$ make revoke-identity IDENTITY=ingress
rotation: ingress: no service checks it against the CRL, so revocation would change nothing; if its key leaked, a new CA is needed after the rotation. Run make rotate-leaf IDENTITY=ingress; nothing changed
$ make revoke-identity IDENTITY=worker
[ 2.1 s] revoked worker: serial 01A1669353DC029D45D5137E797256B5
[ 2.2 s] openbao: new CRL applied
[ 2.4 s] openbao: role worker: revoked 3 tokens
[ 2.5 s] rabbitmq: new CRL applied
[ 3.7 s] rabbitmq: connections of worker closed: 1
[ 6.2 s] otel-gateway: new CRL applied
[ 20.4 s] rabbitmq: connections begun before the CRL and opened after it, closed: 0
[ 20.4 s] worker is revoked; seconds from the start to the new CRL: openbao 2.2 s, rabbitmq 2.5 s, otel-gateway 6.2 s
[ 20.4 s] secrets issued to it are still valid; a compromised process: make rotate-secret SECRET=postgres/worker; make rotate-secret SECRET=s3/worker
[ 20.4 s] no new leaf until the operator returns the service: make rotate-leaf IDENTITY=worker
$ make pki-status | grep worker
leaf worker: serial 01A1669353DC029D45D5137E797256B5, not after 2027-03-02 05:13:59Z (90 days, REVOKED, held until make rotate-leaf IDENTITY=worker), …
$ make pki-stand | grep worker
held worker: revoked; revoked by make revoke-identity, a new leaf only from make rotate-leaf IDENTITY=worker
$ make rotate-leaf IDENTITY=worker
[ 2.3 s] rotated worker: serial 01A1669353DC029D45D5137E797256B5 -> 01A1669353DC029D45D5137E797256BF; the previous leaf is not revoked yet
[ 5.1 s] worker: restarted in 2.9 s
[ 5.3 s] worker: only the stand leaf is valid; nothing to revoke
[ 5.6 s] openbao: role worker: revoked 0 tokens, kept 1
[ 24.3 s] done
# Отзыв relay с живым соединением AMQP и токеном «украденной» парой — раздел 8 (учения).
# --- 4. Ротация секрета каждого пути: прежнее отвергнуто, новое принято ---
# окно — от момента, когда хранилище отвергает прежнее, до последнего заменённого процесса
# (оценка сверху); у S3 оба ключа действуют, пока процессы переходят.
$ make rotate-secret SECRET=s3/api
[ 7.5 s] s3-bootstrap: both keys are valid
[ 7.8 s] openbao: messenger/s3/api version 2
[ 19.1 s] api: done: 2 replicas dc8c40cb5d58 8e9c1a882b3f UP in 11s
[ 23.0 s] s3-bootstrap: done
[ 24.1 s] s3/api: previous value refused (InvalidAccessKeyId), new accepted
[ 24.1 s] s3/api: version 2, services api; window …: 0 s (both keys were valid until the processes moved); total 24.1 s
$ make rotate-secret SECRET=postgres/api
[ 3.8 s] openbao: messenger/postgres/api version 2
[ 5.8 s] postgres-bootstrap: done
[ 16.2 s] api: done: 2 replicas 579efa0ad7bc 277fdc723751 UP in 10s
[ 16.4 s] postgres: sessions of role api and logins older than the change closed: 0, left: 0
[ 17.2 s] postgres/api: previous value refused (28P01), new accepted
[ 17.2 s] postgres/api: version 2, services api; window …: at most 12.5 s; total 17.2 s
$ make rotate-secret SECRET=valkey/api
[ 5.6 s] valkey: recreated with the new password
[ 18.3 s] valkey/api: previous value refused (WRONGPASS), new accepted
[ 18.3 s] valkey/api: version 2, services api; window …: at most 13.4 s; total 18.3 s
# остальные пути:
s3/worker 0, 14 s — InvalidAccessKeyId / ok, окно 0 s
s3/cleaner 0, 20 s — InvalidAccessKeyId / ok, окно 0 s
postgres/migrate 0, 6 s — 28P01 / ok, процессов нет, окно не больше 2,2 s
postgres/worker 0, 8 s — 28P01 / ok, окно не больше 4,1 s
postgres/relay 0, 13 s — 28P01 / ok, окно не больше 8,0 s
postgres/cleaner 0, 14 s — 28P01 / ok, окно не больше 8,5 s
# --- 5. Продление и leaf OpenBao (шаги оператора) ---
$ make pki-renew
[ 11.8 s] every owner already works with its stand leaf
[ 55.4 s] new CRL applied: openbao 12.3 s, rabbitmq 13.0 s, haproxy 15.0 s, otel-gateway 17.5 s, loki-gateway 20.5 s, tempo-gateway 26.2 s, prometheus-gateway 30.0 s, relay 35.5 s, worker 37.1 s, cleaner 41.8 s, api 54.2 s
$ make rotate-leaf IDENTITY=openbao
[ 1.6 s] rotated openbao: serial 01A1669353DC029D45D5137E79725669 -> 01A1669353DC029D45D5137E797256C0; the previous leaf is not revoked yet
[ 1.6 s] openbao still works with the previous leaf, which is not revoked: a restart would seal it. Operator steps: docker compose restart openbao; make bao-unseal; make pki-renew
$ docker compose restart openbao; python3 scripts/lab7.py bao-unseal
unsealed OpenBao with 3 shares
$ make pki-renew
[ 11.9 s] revoked openbao: serial 01A1669353DC029D45D5137E79725669
[ 12.4 s] openbao: role api: revoked 0 tokens, kept 6
[ 55.4 s] done
$ make pki-status | grep -E 'REVOKED|held|older|CRL'
older leaf broker-probe: 6 still valid and not revoked besides the stand leaf
older leaf mtls-probe: 6 still valid and not revoked besides the stand leaf
older leaf s3-grpc-probe: 3 still valid and not revoked besides the stand leaf
older leaf telemetry-probe: 135 still valid and not revoked besides the stand leaf
CRL: next update 2027-01-01 05:19:27Z (30 days, ok), revoked 61, <home>/…/.pki/stand/crl.pem
# прежних действующих leaf identity стенда нет; «older leaf» — разовые leaf проб соседних
# проверок (1 день, сервисов не касаются)
# --- 6. Сбой посреди команды ---
# A. SIGINT до первого изменения:
$ python3 infra/rotation/rotation.py leaf cleaner # SIGINT через 0,5 с
rotation: SIGINT before any change, stopped
exit 130
# B. SIGTERM после первого изменения (фаза owner) — команда доводится:
[ 2.3 s] phase: owner
[ 2.3 s] SIGTERM received: the command will be finished first
[ 4.4 s] revoked worker: serial 01A1669353DC029D45D5137E797256BF
[ 24.0 s] done
exit 0
# C. вторая команда, пока идёт первая (блокировка стенда):
rotation: another rotation command is running; nothing changed
second exit 2
first exit 0
# D. SIGKILL в фазе processes rotate-secret s3/cleaner, затем ротация другого пути и повтор:
[ 6.8 s] openbao: messenger/s3/cleaner version 3
[ 6.8 s] phase: processes
exit 137
$ python3 infra/rotation/rotation.py secret postgres/cleaner
rotation: cleaner runs with another version of s3/cleaner than OpenBao has (an interrupted rotation): run make up first; nothing changed
exit 2
$ python3 infra/rotation/rotation.py secret s3/cleaner
[ 6.8 s] openbao: messenger/s3/cleaner version 4
[ 11.4 s] cleaner: loaded s3/cleaner version 4
[ 15.4 s] s3-bootstrap: done
[ 18.3 s] s3/cleaner: previous value refused (InvalidAccessKeyId), new accepted
[ 18.3 s] s3/cleaner: version 4, services cleaner; window …: 0 s (both keys were valid until the processes moved); total 18.3 s
exit 0
# (повтор выдал ещё одно значение; bootstrap без S3_KEEP_STALE_KEYS удалил оба прежних
# ключа — и исходный, и ключ убитой команды)
$ make test
PASS: lab7 public API scenario; infrastructure and grading evidence remain separate.
# --- 7. База CA без index.txt (временная PKI, не рабочая) ---
$ PKI_OPERATOR_DIR=<tmp>/op PKI_STAND_DIR=<tmp>/stand sh infra/pki/pki.sh stand; … revoke worker
$ mv <tmp>/op/index.txt <tmp>/op/index.txt.lost
$ sh infra/pki/pki.sh status
pki: the CA database <tmp>/op/index.txt is missing, nothing changed: openssl was killed while replacing it, or the file was removed
pki: index.txt.old lacks the last issue or revocation, it is lost: after the restore repeat it; a revocation - before crl, stand, make up and pki-renew, they would accept its leaf again
pki: run: cp -n '<tmp>/op/index.txt.old' '<tmp>/op/index.txt'; infra/pki/pki.sh status
exit 1
$ sh infra/pki/pki.sh rotate worker
(те же строки)
exit 1
$ python3 infra/rotation/rotation.py leaf worker
rotation: PKI is not ready: pki.sh status: exit 1: pki: the CA database <tmp>/op/index.txt is missing, nothing changed: … | pki: run: cp -n '<tmp>/op/index.txt.old' '<tmp>/op/index.txt'; infra/pki/pki.sh status; nothing changed
exit 2
$ python3 infra/rotation/rotation.py revoke relay
(то же) exit 2
$ cp -n <tmp>/op/index.txt.old <tmp>/op/index.txt; sh infra/pki/pki.sh status
status exit 0
# каталог <tmp> удалён
# --- 8. Учения под нагрузкой: make rotation-check ---
$ make rotation-check
PASS ingress: the LB presents the new leaf: 01A1669353DC029D45D5137E797256AB -> 01A1669353DC029D45D5137E797256AF
PASS load during rotate-leaf ingress: every stream made requests: 117 requests
PASS load during rotate-leaf ingress: unsuccessful requests after retry: 0 (first attempts failed 0, longest gap without a success 0.1 s)
PASS haproxy: previous pair accepted by replicas before: HTTP 200 TLSv1.3,HTTP 200 TLSv1.3
PASS haproxy: previous pair refused by every replica: no HTTP (closed: closed after handshake),no HTTP (closed: closed after handshake)
PASS haproxy: new pair accepted: HTTP 200 TLSv1.3,HTTP 200 TLSv1.3
PASS load during rotate-leaf haproxy: unsuccessful requests after retry: 0 (first attempts failed 0, longest gap without a success 1.1 s)
PASS rotate-secret s3/api: exit 0
PASS load during rotate-secret s3/api: unsuccessful requests after retry: 0 (…)
PASS rotate-secret postgres/api: exit 0
PASS load during rotate-secret postgres/api: unsuccessful requests after retry: 0 (first attempts failed 0, longest gap without a success 2.1 s)
[ 20.5 s] postgres/api: version 5, services api; window …: at most 15.2 s; total 20.5 s
PASS sealed OpenBao: rotate-secret refused before any change: exit 2
PASS .env and KV versions unchanged by the refused rotation
PASS relay: AMQP login with the stolen pair before: open
PASS relay: OpenBao token of the stolen pair reads before: login 200
[ 20.7 s] relay is revoked; seconds from the start to the new CRL: openbao 2.3 s, rabbitmq 2.6 s, otel-gateway 9.7 s
PASS revoke-identity relay: exit 0
PASS relay: live AMQP connection closed by the revocation
PASS relay: new AMQP login with the revoked pair refused: refused: SSLError SSLV3_ALERT_CERTIFICATE_REVOKED
PASS relay: OpenBao token issued before the revocation: read 403
PASS relay: OpenBao login with the revoked pair refused: 400
PASS upload while relay is revoked: 202 queued: 202
PASS load during revoke-identity relay: unsuccessful requests after retry: 0 (first attempts failed 0, longest gap without a success 3.1 s)
PASS expiry: broker and OpenBao accept the leaf before its end: accepted, accepted
PASS expiry: broker and OpenBao refuse it after: refused (SSLV3_ALERT_CERTIFICATE_EXPIRED), refused (SSLV3_ALERT_CERTIFICATE_EXPIRED)
PASS rotate-leaf relay: exit 0
PASS upload accepted while relay was revoked: ready: ready
PASS relay: stolen pair still refused after the return: refused: SSLError SSLV3_ALERT_CERTIFICATE_REVOKED
PASS load during the whole drill: every stream made requests: 6195 requests
PASS load during the whole drill: unsuccessful requests after retry: 0 (first attempts failed 0, longest gap without a success 3.1 s)
PASS every confirmed message exactly once: 4843 confirmed, 0 lost or doubled
PASS every accepted upload ready with the same SHA-256: 77 uploads, 0 bad
PASS containers run the same images as before (no build)
PASS pki-status: no revoked stand leaf, no previous valid leaf: revoked -, older -
rotation-check: PASS (41/41 checks, 174 s)
# (строки окон, у которых всё как выше, сокращены)
# контроль: отзыв только файлами (pki.sh revoke relay), CRL проверяющим не применяется
$ make rotation-check CONTROL=skip-crl
PASS relay: AMQP login with the stolen pair before: open
PASS relay: OpenBao token of the stolen pair reads before: login 200
== CONTROL skip-crl: pki.sh revoke relay (files only)
FAIL relay: live AMQP connection closed by the revocation
FAIL relay: new AMQP login with the revoked pair refused: open
FAIL relay: OpenBao token issued before the revocation: read 200
FAIL relay: OpenBao login with the revoked pair refused: 200
== CONTROL: applying the revocation to converge the stand
rotation-check: FAIL (37/41 checks, 188 s)
make: *** [rotation-check] Error 1
# первый прогон учений (до правки AMQP-клиента учений: Tune-Ok с channel_max 0 — брокер
# закрывал соединение) — FAIL 39/41 по строкам «AMQP login before» и «connection closed»;
# исправлено в клиенте учений, проверки не менялись.
# --- 9. Прежние проверки стенда после переноса ---
# после всех ротаций выше; make up пересобрал образ (src/client_tls.py) и пересоздал процессы
$ make up
apply: every process started after the current secret versions
$ make test; make test-security
PASS: lab7 public API scenario; infrastructure and grading evidence remain separate.
PASS: trusted HTTPS works; untrusted CA rejected. This does NOT verify internal mTLS, OpenBao or hardening.
$ make student-test
========== 604 passed, 51 deselected, 1 warning in 119.78s (0:01:59) ===========
$ make mtls-check; make storage-tls-check; make storage-roles-check; make broker-mtls-check
mtls-check: PASS (23/23 checks, 15 s)
storage-tls-check: PASS (29/29 checks, 3 s)
storage-roles-check: PASS (68/68 checks, 17 s)
broker-mtls-check: PASS (50/50 checks, 30 s)
$ make telemetry-tls-check; make s3-check; make bao-check; make hardening-check
telemetry-tls-check: PASS (256/256 checks, 17 s)
checks: 83, failed: 0, bootstrap exit 0
bao-check: PASS (101/101 checks, 11 s)
hardening-check: PASS (674/674 checks, 15 s)
$ make rolling-update
05:26:01 rolling-update: done: 2 replicas e59804acf7e1 58bb834709f5 UP in 17s
$ make test-persistence ACTION_SCRIPT=scripts/restart.sh; make failover-each
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
(failover-each — код 0, обе реплики)
$ make scan
result: 0 — all 489 mandatory findings triaged
$ make test-isolated
========== 604 passed, 51 deselected, 1 warning in 123.15s (0:02:03) ===========
[isolated] results: {'test': 0, 'student-test': 0, 'test-failover': 0, 'attachment-failover': 0, 'test-persistence': 0, 'postgres-permissions': 0}
$ make failure-checks FAULT_ARGS=-rP
========== 51 passed, 604 deselected, 1 warning in 579.40s (0:09:39) ===========
[failures] results: {'fault': 0, 'postgres-permissions': 0, 'secrets-log': 0}
$ make unit-test; make lint
================== 453 passed, 1 warning in 60.82s (0:01:00) ===================
All checks passed!
# Бенчи не запускались: путь запроса прежний (новое — 503 вместо 500 при отказе входа
# роли PostgreSQL, на нагрузке bench не встречается).
# --- 10. Повтор учений на пинах последнего шага (перенос 16, 2026-12-02 19:05–19:09 UTC) ---
# Рабочий стенд vladimirceva-lab7 после make up с HAProxy 3.4.8, PostgreSQL 18.7, Python
# 3.13.18 (commits f1b4b82, 2f332b7 — второй меняет только bench/ и документы). Машина
# переноса, Docker 29.9.3 (ВМ 12 CPU / 11,6 ГиБ), Compose 5.7.1; рядом — рабочий стенд
# другого проекта (не учения и не замеры), учений и замеров рядом не было; load average
# за 1 мин перед учениями 3,15 (ожидание циклом до < 4). Роль оператора — агент переноса,
# только командами make. src_sha256 813f5a036bed303920f288ee801be991627a90f9a2955ebd8014b3e8363e6c62.
$ make rotation-check
== rotate-leaf ingress
[ 2.1 s] rotated ingress: serial …56EA -> …5722; the previous leaf is not revoked yet
[ 2.7 s] revoked ingress: serial …56EA
PASS ingress: the LB presents the new leaf: …56EA -> …5722
== rotate-leaf haproxy
[ 19.5 s] api: done: 2 replicas … UP in 14s
PASS haproxy: previous pair refused by every replica: no HTTP (closed: closed after handshake),no HTTP (closed: closed after handshake)
PASS haproxy: new pair accepted: HTTP 200 TLSv1.3,HTTP 200 TLSv1.3
== rotate-secret s3/api
[ 32.8 s] s3/api: version 2, services api; window between the refusal of the previous value and the last replaced process: 0 s (both keys were valid until the processes moved); total 32.8 s
== rotate-secret postgres/api
[ 28.9 s] postgres/api: version 2, services api; window between the refusal of the previous value and the last replaced process: at most 20.9 s; total 28.9 s
PASS sealed OpenBao: rotate-secret refused before any change: exit 2
PASS .env and KV versions unchanged by the refused rotation
== revoke-identity relay
[ 23.8 s] relay is revoked; seconds from the start to the new CRL: openbao 3.8 s, rabbitmq 4.5 s, otel-gateway 12.2 s
PASS relay: live AMQP connection closed by the revocation
PASS relay: new AMQP login with the revoked pair refused: refused: SSLError SSLV3_ALERT_CERTIFICATE_REVOKED
PASS relay: OpenBao token issued before the revocation: read 403
PASS relay: OpenBao login with the revoked pair refused: 400
PASS upload while relay is revoked: 202 queued: 202
PASS expiry: broker and OpenBao accept the leaf before its end: accepted, accepted
PASS expiry: broker and OpenBao refuse it after: refused (SSLV3_ALERT_CERTIFICATE_EXPIRED), refused (SSLV3_ALERT_CERTIFICATE_EXPIRED)
PASS rotate-leaf relay: exit 0
PASS upload accepted while relay was revoked: ready: ready
PASS load during rotate-leaf ingress: unsuccessful requests after retry: 0 (first attempts failed 0, longest gap without a success 0.1 s)
PASS load during rotate-leaf haproxy: unsuccessful requests after retry: 0 (first attempts failed 0, longest gap without a success 0.2 s)
PASS load during rotate-secret s3/api: unsuccessful requests after retry: 0 (first attempts failed 0, longest gap without a success 1.2 s)
PASS load during rotate-secret postgres/api: unsuccessful requests after retry: 0 (first attempts failed 0, longest gap without a success 2.0 s)
PASS load during sealed OpenBao: unsuccessful requests after retry: 0 (first attempts failed 0, longest gap without a success 2.1 s)
PASS load during revoke-identity relay: unsuccessful requests after retry: 0 (first attempts failed 0, longest gap without a success 0.7 s)
PASS load during rotate-leaf relay: unsuccessful requests after retry: 0 (first attempts failed 0, longest gap without a success 2.1 s)
PASS load during the whole drill: unsuccessful requests after retry: 0 (first attempts failed 0, longest gap without a success 2.2 s)
PASS every confirmed message exactly once: 5501 confirmed, 0 lost or doubled
PASS every accepted upload ready with the same SHA-256: 89 uploads, 0 bad
PASS containers run the same images as before (no build)
PASS pki-status: no revoked stand leaf, no previous valid leaf: revoked -, older -
rotation-check: PASS (41/41 checks, 200 s)
# Серийные номера сокращены (…); остальные строки — как в выводе. Итог: на новых пинах
# 41 из 41, неуспешных запросов 0, первых попыток неуспешных 0, наибольшее окно без
# успеха 2,2 с; 5501 подтверждённая запись — ровно раз, 89 вложений ready с тем же
# SHA-256; отзыв relay — CRL у OpenBao 3,8 с, брокера 4,5 с, шлюза OTLP 12,2 с от начала
# команды (прежний прогон — 2,3 / 2,6 / 9,7 с; здесь рядом работал рабочий стенд другого
# проекта — причина разницы не исследовалась). Контроль
# skip-crl не повторялся (код проверки не менялся; раздел 8). Затем:
$ make test-isolated
[isolated] results: {'test': 0, 'student-test': 0, 'test-failover': 0, 'attachment-failover': 0, 'test-persistence': 0, 'postgres-permissions': 0}
$ make failure-checks FAULT_ARGS=-rP
========== 55 passed, 641 deselected, 1 warning in 630.21s (0:10:30) ===========
[failures] results: {'fault': 0, 'postgres-permissions': 0, 'secrets-log': 0}
# На машине замеров — повтор make rotation-check и CONTROL=skip-crl (промпт Codex).