mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
fix: IAM reload should only list at config/iam/ precisely (#14753)
This commit is contained in:
parent
53ca589c11
commit
e69c42956b
@ -407,15 +407,15 @@ func (iamOS *IAMObjectStore) loadMappedPolicies(ctx context.Context, userType IA
|
||||
}
|
||||
|
||||
var (
|
||||
usersListKey = "/users/"
|
||||
svcAccListKey = "/service-accounts/"
|
||||
groupsListKey = "/groups/"
|
||||
policiesListKey = "/policies/"
|
||||
stsListKey = "/sts/"
|
||||
policyDBUsersListKey = "/policydb/users/"
|
||||
policyDBSTSUsersListKey = "/policydb/sts-users/"
|
||||
policyDBServiceAccountsListKey = "/policydb/service-accounts/"
|
||||
policyDBGroupsListKey = "/policydb/groups/"
|
||||
usersListKey = "users/"
|
||||
svcAccListKey = "service-accounts/"
|
||||
groupsListKey = "groups/"
|
||||
policiesListKey = "policies/"
|
||||
stsListKey = "sts/"
|
||||
policyDBUsersListKey = "policydb/users/"
|
||||
policyDBSTSUsersListKey = "policydb/sts-users/"
|
||||
policyDBServiceAccountsListKey = "policydb/service-accounts/"
|
||||
policyDBGroupsListKey = "policydb/groups/"
|
||||
|
||||
allListKeys = []string{
|
||||
usersListKey,
|
||||
@ -433,7 +433,7 @@ var (
|
||||
func (iamOS *IAMObjectStore) listAllIAMConfigItems(ctx context.Context) (map[string][]string, error) {
|
||||
res := make(map[string][]string)
|
||||
|
||||
for item := range listIAMConfigItems(ctx, iamOS.objAPI, iamConfigPrefix) {
|
||||
for item := range listIAMConfigItems(ctx, iamOS.objAPI, iamConfigPrefix+SlashSeparator) {
|
||||
if item.Err != nil {
|
||||
return nil, item.Err
|
||||
}
|
||||
@ -448,7 +448,7 @@ func (iamOS *IAMObjectStore) listAllIAMConfigItems(ctx context.Context) (map[str
|
||||
}
|
||||
}
|
||||
|
||||
if !found && !(item.Item == "config/config.json" || item.Item == "/format.json" || strings.Contains(item.Item, "config/history/")) {
|
||||
if !found && (item.Item != "format.json") {
|
||||
logger.LogIf(ctx, fmt.Errorf("unknown type of IAM file listed: %v", item.Item))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user