-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aws::S3::Model::PutObjectRequest::SetChecksumSHA256 not behaving as expected #2540
Comments
Hello @aphillips-opentext , Thank you very much for your submission. I noticed that you were using As you can read from our API documentation this has the following effect: Sign the request based on the value returned by AmazonWebServiceRequest::SignBody() I have double checked the behavior of the SDK for both case scenario case scenario:
Providing invalid checksum results to the following behavior:
Request fails.
Providing invalid checksum results to the following behavior: Request successful Best, Yasmine |
So request signing and precomputed checksums are mutually exclusive? I hadn't seen that anywhere in the documentation but we can probably live without the former. The issue I'm seeing now is when I use Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy::Never and supply a correct checksum I'm getting the following error: |
Would the fix for this also apply to SetContentMD5 as well? I opened another issue for the problem of it being not sent. #2818 |
Fixed with this PR: #2826 |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
I am trying to make use of additional checksums in S3 as described here:
https://aws.amazon.com/getting-started/hands-on/amazon-s3-with-additional-checksums/?ref=docs_gateway/amazons3/checking-object-integrity.html
The page mentions that I can supply a precomputed checksum and the server will check it on upload. I added the checksum type and value to the put request and uploaded it and everything seemed to work; the web UI correctly displayed the checksum I had supplied. However I noticed that if I supply the wrong checksum, or even a string that isn't a checksum, the call still succeeds and the website still displays the correct checksum. This would suggest the SDK is not using what I supplied and calculating its own. Is this a bug or am I misunderstanding something?
Expected Behavior
If I supply a bad checksum I expect the object upload to fail.
Current Behavior
The upload succeeds.
Reproduction Steps
Possible Solution
No response
Additional Information/Context
The SDK was built with curl and openssl.
AWS CPP SDK version used
1.11.63
Compiler and Version used
Visual Studio 2022
Operating System and version
Windows 10 Enterprise
The text was updated successfully, but these errors were encountered: