From 3d6c8b48552f55cecaa780a0eaf74c5b12c141c0 Mon Sep 17 00:00:00 2001 From: Sirius DevOps Date: Fri, 27 Nov 2026 00:43:17 -0500 Subject: [PATCH] docs(secrets-sops): record flux-system/sops-age as an exclusion and add a tested audit query * sops-age is the one Secret that by definition cannot be in git; it was missing from the exclusion table even though the key-location table covers it. * replaces the placeholder reconciliation snippet with one that was actually run: it prints 77 live = 35 in git + 42 excluded, matching the table line for line, with nothing in git absent from the cluster. --- docs/secrets-sops.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/secrets-sops.md b/docs/secrets-sops.md index 57400c5..acc9125 100644 --- a/docs/secrets-sops.md +++ b/docs/secrets-sops.md @@ -130,6 +130,23 @@ from starting, which is exactly what this card exists to prevent. It is a Forgej | `prometheus-kube-prometheus-stack-prometheus`, `alertmanager-kube-prometheus-stack-alertmanager`, `*-generated`, `*-tls-assets-*`, `*-web-config`, `*-cluster-tls-config` | `monitoring` | Rendered by the prometheus-operator from the CRs on every reconcile — writing them into git creates a second, losing writer. Their *inputs* (`alertmanager-telegram`, `grafana-admin`, `grafana-secret-key`) are ours and are committed separately. | | `kube-prometheus-stack-prometheus-token` | `monitoring` | `kubernetes.io/service-account-token`, minted by the token controller. | | `flux-system` | `flux-system` | Git credential created by `flux bootstrap`; it authenticates the very pull that would apply it (chicken-and-egg), and rotating it is a bootstrap operation. | +| `sops-age` | `flux-system` | **The age private key.** It cannot encrypt itself and must exist before any file here can be decrypted — it is the one Secret that is by definition out of git. See "Where the key lives" above for the two escrow copies. | + +Every other live Secret is either in git as ciphertext or in the table above. Re-prove that with a +clean checkout of `master` (needs the age key in `~/.config/sops/age/keys.txt`): + +```bash +kubectl get secret -A -o json \ + | jq -r '.items[] | "\(.metadata.namespace)/\(.metadata.name)"' | sort > /tmp/live.txt +for f in apps/base/*/secret-*.sops.yaml monitoring/controllers/home/secret-*.sops.yaml; do + sops decrypt --output-type json "$f" | jq -r '"\(.metadata.namespace)/\(.metadata.name)"' +done | sort > /tmp/git.txt +comm -23 /tmp/live.txt /tmp/git.txt # live but not restorable from git: must be the table above +comm -13 /tmp/live.txt /tmp/git.txt # in git but absent live: must be empty +``` + +At the 2026-11-27 audit that printed 77 live = 35 in git + 42 excluded, all 42 accounted for above, +and nothing in git that was missing from the cluster. Now covered (added after the drill in the section below proved the recovery path): `cluster-backup-ssh` (3 namespaces), `grafana-admin`, `grafana-secret-key`, `alertmanager-telegram`. -- 2.52.0