forked from TrueCloudLab/frostfs-s3-gw
[#615] Use UNSIGNED_PAYLOAD
to check sign
Use `UNSIGNED_PAYLOAD` to check signature if x-amz-content-sha256 isn't provided as signed header https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html " You include the literal string UNSIGNED-PAYLOAD when constructing a canonical request, and set the same value as the x-amz-content-sha256 header value when sending the request to Amazon S3" Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
parent
510b0a1005
commit
3d3dd00211
6 changed files with 142 additions and 23 deletions
|
@ -77,8 +77,7 @@ func TestCheckSign(t *testing.T) {
|
|||
Lifetime: 10 * time.Minute,
|
||||
SignTime: time.Now().UTC(),
|
||||
Headers: map[string]string{
|
||||
ContentTypeHdr: "text/plain",
|
||||
AmzContentSHA256: UnsignedPayload,
|
||||
ContentTypeHdr: "text/plain",
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue