Module 07 · DevOps · CI/CD, IaC & Operations · about 17 min to read
Continue where you left off ×
Secrets that stay secret: Vault, SOPS and KMS
Config, Secrets & Storage · Open board
The settings and passwords clipped to a container, and where each one is kept. This lesson is about the passwords: where they live so that one stray copy does not open everything.
Before you start. The Page at 3 a.m. (Incident Response) taught you to stop the harm first and then write action items that change the system, not the person. Config, Secrets & Storage showed that a Kubernetes Secret is only base64 text, which is an encoding and not a lock. The key that has to change (secrets and key management) gave you envelope encryption: a data key locks the data, and a master key inside a key service locks the data key. Infrastructure as Code & GitOps gave you the rule that Git holds the wanted state, except secrets.
The idea in 30 seconds
A secrets store holds secrets, checks who is asking, logs every read, and lets you change a secret in one place.
Envelope encryption locks big data with a data key and the data key with a master key held in a KMS.
SOPS encrypts the values of a file and leaves the names readable, so the file can sit in Git.
A dynamic credential is created on request and deleted when its lease ends, so a leak has a short window.
External Secrets Operator reads a store and makes a Kubernetes Secret, so Git holds only names.
Secret zero is the first proof of identity, and the platform (IAM role or service account) gives it.
Read the story
Lesson 57 of 70 in DevOps
The rest of this lesson is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year .
See plans Already a member? Sign in
Or start free : a free account opens lessons 2 and 3 of every track.
In this lesson December 2017 to September 2022: a key in a public repository Secrets store: one place that holds secrets and checks who asks Envelope encryption and KMS: lock the data with a key that never leaves SOPS: a secret file that is safe to commit Dynamic credentials and leases: a login that dies by itself External Secrets Operator: bring a secret into Kubernetes without copying it Envelope encryption, a SOPS-style file and a lease, in one script Rotation by overlap Trade-offs and edge cases Terms it explains: access key, secret, secrets store, secret zero, data key, key management service (KMS), master key, envelope encryption, SOPS, dynamic credential, lease, External Secrets Operator, ExternalSecret, refresh interval, Common mistakes, ConfigMap.
Review DevOps
Mark as read Saved in this browser, and to your account when you sign in.