mirror of
https://github.com/restic/restic.git
synced 2025-12-12 16:32:05 +00:00
s3: prevent repeated credential queries with anonymous authentication
This commit is contained in:
@@ -132,6 +132,9 @@ func getCredentials(cfg Config) (*credentials.Credentials, error) {
|
|||||||
|
|
||||||
if c.SignerType == credentials.SignatureAnonymous {
|
if c.SignerType == credentials.SignatureAnonymous {
|
||||||
debug.Log("using anonymous access for %#v", cfg.Endpoint)
|
debug.Log("using anonymous access for %#v", cfg.Endpoint)
|
||||||
|
// short circuit credentials resolution when using anonymous access
|
||||||
|
// otherwise the IAM provider would continuously try to (unsuccessfully) retrieve new credentials
|
||||||
|
creds = credentials.New(&credentials.Static{})
|
||||||
}
|
}
|
||||||
|
|
||||||
roleArn := os.Getenv("RESTIC_AWS_ASSUME_ROLE_ARN")
|
roleArn := os.Getenv("RESTIC_AWS_ASSUME_ROLE_ARN")
|
||||||
|
|||||||
Reference in New Issue
Block a user