Skip to content

feat(aws): decouple payload hashes from checksum headers - #1147

Merged
Xuanwo merged 3 commits into
mainfrom
xuanwo/decouple-payload-hash-header
Nov 30, 2026
Merged

Xuanwo merged 3 commits into
mainfrom
xuanwo/decouple-payload-hash-header

Conversation

@Xuanwo

@Xuanwo Xuanwo commented Nov 30, 2026

Copy link
Copy Markdown
Member

Closes #1085

Some AWS operations, including empty-body presigned requests, require a canonical payload digest with no x-amz-content-sha256 header. PayloadHash supplies the digest in the request extensions. PayloadChecksumMode controls generation of a missing checksum header during header authentication. Both SigV4 and SigV4a use the selected digest for header signing and presigning, and the caller owns the body.

The S3-compatible defaults keep their signing bytes. Both modes preserve existing checksum headers. When a request contains an explicit PayloadHash and a checksum header, their values must agree. A conflict returns RequestInvalid and leaves the request intact.

The offline AWS SDK comparisons cover both checksum modes and signing locations, including an empty-body presign that signs only host. Retry tests cover refreshing authentication across midnight, changing credentials, switching signing locations, and preserving the request when a repeated checksum header conflicts with the explicit hash.

@Xuanwo
Xuanwo merged commit ae3a1e6 into main Nov 30, 2026
66 checks passed
@Xuanwo
Xuanwo deleted the xuanwo/decouple-payload-hash-header branch November 30, 2026 10:34
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.

feat(aws): support configurable payload checksum mode and explicit payload hash in SigV4/SigV4a

2 participants