s3: combine all signature verification checks into a single function (#7330)

This commit is contained in:
Tom Crasset authored and GitHub committed 2025-10-25 01:11:45 -07:00
1 parent 6a8c53bc44
commit 824dcac3bf
6 files changed
+625 -365

No files matched your search

+7
View File
@@ -102,6 +102,7 @@ const (
ErrContentSHA256Mismatch
ErrInvalidAccessKeyID
ErrRequestNotReadyYet
ErrRequestTimeTooSkewed
ErrMissingDateHeader
ErrInvalidRequest
ErrAuthNotSetup
@@ -432,6 +433,12 @@ var errorCodeResponse = map[ErrorCode]APIError{
HTTPStatusCode: http.StatusForbidden,
},
ErrRequestTimeTooSkewed: {
Code: "RequestTimeTooSkewed",
Description: "The difference between the request time and the server's time is too large.",
HTTPStatusCode: http.StatusForbidden,
},
ErrSignatureDoesNotMatch: {
Code: "SignatureDoesNotMatch",
Description: "The request signature we calculated does not match the signature you provided. Check your key and signing method.",