Security, Secrets and Supply Chain
How to put secrets in Git without putting secrets in Git — SOPS, Sealed Secrets, External Secrets — plus signed-commit and cosign artifact verification, controller RBAC, and workload identity.
Overview
The week-two wall
Every GitOps adoption hits the same wall in week two. The repository is the source of truth for cluster state, and then someone needs a database password. Git is the worst possible place for one: history is immutable, every developer has a full clone, mirrors and backups multiply the copies, and there is no revocation primitive.
Security in Flux has three parts, and this chapter takes them in order.
- Confidentiality: secrets reach the cluster without plaintext ever sitting in Git.
- Integrity: Flux verifies a source before it applies anything from it.
- Controller posture: the controllers themselves run with as little power as possible, through impersonation, Pod Security Standards (PSS), NetworkPolicy and workload identity.
Key concepts
- SOPS
- .sops.yaml creation rules
- spec.decryption
- age
- Sealed Secrets
- External Secrets Operator
- spec.verify on GitRepository
- Keyless cosign verification
Interview questions
- Walk through setting up SOPS with age for a Flux repository, end to end.
- Compare SOPS, Sealed Secrets, and External Secrets Operator. Which do you pick and why?
- How do you make Flux refuse to deploy anything that is not signed?
- Flux installs with cluster-admin. How do you reduce that, and what remains irreducible?
- How do you give Flux access to a private registry and a cloud KMS without storing any credentials?
- A secret was committed unencrypted to the Flux repository three weeks ago. Walk me through the response.
Sign up free to read the full topic
More DevOps topics
- Runtime Security
- Sanitizers and Memory Debugging
- SAST, DAST, SCA & IAST
- Secrets Management in GitOps
- Securing Repositories and CI/CD — GitHub, GitHub Enterprise Server, GitLab and Azure DevOps
- Security and Supply Chain
- Self-Hosted CI Runners at Scale
- Serverless Patterns
- Service Mesh
- Service Networking Errors — DNS, Timeouts, Port Mismatch and Mesh Sidecars
- Shift-Left Security
- Sigstore & Software Supply Chain Security
Start free on Cariara · Coding problems · System design studio