Skip to content

Commit 29b4242

Browse files
committed
fixup! [RFC-0010] Add multi-tenant workload identity support for AWS Bucket
Remove os.Setenv() to prevent env var pollution Remove os.Setenv() call that could cause environment variable pollution in multi-tenant environments. The pkg/auth/aws package already handles region configuration properly by prioritizing opts.STSRegion over AWS_REGION environment variable. Signed-off-by: cappyzawa <[email protected]>
1 parent 3300705 commit 29b4242

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

internal/bucket/minio/minio.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import (
2323
"fmt"
2424
"net/http"
2525
"net/url"
26-
"os"
2726
"strings"
2827

2928
"github.com/minio/minio-go/v7"
@@ -188,10 +187,6 @@ func newAWSCreds(ctx context.Context, o *options) (*credentials.Credentials, err
188187
var opts auth.Options
189188
opts.Apply(o.authOpts...)
190189

191-
// Set AWS_REGION environment variable from bucket.Spec.Region for pkg/auth/aws
192-
if opts.STSRegion != "" {
193-
os.Setenv("AWS_REGION", opts.STSRegion)
194-
}
195190

196191
awsCredsProvider := awsauth.NewCredentialsProvider(ctx, o.authOpts...)
197192
awsCreds, err := awsCredsProvider.Retrieve(ctx)

0 commit comments

Comments
 (0)