Skip to content

Commit 7ca297a

Browse files
gmileremyleone
andauthored
fix(object): mc: change generated Signature Version from v2 to v4 (#1522)
* mc: change generated S3 API version from v2 to v4 Before this change, using "mc" to generate a pre-sign URL using for uploading an object would not work. After manually updating the config from S3v2 to S3v4 all good now. * Fix goldens Co-authored-by: Rémy Léone <[email protected]>
1 parent 3dc87a0 commit 7ca297a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

internal/namespaces/object/v1/s3configfile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func (c s3config) getConfigFile(tool s3tool) (core.RawResult, error) {
150150
URL: "https://s3." + c.Region.String() + ".scw.cloud",
151151
AccessKey: c.AccessKey,
152152
SecretKey: c.SecretKey,
153-
API: "S3v2",
153+
API: "S3v4",
154154
},
155155
},
156156
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
3-
{"version":"9","hosts":{"scaleway":{"url":"https://s3.fr-par.scw.cloud","accessKey":"SCWXXXXXXXXXXXXXXXXX","secretKey":"11111111-1111-1111-1111-111111111111","api":"S3v2"}}}
3+
{"version":"9","hosts":{"scaleway":{"url":"https://s3.fr-par.scw.cloud","accessKey":"SCWXXXXXXXXXXXXXXXXX","secretKey":"11111111-1111-1111-1111-111111111111","api":"S3v4"}}}
44
🟩🟩🟩 JSON STDOUT 🟩🟩🟩
5-
{"version":"9","hosts":{"scaleway":{"url":"https://s3.fr-par.scw.cloud","accessKey":"SCWXXXXXXXXXXXXXXXXX","secretKey":"11111111-1111-1111-1111-111111111111","api":"S3v2"}}}
5+
{"version":"9","hosts":{"scaleway":{"url":"https://s3.fr-par.scw.cloud","accessKey":"SCWXXXXXXXXXXXXXXXXX","secretKey":"11111111-1111-1111-1111-111111111111","api":"S3v4"}}}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
3-
{"version":"9","hosts":{"scaleway":{"url":"https://s3.nl-ams.scw.cloud","accessKey":"SCWXXXXXXXXXXXXXXXXX","secretKey":"11111111-1111-1111-1111-111111111111","api":"S3v2"}}}
3+
{"version":"9","hosts":{"scaleway":{"url":"https://s3.nl-ams.scw.cloud","accessKey":"SCWXXXXXXXXXXXXXXXXX","secretKey":"11111111-1111-1111-1111-111111111111","api":"S3v4"}}}
44
🟩🟩🟩 JSON STDOUT 🟩🟩🟩
5-
{"version":"9","hosts":{"scaleway":{"url":"https://s3.nl-ams.scw.cloud","accessKey":"SCWXXXXXXXXXXXXXXXXX","secretKey":"11111111-1111-1111-1111-111111111111","api":"S3v2"}}}
5+
{"version":"9","hosts":{"scaleway":{"url":"https://s3.nl-ams.scw.cloud","accessKey":"SCWXXXXXXXXXXXXXXXXX","secretKey":"11111111-1111-1111-1111-111111111111","api":"S3v4"}}}

0 commit comments

Comments
 (0)