| @@ -12,7 +12,7 @@ MinIO supports two different KMS concepts: · 11 unmodified lines |
| 12 | 12 | by enabling or disabling the corresponding master keys on demand. |
| 13 | 13 | |
| 14 | 14 | - Direct KMS master keys: |
| 15 | | − MinIO can also be configured to directly use a master key specified by the environment variable `MINIO_SSE_MASTER_KEY`. |
| 15 | + MinIO can also be configured to directly use a master key specified by the environment variable `MINIO_SSE_MASTER_KEY` or with a docker secret key. |
| 16 | 16 | Direct master keys are useful if the storage backend is not on the same machine as the MinIO server, e.g., |
| 17 | 17 | if network drives or MinIO gateway is used and an external KMS would cause too much management overhead. |
| 18 | 18 | |
| @@ -215,6 +215,8 @@ minio gateway s3 · 196 unmodified lines |
| 215 | 215 | |
| 216 | 216 | #### 2.2 Specify a master key |
| 217 | 217 | |
| 218 | +**2.2.1 KMS master key from environment variables** |
| 219 | + |
| 218 | 220 | A KMS master key consists of a master-key ID (CMK) and the 256 bit master key encoded as HEX value separated by a `:`. |
| 219 | 221 | A KMS master key can be specified directly using: |
| 220 | 222 | |
| @@ -228,6 +230,23 @@ Please use your own master key. A random master key can be generated using e.g. · 7 unmodified lines |
| 228 | 230 | head -c 32 /dev/urandom | xxd -c 32 -ps |
| 229 | 231 | ``` |
| 230 | 232 | |
| 233 | +**2.2.2 KMS master key from docker secret** |
| 234 | + |
| 235 | +Alternatively, you may pass a master key as a [Docker secret](https://docs.docker.com/engine/swarm/secrets/). |
| 236 | + |
| 237 | +```bash |
| 238 | +echo "my-minio-key:6368616e676520746869732070617373776f726420746f206120736563726574" | docker secret create sse_master_key |
| 239 | +``` |
| 240 | + |
| 241 | +Obviously, do not use this demo key for anything real! |
| 242 | + |
| 243 | +To use another secret name, follow the instructions above and replace sse_master_key with your custom names (e.g. my_sse_master_key). |
| 244 | +Then, set the MINIO_SSE_MASTER_KEY_FILE environment variable to your secret name: |
| 245 | + |
| 246 | +```bash |
| 247 | +export MINIO_SSE_MASTER_KEY_FILE=my_sse_master_key |
| 248 | +``` |
| 249 | + |
| 231 | 250 | ### 3. Test your setup |
| 232 | 251 | To test this setup, start minio server with environment variables set in Step 3, and server is ready to handle SSE-S3 requests. |
| 233 | 252 | |