Version 0.93 breaks with x-amx-content-sha256 bad header? #770
Labels
No labels
action
check-aws
action
discussion-needed
action
for-external-contributors
action
for-newcomers
action
more-info-needed
action
need-funding
action
triage-required
kind
correctness
kind
ideas
kind
improvement
kind
performance
kind
testing
kind
usability
kind
wrong-behavior
prio
critical
prio
low
scope
admin-api
scope
background-healing
scope
build
scope
documentation
scope
k8s
scope
layout
scope
metadata
scope
ops
scope
rpc
scope
s3-api
scope
security
scope
telemetry
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Deuxfleurs/garage#770
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Using an R library (https://github.com/sansans/minio.s3 forked) to get directly access objects on bucket, previously on 0.91 works . Read documentation that header enforcement? Does this mean require additional headers?
List of 4
$ Code : chr "InvalidRequest"
$ Message : chr "Bad request: Header
x-amz-content-sha256
should be signed"$ Resource: chr "/iistore/test/7dayCovid.csv"
$ Region : chr "garage"
..$ content-type : chr "application/xml"
..$ content-length: chr "229"
..$ date : chr "Tue, 12 Mar 2024 05:42:14 GMT"
..- attr(, "class")= chr [1:2] "insensitive" "list"
NULL
Thanks, will look into it
I have a feeling that this is a bug in your S3 client library, as Amazon explicitly says that the
x-amz-content-sha256
should be included in the signature calculation. See examples here: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.htmlHowever, if we can confirm that this library works well on Amazon's implementation of S3, it means that S3 is actually more relaxed about this, and we should be too in our implementation. It would not surprise me so much, because the value of the x-amz-content-sha256 header is also included as the last line of the canonical request, so it is part of the signature calculation in all cases.
@sansans , would you be willing to open a free AWS account and check that your library works well on official Amazon S3?
Ok will do that, I'll try and will see the results.
updates, I've tested with an Amazon hosted S3 bucket using the library. Works fine. I guess as you suspected it's relaxed about the header. Also tested with Minio self hosted, no issues as well.