« Back to Index

AWS KMS

View original Gist on GitHub

AWS KMS.md

Thanks to Steven Jack for helping me understand this

The individual parts of AWS KMS are:

Note: the “encryptor” is a key used to encrypt our private key

Here is a simple example to demonstrate the workflow:


Further comments from Steven Jack:

Imagine we have a Jenkins CI job that runs every week.
It has IAM perms to call GenerateDataKey for a specific master key.

Each week it generates a new random hash for the DB password,
get’s the temp encryption key,
encrypts it and pushes both the parts needed into a Kubernetes secrets store.

Once that’s done we simply re-deploy the containers, done.

The app has decrypt perms for that master key and on boot
give the param it has from the secrets store and get back
the unencrypted key and decrypt its secret, then uses it.