Skip to content

Make sha256 required parameter for SigV4 constructor #1335

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

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

trivikr
Copy link
Contributor

@trivikr trivikr commented Jul 12, 2024

Issue #, if available:

Fixes: aws/aws-sdk-js-v3#3590

Description of changes:

The SignatureV4 implementation was originally added in aws/aws-sdk-js-v3#36 seven years ago, where sha256 was not optional. It was incorrectly made optional in aws/aws-sdk-js-v3#58.

This issue was not noticed during development of AWS SDK for JavaScript packages, since we always passed sha256 as linked in aws/aws-sdk-js-v3#3590 (comment). However, it was an issue for some customers who called it directly. As described in the issue, those customers provided sha256 implementation as a workaround.

This PR makes sha256 a required parameter, as required by the implementation.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@trivikr trivikr requested review from a team as code owners July 12, 2024 16:36
@trivikr trivikr requested a review from JordonPhillips July 12, 2024 16:36
@trivikr trivikr changed the title chore(signature-v4): make sha256 required constructor parameter Make sha256 required parameter for SigV4 constructor Jul 12, 2024
@trivikr trivikr merged commit ae8bf5c into main Jul 15, 2024
10 checks passed
@trivikr trivikr deleted the signature-v4-sha256-required branch July 15, 2024 16:42
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.

@aws-sdk/signature-v4: Can't sign API Gateway requests, SHA256 not provided - TypeError: hashConstructor is not a constructor
3 participants