Compare commits

...

3 Commits

Author SHA1 Message Date
Minei3oat a39751e84b
Merge 0bbf1251d1 into de234b888c 2025-07-03 09:09:22 +02:00
Burkov Egor de234b888c
fix: admin api - SetPolicyForUserOrGroup avoid nil deref (#21400)
VulnCheck / Analysis (push) Has been cancelled Details
Lock Threads / action (push) Has been cancelled Details
2025-07-01 09:00:17 -07:00
Minei3oat 0bbf1251d1 Helm: Add option for controlling the serviceAccount's automountServiceAccountToken parameter 2025-06-19 16:58:06 +02:00
3 changed files with 6 additions and 2 deletions

View File

@ -1827,16 +1827,18 @@ func (a adminAPIHandlers) SetPolicyForUserOrGroup(w http.ResponseWriter, r *http
iamLogIf(ctx, err)
} else if foundGroupDN == nil || !underBaseDN {
err = errNoSuchGroup
} else {
entityName = foundGroupDN.NormDN
}
entityName = foundGroupDN.NormDN
} else {
var foundUserDN *xldap.DNSearchResult
if foundUserDN, err = globalIAMSys.LDAPConfig.GetValidatedDNForUsername(entityName); err != nil {
iamLogIf(ctx, err)
} else if foundUserDN == nil {
err = errNoSuchUser
} else {
entityName = foundUserDN.NormDN
}
entityName = foundUserDN.NormDN
}
if err != nil {
writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)

View File

@ -3,4 +3,5 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Values.serviceAccount.name | quote }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
{{- end }}

View File

@ -594,6 +594,7 @@ serviceAccount:
## The name of the service account to use. If 'create' is 'true', a service account with that name
## will be created.
name: "minio-sa"
automountServiceAccountToken: true
metrics:
serviceMonitor: