Skip to content
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

Fix: empty body SHA is incorrect using AWS SDK v1 signer. #496

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

dblock
Copy link
Member

@dblock dblock commented Mar 26, 2024

Description

The empty body SHA is different (incorrect, it's the SHA for "hello") in the SDK v1 code, it should be one of an empty string.

It's correct in V2, https://github.com/opensearch-project/opensearch-go/blob/d38bdc15de7a759e3c1c538d173a63eef45a2dd2/signer/awsv2/sdkv2signer.go#L33C23-L33C87.

Issues Resolved

Closes #492.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

codecov bot commented Mar 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.26%. Comparing base (d38bdc1) to head (837cb35).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #496   +/-   ##
=======================================
  Coverage   57.26%   57.26%           
=======================================
  Files         315      315           
  Lines        9823     9823           
=======================================
  Hits         5625     5625           
  Misses       2904     2904           
  Partials     1294     1294           
Flag Coverage Δ
integration 50.80% <ø> (ø)
unit 12.84% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
signer/aws/aws.go 76.47% <ø> (ø)

Signed-off-by: dblock <dblock@amazon.com>
@dblock dblock force-pushed the fix-sigv4-aws-sdk-v1 branch from b2f3c83 to 837cb35 Compare March 26, 2024 20:30
@dblock dblock changed the title Fix: empty body SHA is incorrect. Fix: empty body SHA is incorrect using AWS SDK v1 signer. Mar 26, 2024
@dblock dblock merged commit 4fd7abe into opensearch-project:main Mar 27, 2024
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Invalid Sigv4 on requests without a body using AWS SDK v1
3 participants