From d83e73b85ba8b25f9d232f9159b22161ff3512e9 Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Wed, 25 Jul 2018 05:19:26 +0200 Subject: [PATCH] Pick a random bucket name when probing for signature version (#2491) Probing buckets is a mechanism used to automatically detect supported S3 signature version. However, it seems that probe-bucket-sign is already used by someone, the thing that makes probing fails with 403 error. This PR changes the code to pick a random bucket name when probing. --- cmd/config-host-add.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/config-host-add.go b/cmd/config-host-add.go index 2908d5c1..fcfbde45 100644 --- a/cmd/config-host-add.go +++ b/cmd/config-host-add.go @@ -156,7 +156,7 @@ func probeS3Signature(accessKey, secretKey, url string) (string, *probe.Error) { AccessKey: accessKey, SecretKey: secretKey, Signature: "s3v4", - HostURL: urlJoinPath(url, "probe-bucket-sign"), + HostURL: urlJoinPath(url, "probe-bucket-sign-"+newRandomID(32)), } s3Client, err := s3New(s3Config)