Incident response (ADR 0009): rotation switches, runbook, tests #10

Merged
oliver.maklott merged 2 commits from incident-design into main 2026-11-30 01:46:22 +01:00

M8 of the infractl plan: ADR 0009, incident response. A compromised host is isolated, what it could reach is rotated, the host is re-created and restored from before the compromise began, then checked.

Rotation switches

  • idp_rotate: the OpenBao client secret, the database password, the OIDC signing key, the LDAP outpost token
  • monitoring_rotate: Grafana's admin password, its OIDC client secret
  • anchor_snapshot_secret=rotate: a new snapshot secret ID; all other secret IDs are destroyed
  • openbao_ssh_rotate_ca: a new SSH user CA
  • restic repositories are named in OpenBao, so infractl backup new-repository can switch a source to a fresh one

Shared tasks

  • tasks/bao_generate.yml: rotates named secrets, with check-and-set
  • tasks/approle_prune.yml: destroys all secret IDs but one

Docs

  • docs/runbooks/incident.md: the order of work behind infractl incident HOST
  • ADR 0009: accepted, built

Scenarios

  • openbao-tasks (new, no VMs): generate, rotate and prune against OpenBao
  • identity and monitoring rotate through the real playbooks. They check the hosts take the new values and refuse the old ones: the database password, the client secret in Authentik, Grafana's admin password.

Pins

  • networking 0.6.0, identity 0.6.0 (Postgres pg_hba.conf, client secrets take effect), monitoring 0.3.0, openbao 0.8.0
  • infractl v0.10.0

The identity and openbao-tasks scenarios passed locally.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PVUe4g65L7UnUVqHmQp7kG

M8 of the infractl plan: [ADR 0009](docs/adr/0009-incident-response.md), incident response. A compromised host is isolated, what it could reach is rotated, the host is re-created and restored from before the compromise began, then checked. **Rotation switches** - `idp_rotate`: the OpenBao client secret, the database password, the OIDC signing key, the LDAP outpost token - `monitoring_rotate`: Grafana's admin password, its OIDC client secret - `anchor_snapshot_secret=rotate`: a new snapshot secret ID; all other secret IDs are destroyed - `openbao_ssh_rotate_ca`: a new SSH user CA - restic repositories are named in OpenBao, so `infractl backup new-repository` can switch a source to a fresh one **Shared tasks** - `tasks/bao_generate.yml`: rotates named secrets, with check-and-set - `tasks/approle_prune.yml`: destroys all secret IDs but one **Docs** - `docs/runbooks/incident.md`: the order of work behind `infractl incident HOST` - ADR 0009: accepted, built **Scenarios** - `openbao-tasks` (new, no VMs): generate, rotate and prune against OpenBao - `identity` and `monitoring` rotate through the real playbooks. They check the hosts take the new values and refuse the old ones: the database password, the client secret in Authentik, Grafana's admin password. **Pins** - networking 0.6.0, identity 0.6.0 (Postgres `pg_hba.conf`, client secrets take effect), monitoring 0.3.0, openbao 0.8.0 - infractl v0.10.0 The identity and openbao-tasks scenarios passed locally. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01PVUe4g65L7UnUVqHmQp7kG
Milestone 8, part 1 (design). What each kind of host exposes when it is
compromised, the order of work (isolate, rotate, re-create - never
re-provision -, restore from before the compromise, verify), and the
rotation switches still to build; Authentik's secret_key stays the one
secret without rotation.

* docs/runbooks/incident.md: that order with today's commands, marking
  what is not built yet.
* data-model: the secrets table was out of date (secrets/hcloud, not
  hetzner/hcloud; anchor/acme, monitoring/*, backup/* were missing).
* security: the guests' wrapped first-boot token is planned, not built;
  a pointer to the incident runbook.
* idp-break-glass: `bao token revoke -mode=path` (there is no
  -mode=prefix).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVUe4g65L7UnUVqHmQp7kG
Incident response (ADR 0009): rotation switches, runbook, tests
All checks were successful
ci / test (pull_request) Successful in 8s
ci / lint (pull_request) Successful in 29s
ci / molecule (pull_request) Successful in 33m55s
ci / test (push) Successful in 8s
ci / lint (push) Successful in 29s
ci / molecule (push) Successful in 36m2s
1c383f645c
* Rotation on request: idp_rotate (OpenBao client secret, database
  password, OIDC signing key, LDAP outpost token), monitoring_rotate,
  anchor_snapshot_secret=rotate (all other AppRole secret IDs destroyed),
  openbao_ssh_rotate_ca (a new SSH user CA), restic repositories named in
  OpenBao (backup new-repository).
* tasks/bao_generate.yml: rotate named secrets with check-and-set;
  tasks/approle_prune.yml.
* docs/runbooks/incident.md: the order of work behind infractl incident
  HOST; ADR 0009 accepted and built.
* Scenarios: openbao-tasks (generate, rotate, prune against OpenBao);
  identity and monitoring rotate through the playbooks and check the
  hosts take the new values and refuse the old ones.
* Pins: networking 0.6.0, identity 0.6.0, monitoring 0.3.0, openbao
  0.8.0, infractl v0.10.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVUe4g65L7UnUVqHmQp7kG
oliver.maklott deleted branch incident-design 2026-11-30 01:46:22 +01:00
Sign in to join this conversation.
No reviewers
No labels
test:kvm
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
belowtoxic-ansible/infrastructure!10
No description provided.