minio/cmd/crypto
Andreas Auernhammer a6f4cf61f2 add UpdateKey method to KMS interface (#7974)
This commit adds a new method `UpdateKey` to the KMS
interface.

The purpose of `UpdateKey` is to re-wrap an encrypted
data key (the key generated & encrypted with a master key by e.g.
Vault).
For example, consider Vault with a master key ID: `master-key-1`
and an encrypted data key `E(dk)` for a particular object. The
data key `dk` has been generated randomly when the object was created.
Now, the KMS operator may "rotate" the master key `master-key-1`.
However, the KMS cannot forget the "old" value of that master key
since there is still an object that requires `dk`, and therefore,
the `D(E(dk))`.
With the `UpdateKey` method call MinIO can ask the KMS to decrypt
`E(dk)` with the old key (internally) and re-encrypted `dk` with
the new master key value: `E'(dk)`.

However, this operation only works for the same master key ID.
When rotating the data key (replacing it with a new one) then
we perform a `UnsealKey` operation with the 1st master key ID
and then a `GenerateKey` operation with the 2nd master key ID.

This commit also updates the KMS documentation and removes
the `encrypt` policy entry (we don't use `encrypt`) and
add a policy entry for `rewarp`.
2019-08-01 15:47:47 -07:00
..
config.go Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
doc.go Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
error.go add UpdateKey method to KMS interface (#7974) 2019-08-01 15:47:47 -07:00
header_test.go enable SSE-KMS pass-through on S3 gateway (#7788) 2019-06-19 17:37:08 -07:00
header.go enable SSE-KMS pass-through on S3 gateway (#7788) 2019-06-19 17:37:08 -07:00
key_test.go Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
key.go Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
kms_test.go add UpdateKey method to KMS interface (#7974) 2019-08-01 15:47:47 -07:00
kms.go add UpdateKey method to KMS interface (#7974) 2019-08-01 15:47:47 -07:00
metadata_test.go Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
metadata.go Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
sse_test.go Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
sse.go Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
vault_test.go crypto: add unit test for vault config verification (#7413) 2019-04-10 11:05:53 -07:00
vault.go add UpdateKey method to KMS interface (#7974) 2019-08-01 15:47:47 -07:00