minio/internal/kms
Andreas Auernhammer 09626d78ff
automatically generate root credentials with KMS (#19025)
With this commit, MinIO generates root credentials automatically
and deterministically if:

 - No root credentials have been set.
 - A KMS (KES) is configured.
 - API access for the root credentials is disabled (lockdown mode).

Before, MinIO defaults to `minioadmin` for both the access and
secret keys. Now, MinIO generates unique root credentials
automatically on startup using the KMS.

Therefore, it uses the KMS HMAC function to generate pseudo-random
values. These values never change as long as the KMS key remains
the same, and the KMS key must continue to exist since all IAM data
is encrypted with it.

Backward compatibility:

This commit should not cause existing deployments to break. It only
changes the root credentials of deployments that have a KMS configured
(KES, not a static key) but have not set any admin credentials. Such
implementations should be rare or not exist at all.

Even if the worst case would be updating root credentials in mc
or other clients used to administer the cluster. Root credentials
are anyway not intended for regular S3 operations.

Signed-off-by: Andreas Auernhammer <github@aead.dev>
2024-03-01 13:09:42 -08:00
..
config.go automatically generate root credentials with KMS (#19025) 2024-03-01 13:09:42 -08:00
context.go run gofumpt cleanup across code-base (#14015) 2022-01-02 09:15:06 -08:00
dek_test.go rename all remaining packages to internal/ (#12418) 2021-06-01 14:59:40 -07:00
errors.go simplify error responses for KMS (#16793) 2023-03-16 11:59:42 -07:00
identity-manager.go automatically generate root credentials with KMS (#19025) 2024-03-01 13:09:42 -08:00
kes.go automatically generate root credentials with KMS (#19025) 2024-03-01 13:09:42 -08:00
key-manager.go automatically generate root credentials with KMS (#19025) 2024-03-01 13:09:42 -08:00
kms.go automatically generate root credentials with KMS (#19025) 2024-03-01 13:09:42 -08:00
policy-manager.go automatically generate root credentials with KMS (#19025) 2024-03-01 13:09:42 -08:00
single-key.go automatically generate root credentials with KMS (#19025) 2024-03-01 13:09:42 -08:00
single-key_test.go kms: add `context.Context` to KMS API calls (#15327) 2022-07-18 18:54:27 -07:00
status-manager.go automatically generate root credentials with KMS (#19025) 2024-03-01 13:09:42 -08:00