From 4101d4917c75288583cdbae241a5730b950d7c1e Mon Sep 17 00:00:00 2001 From: Aditya Manthramurthy Date: Thu, 1 Aug 2019 12:31:04 -0700 Subject: [PATCH] Fix IAM users migration regression (#8008) --- cmd/iam.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/iam.go b/cmd/iam.go index 0e68a7716..84d78b8b1 100644 --- a/cmd/iam.go +++ b/cmd/iam.go @@ -264,6 +264,8 @@ func loadUser(objectAPI ObjectLayer, user string, isSTS bool, return nil } + // In some cases access key may not be set, so we set it explicitly. + u.Credentials.AccessKey = user m[user] = u.Credentials return nil } @@ -573,6 +575,7 @@ func migrateUsersConfigToV1(objAPI ObjectLayer, isSTS bool) error { // Found a id file in old format. Copy value // into new format and save it. + cred.AccessKey = user u := newUserIdentity(cred) if err := saveIAMConfigItem(objAPI, u, identityPath); err != nil { logger.LogIf(context.Background(), err) @@ -799,6 +802,7 @@ func (sys *IAMSys) Init(objAPI ObjectLayer) error { } break } + return nil }