infractl 0.10.0: rotation commands and infractl incident HOST (M8) #4

Merged
oliver.maklott merged 3 commits from incident into main 2026-11-30 01:07:48 +01:00

M8 parts 2-3 of the infractl plan (site ADR 0009): what a compromise needs, as commands and as one guided flow.

Rotation commands

  • wg rekey, and wg isolate refuses hubs and admin clients
  • ssh --forget NAME
  • bao rekey (new unseal shares, PGP-encrypted, resumable), bao rotate (barrier key), bao revoke-prefix auth/...; BAO_TOKEN stands in for the root token
  • backup rekey / backup new-repository, --secret-version for restic and restore

infractl incident HOST

  • Built from the intent for each kind of host: the anchor, the IdP, monitoring, backup, hypervisors, laptops, phones.
  • Steps: scope, isolate (checked), third-party credentials, re-create with rotated secrets, restore from before it began, rejoin, rotate what it held, verify, old credentials.
  • After the IdP's restore it rotates the signing key and the LDAP outpost token. After the anchor it rotates the SSH user CA.
  • incident report HOST shows the record with times and what remains; --docs prints the steps.

Tests: 200 passed locally (rotation against a real raft OpenBao with two operators; the flow against a simulated world).

🤖 Generated with Claude Code

https://claude.ai/code/session_01PVUe4g65L7UnUVqHmQp7kG

M8 parts 2-3 of the infractl plan (site ADR 0009): what a compromise needs, as commands and as one guided flow. **Rotation commands** - `wg rekey`, and `wg isolate` refuses hubs and admin clients - `ssh --forget NAME` - `bao rekey` (new unseal shares, PGP-encrypted, resumable), `bao rotate` (barrier key), `bao revoke-prefix auth/...`; `BAO_TOKEN` stands in for the root token - `backup rekey` / `backup new-repository`, `--secret-version` for restic and restore **`infractl incident HOST`** - Built from the intent for each kind of host: the anchor, the IdP, monitoring, backup, hypervisors, laptops, phones. - Steps: scope, isolate (checked), third-party credentials, re-create with rotated secrets, restore from before it began, rejoin, rotate what it held, verify, old credentials. - After the IdP's restore it rotates the signing key and the LDAP outpost token. After the anchor it rotates the SSH user CA. - `incident report HOST` shows the record with times and what remains; `--docs` prints the steps. Tests: 200 passed locally (rotation against a real raft OpenBao with two operators; the flow against a simulated world). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01PVUe4g65L7UnUVqHmQp7kG
* wg rekey NAME - a new key pair for an admin client of this machine.
* ssh --forget HOST - drop a re-created host's recorded keys; prints the
  ssh-keygen -R for ~/.ssh/known_hosts.
* bao rekey (sys/rotate/root, new PGP-encrypted shares, operators take
  turns), bao rotate (barrier key), bao revoke-prefix (auth/ only) - with
  the root token from init.json or BAO_TOKEN.
* backup rekey (new restic password: add, store with CAS, remove old)
  and backup new-repository (leaked master key: <source>-<date>, recorded
  as backup/restic/<source>.repository); --secret-version for restic and
  restore reads the old repository.

Tested against a real raft OpenBao (two operators re-keying, the new
shares unseal, a token under the prefix stops working) and a local
restic repository.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVUe4g65L7UnUVqHmQp7kG
* incident HOST builds the flow for that host from the intent (kind and
  networks): scope, isolate, third-party credentials, re-create with
  rotated secrets, restore from before it began, rejoin, rotate what it
  held, verify, delete the old credentials. Resumable, each step recorded
  with its time; incident report HOST; --docs prints it.
* wg isolate NAME forgets a compromised host's key until it is
  re-created (no schema change: an unkeyed member is simply not peered).

Tested against a simulated world for each kind of host: the order of the
commands, the isolation check, the anchor's tunnels before OpenBao.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVUe4g65L7UnUVqHmQp7kG
incident: the IdP's signing key and outpost token after the restore, the anchor's SSH user CA
All checks were successful
ci / test (pull_request) Successful in 2m13s
ci / test (push) Successful in 2m20s
release / release (push) Successful in 2m19s
c09dd1e57a
The restore brings back the database with the old signing key and LDAP
outpost token; they are rotated after it (site idp_rotate=signing_key,
ldap_token). The anchor's rotation adds a new SSH user CA
(openbao_ssh_rotate_ca) and says how its public key reaches the hosts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVUe4g65L7UnUVqHmQp7kG
oliver.maklott deleted branch incident 2026-11-30 01:07:48 +01:00
Sign in to join this conversation.
No reviewers
No labels
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/infractl!4
No description provided.