Change priority of AWS credential providers to accept AWS_SESSION_TOKEN
This commit is contained in:
parent
ab7a3a803d
commit
6bb1bcce03
2 changed files with 9 additions and 1 deletions
|
@ -48,6 +48,7 @@ func open(cfg Config, rt http.RoundTripper) (*Backend, error) {
|
|||
// AWS env variables such as AWS_ACCESS_KEY_ID
|
||||
// Minio env variables such as MINIO_ACCESS_KEY
|
||||
creds := credentials.NewChainCredentials([]credentials.Provider{
|
||||
&credentials.EnvAWS{},
|
||||
&credentials.Static{
|
||||
Value: credentials.Value{
|
||||
AccessKeyID: cfg.KeyID,
|
||||
|
@ -59,7 +60,6 @@ func open(cfg Config, rt http.RoundTripper) (*Backend, error) {
|
|||
Transport: http.DefaultTransport,
|
||||
},
|
||||
},
|
||||
&credentials.EnvAWS{},
|
||||
&credentials.EnvMinio{},
|
||||
})
|
||||
client, err := minio.NewWithCredentials(cfg.Endpoint, creds, !cfg.UseHTTP, "")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue