Compare commits

...

5 Commits

Author SHA1 Message Date
ideal-respectable-trumpet 04826f68ce
Merge d1d40f0972 into de234b888c 2025-07-04 14:53:24 +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
ideal-respectable-trumpet d1d40f0972
Fixed typo 2025-04-17 08:45:08 +02:00
jiuker 29d7485667
Merge branch 'master' into define-domain-for-hosts 2025-04-10 10:22:15 +08:00
ideal-respectable-trumpet 8ebf7a958e Add domain in values.yaml 2025-03-19 09:03:53 +01:00
5 changed files with 30 additions and 6 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

@ -103,6 +103,19 @@ Determine secret name.
{{- end -}}
{{- end -}}
{{/*
Determine domain for hosts
*/}}
{{- define "minio.domain" -}}
{{- if .Values.global.domain -}}
{{- printf ".%s" .Values.global.domain -}}
{{- else if .Values.domain -}}
{{- printf ".%s" .Values.domain -}}
{{- else -}}
{{- print "" -}}
{{- end -}}
{{- end -}}
{{/*
Determine name for scc role and rolebinding
*/}}

View File

@ -32,6 +32,7 @@ spec:
{{- end }}
{{- end }}
rules:
{{- $domain := include "minio.domain" . -}}
{{- range .Values.consoleIngress.hosts }}
- http:
paths:
@ -41,7 +42,7 @@ spec:
backend:
service:
name: {{ $fullName }}
port:
port:
number: {{ $servicePort }}
{{- else }}
backend:
@ -49,7 +50,9 @@ spec:
servicePort: {{ $servicePort }}
{{- end }}
{{- if . }}
host: {{ tpl . $ | quote }}
{{- $host := . }}
{{- $hostWithDomain := printf "%s%s" $host $domain }}
host: {{ $hostWithDomain | quote }}
{{- end }}
{{- end }}
{{- end }}

View File

@ -32,6 +32,7 @@ spec:
{{- end }}
{{- end }}
rules:
{{- $domain := include "minio.domain" . -}}
{{- range .Values.ingress.hosts }}
- http:
paths:
@ -41,7 +42,7 @@ spec:
backend:
service:
name: {{ $fullName }}
port:
port:
number: {{ $servicePort }}
{{- else }}
backend:
@ -49,7 +50,9 @@ spec:
servicePort: {{ $servicePort }}
{{- end }}
{{- if . }}
host: {{ tpl . $ | quote }}
{{- $host := . }}
{{- $hostWithDomain := printf "%s%s" $host $domain }}
host: {{ $hostWithDomain | quote }}
{{- end }}
{{- end }}
{{- end }}

View File

@ -625,3 +625,6 @@ etcd:
corednsPathPrefix: ""
clientCert: ""
clientCertKey: ""
## Provide a domain to append at the end of every host specified in the ingress hosts value
##
domain: ''