Lion Cipher Lab

Encrypt Kubernetes Secrets at rest, part 3: move to a KMS provider (envelope encryption)

Why it matters

Parts 1 and 2 left a cluster whose Secrets are ciphertext in etcd, rotated and audited, with the key in a file on the control-plane node. The Kubernetes encryption docs describe the local providers that way, as key material accessible from the control plane host. So whoever takes the node takes the data and the key that opens it. A KMS provider fixes where the key lives. The key that protects everything, the KEK, stays inside an external key management service, and the API server has to ask that service before it can use the keys that encrypt your data. The cost is a new dependency: the KMS…

What you'll learn

Steps in this lab

  1. What Parts 1 and 2 left unsolved: the key sits beside the data
  2. Rebuild Part 2's end state, and find the health check a KMS will use
  3. Envelope encryption, precisely: DEKs, the seed, and the KEK
  4. Write the switch: kms first, the old provider second, then re-write
  5. Rotating the KEK: key_id, not a restart
  6. Read a real plugin: aws-encryption-provider
  7. The judgment: what the KMS costs, and what it still does not defend

Open the full interactive lab →