Home/Refreshers/Encryption keys you control and can switch off: refresher
Encryption keys you control and can switch off
Your own keys, rotated on a schedule, with a usage log and an off switch.
Remember
- Data is written: to storage, a database, a disk.
- Encrypted with your key: every use recorded.
- The key rotates on schedule: old data stays readable.
- Disable the key: and the data cannot be read.
| Platform | Uses | The part that catches people |
|---|---|---|
| AWS | A KMS key with yearly rotation, managers and users kept apart, and an alert on the off switch | A key policy that names only a role you later delete leaves a key nobody can manage, and only AWS Support can recover it. |
| Azure | A Key Vault key with a rotation policy, Azure roles for access, and an audit log | Owner on a subscription can create a vault and still cannot create a key inside it. |
| Google Cloud | A Cloud KMS key with 90-day rotation, roles kept apart, and every use logged | Google Cloud switches off key versions, one at a time. |
| Oracle Cloud | A Vault key with hardware protection, an off switch in code, and policies keeping roles apart | Every vault has two addresses. |
Run the quick start
| Download providers | terraform init |
| Preview | terraform plan |
| Apply | terraform apply |
| Print the proof commands | terraform output verify |
Watch out
- Rotation changes the key material used for new encryption.
- Services that use envelope encryption keep a data key in memory for a while, so switching a key off may take effect only when they next ask the key service.
- A completed key deletion is permanent.
Check it worked
Encrypt something, switch the key off, and try to decrypt it. The decrypt must fail.