Compare commits

...

14 Commits

Author SHA1 Message Date
M Alvee ef320146ee
Merge branch 'master' into custom-user-agent 2025-08-08 14:22:04 +06:00
M Alvee d0ff90b470 remove unnecessary params passing 2025-08-08 14:21:45 +06:00
jiuker a8abdc797e
fix: add name and description to ldap accesskey list (#21511) 2025-08-07 19:46:04 -07:00
M Alvee 0638ccc5f3
fix: claim based oidc for official aws libraries (#21468) 2025-08-07 19:42:38 -07:00
jiuker b1a34fd63f
fix: errUploadIDNotFound will be ignored when err is from peer client (#21504) 2025-08-07 19:38:41 -07:00
Klaus Post ffcfa36b13
Check legalHoldPerm (#21508)
The provided parameter should be checked before accepting legal hold
2025-08-07 19:38:25 -07:00
Aditya Kotra 376fbd11a7
fix(helm): do not suspend versioning by default for buckets, only set versioning if specified(21349) (#21494)
Signed-off-by: Aditya Kotra <kaditya030@gmail.com>
2025-08-07 02:47:02 -07:00
dorman c76f209ccc
Optimize outdated commands in the log (#21498) 2025-08-06 16:48:58 -07:00
M Alvee 7a6a2256b1
imagePullSecrets consistent types for global , local (#21500) 2025-08-06 16:48:24 -07:00
M Alvee 385dec9a02 nuke provider & update code 2025-08-04 22:49:38 +06:00
M Alvee d2a6e76192 Update useragent.go 2025-08-04 22:28:45 +06:00
M Alvee 3f5a094a67
Merge branch 'master' into custom-user-agent 2025-08-04 22:20:36 +06:00
M Alvee 508d60a8e8 use atomic pointer for provider 2025-08-04 22:20:17 +06:00
Johannes Horn d002beaee3
feat: add variable for datasource in grafana dashboards (#21470) 2025-08-03 18:46:49 -07:00
21 changed files with 111 additions and 121 deletions

View File

@ -445,8 +445,10 @@ func (a adminAPIHandlers) ListAccessKeysLDAP(w http.ResponseWriter, r *http.Requ
for _, svc := range serviceAccounts {
expiryTime := svc.Expiration
serviceAccountList = append(serviceAccountList, madmin.ServiceAccountInfo{
AccessKey: svc.AccessKey,
Expiration: &expiryTime,
AccessKey: svc.AccessKey,
Expiration: &expiryTime,
Name: svc.Name,
Description: svc.Description,
})
}
for _, sts := range stsKeys {
@ -625,8 +627,10 @@ func (a adminAPIHandlers) ListAccessKeysLDAPBulk(w http.ResponseWriter, r *http.
}
for _, svc := range serviceAccounts {
accessKeys.ServiceAccounts = append(accessKeys.ServiceAccounts, madmin.ServiceAccountInfo{
AccessKey: svc.AccessKey,
Expiration: &svc.Expiration,
AccessKey: svc.AccessKey,
Expiration: &svc.Expiration,
Name: svc.Name,
Description: svc.Description,
})
}
// if only service accounts, skip if user has no service accounts

View File

@ -297,6 +297,9 @@ func checkPutObjectLockAllowed(ctx context.Context, rq *http.Request, bucket, ob
if legalHold, lerr = objectlock.ParseObjectLockLegalHoldHeaders(rq.Header); lerr != nil {
return mode, retainDate, legalHold, toAPIErrorCode(ctx, lerr)
}
if legalHoldPermErr != ErrNone {
return mode, retainDate, legalHold, legalHoldPermErr
}
}
if retentionRequested {

View File

@ -92,7 +92,7 @@ func parseBucketQuota(bucket string, data []byte) (quotaCfg *madmin.BucketQuota,
}
if !quotaCfg.IsValid() {
if quotaCfg.Type == "fifo" {
internalLogIf(GlobalContext, errors.New("Detected older 'fifo' quota config, 'fifo' feature is removed and not supported anymore. Please clear your quota configs using 'mc admin bucket quota alias/bucket --clear' and use 'mc ilm add' for expiration of objects"), logger.WarningKind)
internalLogIf(GlobalContext, errors.New("Detected older 'fifo' quota config, 'fifo' feature is removed and not supported anymore. Please clear your quota configs using 'mc quota clear alias/bucket' and use 'mc ilm add' for expiration of objects"), logger.WarningKind)
return quotaCfg, fmt.Errorf("invalid quota type 'fifo'")
}
return quotaCfg, fmt.Errorf("Invalid quota config %#v", quotaCfg)

View File

@ -355,7 +355,9 @@ func validateSubSysConfig(ctx context.Context, s config.Config, subSys string, o
}
case config.IdentityOpenIDSubSys:
if _, err := openid.LookupConfig(s,
NewHTTPTransport(), xhttp.DrainBody, globalSite.Region()); err != nil {
xhttp.WithUserAgent(NewHTTPTransport(), func() string {
return getUserAgent(getMinioMode())
}), xhttp.DrainBody, globalSite.Region()); err != nil {
return err
}
case config.IdentityLDAPSubSys:

View File

@ -277,7 +277,9 @@ func (sys *IAMSys) Init(ctx context.Context, objAPI ObjectLayer, etcdClient *etc
for {
if !openidInit {
openidConfig, err := openid.LookupConfig(s,
NewHTTPTransport(), xhttp.DrainBody, globalSite.Region())
xhttp.WithUserAgent(NewHTTPTransport(), func() string {
return getUserAgent(getMinioMode())
}), xhttp.DrainBody, globalSite.Region())
if err != nil {
iamLogIf(ctx, fmt.Errorf("Unable to initialize OpenID: %w", err), logger.WarningKind)
} else {

View File

@ -53,7 +53,6 @@ import (
xhttp "github.com/minio/minio/internal/http"
xioutil "github.com/minio/minio/internal/ioutil"
"github.com/minio/minio/internal/logger"
"github.com/minio/minio/internal/useragent"
"github.com/minio/pkg/v3/certs"
"github.com/minio/pkg/v3/env"
"gopkg.in/yaml.v2"
@ -755,10 +754,6 @@ func serverMain(ctx *cli.Context) {
setDefaultProfilerRates()
useragent.Register(func() string {
return getUserAgent(getMinioMode())
})
// Initialize globalConsoleSys system
bootstrapTrace("newConsoleLogger", func() {
output, err := initializeLogRotate(ctx)

View File

@ -88,6 +88,8 @@ func toStorageErr(err error) error {
}
switch err.Error() {
case errUploadIDNotFound.Error():
return errUploadIDNotFound
case errFaultyDisk.Error():
return errFaultyDisk
case errFaultyRemoteDisk.Error():

View File

@ -414,9 +414,13 @@ func (sts *stsAPIHandlers) AssumeRoleWithSSO(w http.ResponseWriter, r *http.Requ
//
// Currently, we do not support multiple claim based IDPs, as there is no
// defined parameter to disambiguate the intended IDP in this STS request.
//
// Skip RoleArn existence check when policy mapping is based on a JWT claim.
// This is required to support clients (like the AWS CLI or SDKs) that enforce providing a RoleArn,
// even though it's not used in claim-based identity mode.
roleArn := openid.DummyRoleARN
roleArnStr := r.Form.Get(stsRoleArn)
if roleArnStr != "" {
if roleArnStr != "" && strings.TrimSpace(iamPolicyClaimNameOpenID()) == "" {
var err error
roleArn, _, err = globalIAMSys.GetRolePolicy(roleArnStr)
if err != nil {
@ -451,7 +455,7 @@ func (sts *stsAPIHandlers) AssumeRoleWithSSO(w http.ResponseWriter, r *http.Requ
}
var policyName string
if roleArnStr != "" && globalIAMSys.HasRolePolicy() {
if roleArnStr != "" && globalIAMSys.HasRolePolicy() && strings.TrimSpace(iamPolicyClaimNameOpenID()) == "" {
// If roleArn is used, we set it as a claim, and use the
// associated policy when credentials are used.
claims[roleArnClaim] = roleArn.String()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 426 KiB

After

Width:  |  Height:  |  Size: 355 KiB

View File

@ -15,16 +15,6 @@
}
]
},
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"description": "MinIO Grafana Dashboard - https://min.io/",
"editable": true,
"fiscalYearStartMonth": 0,
@ -4151,28 +4141,39 @@
"list": [
{
"current": {
"selected": true,
"text": "minio-job-bucket",
"value": "minio-job-bucket"
"selected": false,
"text": "All",
"value": "$__all"
},
"label": "Data source",
"name": "DS_PROMETHEUS",
"options": [],
"query": "prometheus",
"refresh": 1,
"regex": "",
"type": "datasource"
},
{
"current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"definition": "label_values(job)",
"hide": 0,
"includeAll": false,
"multi": false,
"name": "scrape_jobs",
"options": [],
"query": {
"qryType": 1,
"query": "label_values(job)",
"refId": "StandardVariableQuery"
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
}
]
@ -4210,4 +4211,4 @@
"uid": "TgmJnqnnk2",
"version": 1,
"weekStart": ""
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 KiB

After

Width:  |  Height:  |  Size: 591 KiB

View File

@ -21,16 +21,6 @@
}
]
},
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"description": "MinIO Grafana Dashboard - https://min.io/",
"editable": true,
"fiscalYearStartMonth": 0,
@ -3800,6 +3790,20 @@
],
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"label": "Data source",
"name": "DS_PROMETHEUS",
"options": [],
"query": "prometheus",
"refresh": 1,
"regex": "",
"type": "datasource"
},
{
"current": {
"selected": false,
@ -3861,4 +3865,4 @@
"uid": "TgmJnqnnk",
"version": 1,
"weekStart": ""
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 136 KiB

View File

@ -15,16 +15,6 @@
}
]
},
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"description": "MinIO Nodes Grafana Dashboard - https://min.io/",
"editable": true,
"fiscalYearStartMonth": 0,
@ -869,7 +859,20 @@
"list": [
{
"current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"label": "Data source",
"name": "DS_PROMETHEUS",
"options": [],
"query": "prometheus",
"refresh": 1,
"regex": "",
"type": "datasource"
},
{
"current": {},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
@ -891,8 +894,7 @@
"type": "query"
},
{
"current": {
},
"current": {},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
@ -950,4 +952,4 @@
"uid": "TgmJnnqn2k",
"version": 1,
"weekStart": ""
}
}

View File

@ -15,16 +15,6 @@
}
]
},
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"description": "MinIO Grafana Dashboard - https://min.io/",
"editable": true,
"fiscalYearStartMonth": 0,
@ -2890,7 +2880,20 @@
"list": [
{
"current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"label": "Data source",
"name": "DS_PROMETHEUS",
"options": [],
"query": "prometheus",
"refresh": 1,
"regex": "",
"type": "datasource"
},
{
"current": {},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
@ -2946,4 +2949,4 @@
"uid": "TgmJnnqnk3",
"version": 1,
"weekStart": ""
}
}

View File

@ -15,16 +15,6 @@
}
]
},
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"description": "MinIO Grafana Dashboard - https://min.io/",
"editable": true,
"fiscalYearStartMonth": 0,
@ -2335,7 +2325,20 @@
"list": [
{
"current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"label": "Data source",
"name": "DS_PROMETHEUS",
"options": [],
"query": "prometheus",
"refresh": 1,
"regex": "",
"type": "datasource"
},
{
"current": {},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
@ -2391,4 +2394,4 @@
"uid": "gmTJnqnnk3",
"version": 1,
"weekStart": ""
}
}

View File

@ -94,6 +94,8 @@ createBucket() {
echo "Suspending versioning for '$BUCKET'"
${MC} version suspend myminio/$BUCKET
fi
else
echo "No versioning action for '$BUCKET'"
fi
else
echo "Bucket '$BUCKET' versioning unchanged."
@ -117,6 +119,5 @@ connectToMinio $scheme
{{ $global := . }}
# Create the buckets
{{- range .Values.buckets }}
createBucket {{ tpl .name $global }} {{ .policy | default "none" | quote }} {{ .purge | default false }} {{ .versioning | default false }} {{ .objectlocking | default false }}
{{- end }}
createBucket {{ tpl .name $global }} {{ .policy | default "none" | quote }} {{ .purge | default false }} {{ .versioning | default "" }} {{ .objectlocking | default false }}{{- end }}
{{- end }}

View File

@ -131,9 +131,7 @@ Also, we can not use a single if because lazy evaluation is not an option
{{- if .Values.global }}
{{- if .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- range .Values.global.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{ toYaml .Values.global.imagePullSecrets }}
{{- else if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets }}

View File

@ -30,7 +30,6 @@ import (
jwtgo "github.com/golang-jwt/jwt/v4"
"github.com/minio/minio/internal/arn"
"github.com/minio/minio/internal/auth"
xhttp "github.com/minio/minio/internal/http"
xnet "github.com/minio/pkg/v3/net"
"github.com/minio/pkg/v3/policy"
)
@ -269,7 +268,7 @@ func parseDiscoveryDoc(u *xnet.URL, transport http.RoundTripper, closeRespFn fun
return d, err
}
clnt := http.Client{
Transport: xhttp.WithUserAgent(transport),
Transport: transport,
}
resp, err := clnt.Do(req)
if err != nil {

View File

@ -25,7 +25,6 @@ import (
"syscall"
"time"
"github.com/minio/minio/internal/useragent"
"github.com/minio/pkg/v3/certs"
)
@ -198,9 +197,9 @@ func (u *uaTransport) RoundTrip(req *http.Request) (*http.Response, error) {
}
// WithUserAgent wraps an existing transport with custom User-Agent
func WithUserAgent(rt http.RoundTripper) http.RoundTripper {
func WithUserAgent(rt http.RoundTripper, getUA func() string) http.RoundTripper {
return &uaTransport{
ua: useragent.Get(),
ua: getUA(),
rt: rt,
}
}

View File

@ -1,32 +0,0 @@
// Copyright (c) 2015-2025 MinIO, Inc.
//
// This file is part of MinIO Object Storage stack
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package useragent
var provider = func() string {
return "Go-http-client/1.1"
}
// Register sets a custom function to provide the User-Agent string.
func Register(f func() string) {
provider = f
}
// Get returns the current User-Agent string.
func Get() string {
return provider()
}