Open nmoutschen opened 1 year ago
After diving into the code, it looks like we could already do this, but not with the PayloadChecksumKind
enum.
I'll let you fine folks decide if you see an opportunity to improve the SDK itself. Also happy to contribute with an example for this specific use-case. ๐
Thanks for submitting this @nmoutschen.
To whomever picks up https://github.com/awslabs/smithy-rs/issues/1798, they should also take a look at implementing this too, since it touches the same code in the signer.
As @nmoutschen notes you can do this by using SignableBody::UnsignedPayload
when you invoke the SigV4 crate.
Describe the feature
The
PayloadChecksumKind
enum inaws-sigv4
only supports two variants at the moment:XAmzSha256
andNoHeader
.However, making SigV4 requests for VPC Lattice services requre to set the
x-amz-content-sha256
header with a valueUNSIGNED-PAYLOAD
.Documentation: https://docs.aws.amazon.com/vpc-lattice/latest/ug/sigv4-authenticated-requests.html
Use Case
This would enable support for SigV4 for VPC Lattice.
Proposed Solution
Add a new variant to
PayloadChecksumKind
that will inject anUNSIGNED-PAYLOAD
value, and modify the rest ofaws-sigv4
to use this information.Other Information
No response
Acknowledgements
A note for the community
Community Note