do not set KMSSecretKey env from KMSSecretKeyFile (#20122)

fixes #20121
This commit is contained in:
Harshavardhana 2024-07-21 14:39:15 -07:00 committed by GitHub
parent 23db4958f5
commit 3ef59d2821
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -685,16 +685,6 @@ func loadEnvVarsFromFiles() {
}
}
if env.IsSet(kms.EnvKMSSecretKeyFile) {
kmsSecret, err := readFromSecret(env.Get(kms.EnvKMSSecretKeyFile, ""))
if err != nil {
logger.Fatal(err, "Unable to read the KMS secret key inherited from secret file")
}
if kmsSecret != "" {
os.Setenv(kms.EnvKMSSecretKey, kmsSecret)
}
}
if env.IsSet(config.EnvConfigEnvFile) {
ekvs, err := minioEnvironFromFile(env.Get(config.EnvConfigEnvFile, ""))
if err != nil && !os.IsNotExist(err) {