You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "0xMALVEE (via GitHub)" <gi...@apache.org> on 2025/12/01 09:08:21 UTC

[PR] set header x-amz-content-sha256 before signing [iceberg-go]

0xMALVEE opened a new pull request, #637:
URL: https://github.com/apache/iceberg-go/pull/637

   set header x-amz-content-sha256 before signing to prevent any signature mismatch issues


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] set header x-amz-content-sha256 before signing [iceberg-go]

Posted by "twuebi (via GitHub)" <gi...@apache.org>.
twuebi commented on code in PR #637:
URL: https://github.com/apache/iceberg-go/pull/637#discussion_r2577007466


##########
catalog/rest/rest.go:
##########
@@ -237,6 +237,10 @@ func (s *sessionTransport) RoundTrip(r *http.Request) (*http.Response, error) {
 			return nil, err
 		}
 
+		// Set the x-amz-content-sha256 header before signing.
+		// This header is required for AWS SigV4 signature verification.
+		r.Header.Set("x-amz-content-sha256", payloadHash)

Review Comment:
   We should only set this header when sigv4 auth is configured



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] set header x-amz-content-sha256 before signing [iceberg-go]

Posted by "0xMALVEE (via GitHub)" <gi...@apache.org>.
0xMALVEE commented on code in PR #637:
URL: https://github.com/apache/iceberg-go/pull/637#discussion_r2577028827


##########
catalog/rest/rest.go:
##########
@@ -237,6 +237,10 @@ func (s *sessionTransport) RoundTrip(r *http.Request) (*http.Response, error) {
 			return nil, err
 		}
 
+		// Set the x-amz-content-sha256 header before signing.
+		// This header is required for AWS SigV4 signature verification.
+		r.Header.Set("x-amz-content-sha256", payloadHash)

Review Comment:
   yeah we are inside the `if s.signer != nil {` condition



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] set header x-amz-content-sha256 before signing [iceberg-go]

Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade merged PR #637:
URL: https://github.com/apache/iceberg-go/pull/637


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] set header x-amz-content-sha256 before signing [iceberg-go]

Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on PR #637:
URL: https://github.com/apache/iceberg-go/pull/637#issuecomment-3597299463

   @0xMALVEE can we get a test for this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org