# Credentials & SOPS — operator provisioning checklist All platform secrets are **SOPS-encrypted (age)**, committed to git, and decrypted by Flux at reconcile (ADR-0007, R-SEC-01). **Agents never handle real secret values** — encryption is done by you (the operator). This file is the end-to-end flow. Templates live in [`secret-templates/`](secret-templates/); the master `.sops.yaml` is at the **repo root**. Credentials are provisioned **upfront** so component rollout is gated only by *phase/readiness*, never by a missing secret. --- ## One-time SOPS setup (do this first) 1. **Generate the age keypair** (private key stays on your machine + goes to the cluster; never in git): ```bash ./bootstrap/sops/age-keygen.sh # prints the PUBLIC recipient (age1…) + writes the private key ``` 2. **Fill the recipient** into the repo-root `.sops.yaml` — replace **both** `REPLACE-ME-AGE-PUBLIC-RECIPIENT` occurrences with the `age1…` public key from step 1. (This file governs encryption for `platform/**`, `apps/**`, `catalog/**`, and any `secrets/**`.) 3. **Install the private key on the cluster** as the `sops-age` Secret so Flux can decrypt: ```bash ./bootstrap/sops/install-age-key.sh # creates secret/sops-age in flux-system (see age-key-secret.md) ``` The dev/prod overlays already point the `platform`/`apps` Flux Kustomizations at `decryption.secretRef: sops-age`. > Keep the age **private** key out of the repo (same discipline as the ansible-vault passphrase at > `~/.config/home-k3s/ansible-vault-pass`). If it leaks, rotate: new key → re-encrypt all `*.sops.yaml` → re-install. --- ## Per-secret flow (repeat for each secret below) ```bash # 1. copy the template into its component dir under its real name cp bootstrap/sops/secret-templates/