feat(crowdsec): automated bouncer-key rotation (openbao-ns) #303

Merged
gitea_admin merged 3 commits from feat/crowdsec-bouncer-key-rotation into master 2026-07-18 21:27:05 +00:00
Member

Fan-out #3. Rotates crowdsec-bouncer-key:key — self-sync 2-sided (one KV path → both crowdsec + ingress ns Secrets; Reloader restarts crowdsec-lapi). Per-secret rotator-crowdsec-bouncer role/policy, no netpol; both ExternalSecrets refreshInterval 1h→10m.

⚠️ Landmine handled: traefik/crowdsec-middleware.yaml carries a third, hardcoded copy of this key (not Secret-sourced). That middleware is currently inert (unattached), so nothing breaks today — but a loud guard comment now warns it must be refreshed from OpenBao (bao kv get homelab/infrastructure/crowdsec-bouncer-key) before it's ever re-enabled, or the bouncer 401s with a stale key. Needs the one-time OpenBao bootstrap. kustomize clean.

Fan-out #3. Rotates `crowdsec-bouncer-key:key` — self-sync 2-sided (one KV path → both crowdsec + ingress ns Secrets; Reloader restarts `crowdsec-lapi`). Per-secret `rotator-crowdsec-bouncer` role/policy, no netpol; both ExternalSecrets refreshInterval 1h→10m. ⚠️ **Landmine handled**: `traefik/crowdsec-middleware.yaml` carries a **third, hardcoded** copy of this key (not Secret-sourced). That middleware is currently **inert** (unattached), so nothing breaks today — but a loud guard comment now warns it must be refreshed from OpenBao (`bao kv get homelab/infrastructure/crowdsec-bouncer-key`) before it's ever re-enabled, or the bouncer 401s with a stale key. Needs the one-time OpenBao bootstrap. kustomize clean.
claude-bot added 1 commit 2026-07-18 20:09:18 +00:00
Rotates crowdsec-bouncer-key:key quarterly + on-demand via the openbao-ns pattern (per-secret rotator-crowdsec-bouncer role/policy, no netpol). Self-sync: the single KV path feeds both the crowdsec + ingress ns Secrets; Reloader restarts crowdsec-lapi. Both ExternalSecrets refreshInterval 1h->10m.
CAVEAT handled: traefik/crowdsec-middleware.yaml has a THIRD hardcoded copy of this key (not Secret-sourced) — that middleware is inert, and a loud guard comment now warns it must be refreshed from OpenBao before re-enabling. Requires the one-time OpenBao bootstrap.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015K7gLUVVnutvDnzV2TrMRJ
claude-bot added 1 commit 2026-07-18 21:24:45 +00:00
# Conflicts:
#	kubernetes/infrastructure/openbao/rotation/kustomization.yaml
claude-bot added 1 commit 2026-07-18 21:26:44 +00:00
# Conflicts:
#	kubernetes/infrastructure/openbao/rotation/kustomization.yaml
gitea_admin merged commit b173f64976 into master 2026-07-18 21:27:05 +00:00
Sign in to join this conversation.