How does SOPS work?
IntermediateConceptTool Internals and Comparisons
Answer
SOPS encrypts the values in YAML, JSON, ENV or INI files while leaving keys readable, so diffs and reviews still make sense. Each file gets a data key that encrypts the values; the data key is wrapped by one or more master keys: AWS KMS, GCP KMS, Azure Key Vault, age or PGP.
# .sops.yaml
creation_rules:
- path_regex: secrets/prod/.*\.yaml
kms: arn:aws:kms:ap-south-1:111122223333:alias/sops-prod
- path_regex: secrets/dev/.*\.yaml
age: age1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs7k7zq
sops --encrypt --in-place secrets/prod/app.yaml
sops secrets/prod/app.yaml # decrypts into $EDITOR
Flux decrypts SOPS natively; Argo CD needs a plugin. Access control equals KMS key access.
More on Tool Internals and Comparisons
How does Trivy get its vulnerability data, and how do you run it air-gapped?AdvancedWhich scan targets and scanners does Trivy support?IntermediateHow does Falco capture system calls?AdvancedHow does OPA evaluate a Rego policy? Give an example.IntermediateWhat are the ways to deploy OPA, and what are decision logs?AdvancedHow does Vault achieve high availability with integrated storage?Advanced