Skip to content

Commit 94a3980

Browse files
authored
fix: correct wiring of disable s3express auth toggle (#2394)
1 parent 4aeeb0d commit 94a3980

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"id": "03de8b0c-1add-4877-bcfd-5472db61ee82",
3+
"type": "bugfix",
4+
"description": "Correct resolution of S3Express auth disable toggle.",
5+
"modules": [
6+
"config"
7+
]
8+
}

config/load_options.go

+10-10
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ type LoadOptions struct {
207207
// The sdk app ID retrieved from env var or shared config to be added to request user agent header
208208
AppID string
209209

210-
// Whether S3 S3Beta2022a auth is disabled.
211-
S3DisableS3Beta2022aAuth *bool
210+
// Whether S3 Express auth is disabled.
211+
S3DisableExpressAuth *bool
212212
}
213213

214214
func (o LoadOptions) getDefaultsMode(ctx context.Context) (aws.DefaultsMode, bool, error) {
@@ -1048,21 +1048,21 @@ func WithDefaultsMode(mode aws.DefaultsMode, optFns ...func(options *DefaultsMod
10481048
}
10491049
}
10501050

1051-
// GetS3DisableS3Beta2022aAuth returns the configured value for
1052-
// [EnvConfig.S3DisableS3Beta2022aAuth].
1053-
func (o LoadOptions) GetS3DisableS3Beta2022aAuth() (value, ok bool) {
1054-
if o.S3DisableS3Beta2022aAuth == nil {
1051+
// GetS3DisableExpressAuth returns the configured value for
1052+
// [EnvConfig.S3DisableExpressAuth].
1053+
func (o LoadOptions) GetS3DisableExpressAuth() (value, ok bool) {
1054+
if o.S3DisableExpressAuth == nil {
10551055
return false, false
10561056
}
10571057

1058-
return *o.S3DisableS3Beta2022aAuth, true
1058+
return *o.S3DisableExpressAuth, true
10591059
}
10601060

1061-
// WithS3DisableS3Beta2022aAuth sets [LoadOptions.S3DisableS3Beta2022aAuth]
1061+
// WithS3DisableExpressAuth sets [LoadOptions.S3DisableExpressAuth]
10621062
// to the value provided.
1063-
func WithS3DisableS3Beta2022aAuth(v bool) LoadOptionsFunc {
1063+
func WithS3DisableExpressAuth(v bool) LoadOptionsFunc {
10641064
return func(o *LoadOptions) error {
1065-
o.S3DisableS3Beta2022aAuth = &v
1065+
o.S3DisableExpressAuth = &v
10661066
return nil
10671067
}
10681068
}

0 commit comments

Comments
 (0)