mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
Do not save credentials in config.json (#16275)
This commit is contained in:
@@ -17,31 +17,8 @@
|
||||
|
||||
package config
|
||||
|
||||
import "github.com/minio/minio/internal/auth"
|
||||
|
||||
// One time migration code section
|
||||
|
||||
// SetCredentials - One time migration code needed, for migrating from older config to new for server credentials.
|
||||
func SetCredentials(c Config, cred auth.Credentials) {
|
||||
creds, err := auth.CreateCredentials(cred.AccessKey, cred.SecretKey)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
if !creds.IsValid() {
|
||||
return
|
||||
}
|
||||
c[CredentialsSubSys][Default] = KVS{
|
||||
KV{
|
||||
Key: AccessKey,
|
||||
Value: cred.AccessKey,
|
||||
},
|
||||
KV{
|
||||
Key: SecretKey,
|
||||
Value: cred.SecretKey,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// SetRegion - One time migration code needed, for migrating from older config to new for server Region.
|
||||
func SetRegion(c Config, name string) {
|
||||
if name == "" {
|
||||
|
||||
Reference in New Issue
Block a user