s3: Fix empty checks in auth
This commit is contained in:
parent
a0b9bd527e
commit
ce4c1d4f35
1 changed files with 3 additions and 1 deletions
4
s3/s3.go
4
s3/s3.go
|
@ -235,7 +235,9 @@ func s3Connection(name string) (*s3.S3, *session.Session, error) {
|
|||
cred := credentials.NewChainCredentials(providers)
|
||||
|
||||
switch {
|
||||
case fs.ConfigFile.MustBool(name, "env_auth", false) && v.AccessKeyID == "" && v.SecretAccessKey == "":
|
||||
case fs.ConfigFile.MustBool(name, "env_auth", false):
|
||||
// No need for empty checks if "env_auth" is true
|
||||
case v.AccessKeyID == "" && v.SecretAccessKey == "":
|
||||
// if no access key/secret and iam is explicitly disabled then fall back to anon interaction
|
||||
cred = credentials.AnonymousCredentials
|
||||
case v.AccessKeyID == "":
|
||||
|
|
Loading…
Reference in a new issue