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 Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
error.go Add crypto context errors (#8740) 2020-01-06 16:15:22 -08:00
header.go make SSE request header check comprehensive (#8276) 2019-09-21 03:26:12 +05:30
header_test.go make SSE request header check comprehensive (#8276) 2019-09-21 03:26:12 +05:30
help.go add minio/keys KMS integration (#8631) 2019-12-13 12:57:11 -08:00
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 Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
kms.go New Admin Info (#8497) 2019-12-11 14:27:03 -08:00
kms_test.go Move etcd, logger, crypto into their own packages (#8366) 2019-10-08 11:17:56 +05:30
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 Move etcd, logger, crypto into their own packages (#8366) 2019-10-08 11:17:56 +05:30
retry.go add kes retries upto two times with jitter backoff (#9527) 2020-05-06 11:44:06 -07:00
sse.go Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
sse_test.go Move etcd, logger, crypto into their own packages (#8366) 2019-10-08 11:17:56 +05:30
vault.go Add crypto context errors (#8740) 2020-01-06 16:15:22 -08:00
vault_test.go Bring in safe mode support (#8478) 2019-11-09 09:27:23 -08:00