minio/cmd/crypto
Andreas Auernhammer b1845c6c83
kes: try to auto. create master key if not present (#9790)
This commit changes the data key generation such that
if a MinIO server/nodes tries to generate a new DEK
but the particular master key does not exist - then
MinIO asks KES to create a new master key and then
requests the DEK again.

From now on, a SSE-S3 master key must not be created
explicitly via: `kes key create <key-name>`.
Instead, it is sufficient to just set the env. var.
```
export MINIO_KMS_KES_KEY_NAME=<key-name>
```

However, the MinIO identity (mTLS client certificate)
must have the permission to access the `/v1/key/create/`
API. Therefore, KES policy for MinIO must look similar to:
```
[
  /v1/key/create/<key-name-pattern>
  /v1/key/generate/<key-name-pattern>
  /v1/key/decrypt/<key-name-pattern>
]
```
However, in our guides we already suggest that.
See e.g.: https://github.com/minio/kes/wiki/MinIO-Object-Storage#kes-server-setup

***

The ability to create master keys on request may also be
necessary / useful in case of SSE-KMS.
2020-06-11 02:00:47 -07:00
..
config.go Add crypto context errors (#8740) 2020-01-06 16:15:22 -08:00
doc.go
error.go Add crypto context errors (#8740) 2020-01-06 16:15:22 -08:00
header.go
header_test.go
help.go
kes.go kes: try to auto. create master key if not present (#9790) 2020-06-11 02:00:47 -07:00
key.go Add crypto context errors (#8740) 2020-01-06 16:15:22 -08:00
key_test.go
kms.go
kms_test.go
legacy.go Add crypto context errors (#8740) 2020-01-06 16:15:22 -08:00
metadata.go filter all encryption headers in gateway (#9661) 2020-05-21 11:07:50 -07:00
metadata_test.go Add custom policy claim name (#8764) 2020-01-08 17:21:58 -08:00
parse.go Add crypto context errors (#8740) 2020-01-06 16:15:22 -08:00
parse_test.go
retry.go add kes retries upto two times with jitter backoff (#9527) 2020-05-06 11:44:06 -07:00
sse.go
sse_test.go
vault.go Add crypto context errors (#8740) 2020-01-06 16:15:22 -08:00
vault_test.go