fix: address rotation-revocation control verify findings

Keep the hold mark of an identity whose revocation has started whatever
signal ends pki.sh, refuse every rotation command while the files of a
held identity are missing, bound the handshake of the LB metrics port,
name sessions of another password until verify ends, and run Makefile
prerequisites in order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-01 15:19:42 +03:00
co-authored by Claude Opus 5.5
parent d4a882ddd6
commit 10973231a0
24 changed files with 671 additions and 124 deletions
+7 -4
View File
@@ -1081,13 +1081,16 @@ make pki_status # сроки и identity с действ
rolling_update`. Тот же код, собранный другим проектом compose, проходит (сравнение ~11 с).
- Компрометация процесса — `make revoke_identity` → `make rotate_secret` путей, которые назвал вывод → `make
rotate_leaf`: процесс с отозванной identity команды не перезапускают, `pki_stand` и `run_docker` leaf ему не выдают.
- Сбой команды: leaf, отзыв, продление — повтор; секрет — повтор или `make run_docker` (перезапускает отставших от KV,
`rotation.py outdated`); «an interrupted rotation» у другого пути — команда, которую назвал отказ (`postgres/*` —
- Сбой команды: leaf, отзыв, продление — повтор; секрет `s3/*` и `valkey/api` — повтор или `make run_docker`
(перезапускает отставших от KV, `rotation.py outdated`), `postgres/*` — только повтор: сессий `run_docker` не закрывает,
а до конца `verify` они могут быть открыты; «an interrupted rotation» у другого пути — команда, которую назвал отказ (`postgres/*` —
`rotate_secret` этого пути: сессии прежнего пароля закрывает только он). После SIGKILL — повтор той же команды: прежний
ключ `s3/*` мог остаться действующим, а сессии прежнего пароля `postgres/*` — открытыми, и ничто об этом не говорит.
- API отвечает 503, реплики `Restarting`, а `run_docker` — 0: отозвана `api-client` — `make rotate_leaf
IDENTITY=api-client`. `held <имя>: compose cannot start without its files` — `.pki/stand` создан заново:
`infra/pki/pki.sh rotate <имя>`, `make run_docker`, `make pki_renew`.
IDENTITY=api-client`. `held <имя>: compose cannot start without its files` (команды — «no files of the revoked …»)
— `.pki/stand` создан заново: шаги из вывода по порядку (`infra/pki/pki.sh rotate <имя>` …, `make stop`, `make
bao_unseal`, `make run_docker`, `make pki_renew`). LB 503 после `pki_revoke IDENTITY=api`, а `run_docker` — 0: `docker
compose restart api`.
- Правка `infra/haproxy/haproxy.cfg` или `infra/s3/security.toml` на работающем стенде — `docker compose restart
haproxy` / `s3`: bind mount файла держит прежний.
- Правка `infra/rabbitmq/start.sh` на работающем стенде рвёт bind mount: `rotation.py` отвечает кодом 2 «the