Skip to content

Fix SigV4 auth to use base64-encoded content SHA256 and custom canonical request#3120

Open
plusplusjiajia wants to merge 1 commit intoapache:mainfrom
plusplusjiajia:fix-sigv4-auth
Open

Fix SigV4 auth to use base64-encoded content SHA256 and custom canonical request#3120
plusplusjiajia wants to merge 1 commit intoapache:mainfrom
plusplusjiajia:fix-sigv4-auth

Conversation

@plusplusjiajia
Copy link
Member

@plusplusjiajia plusplusjiajia commented Mar 4, 2026

Rationale for this change

This PR fixes the SigV4 request signing implementation in pyiceberg to align with the behavior of the [Iceberg Java SDK]
The SigV4 canonical request must use the hex-encoded SHA-256 of the payload for signature computation, while the x-amz-content-sha256 header uses base64 encoding. The default botocore.auth.SigV4Auth uses the x-amz-content-sha256 header value directly in the canonical request, which is incorrect when the header is base64-encoded.

Are these changes tested?

Yes

Are there any user-facing changes?

No

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.

1 participant