badalprasadsingh opened a new pull request, #1423: URL: https://github.com/apache/iceberg-go/pull/1423
## Description When the S3 IO backend (`io/gocloud`) is pointed at a non-AWS S3-compatible endpoint that supports the AWS SigV4 HMAC interop API but is **not** Amazon S3 itself — most notably **Google Cloud Storage's S3-compatible interop endpoint (`https://storage.googleapis.com`)** with HMAC keys. Fixes #1422 ## Proposed Fix * When `props["s3.endpoint"]` (`io.S3EndpointURL`) is set, configure the S3 client to use `aws.RequestChecksumCalculationWhenRequired` so the SDK doesn't automatically enable CRC32 for requests where it isn't required. * Add an **Initialize** middleware (`iceberg-go/strip-s3-input-checksum-algorithm`) **before** `AWSChecksum:SetupInputContext` to clear `ChecksumAlgorithm` on `PutObject`, `UploadPart`, and `CreateMultipartUpload`, preventing chunked encoding from being enabled for compatible S3 endpoints. * Add a **Finalize** middleware (`iceberg-go/strip-gcs-incompatible-signed-headers`) **before** SigV4 signing to remove `Amz-Sdk-Invocation-Id`, `Amz-Sdk-Request`, and `Accept-Encoding` from the signed request, avoiding signature mismatches with GCS S3-compatible endpoints while leaving the AWS S3 code path unchanged. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
