Announcement: S3 default integrity change #2960
Replies: 2 comments 1 reply
-
Hello, I have a question that I haven't seen answered anywhere yet. It appears that as of right now, this SDK does not support calculating CRC64NVME checksums. I found one comment (#2981 (comment)) saying "since we don't support it natively", but it didn't elaborate more than that. Is support coming in the future, and if so is there a timeline? Can someone elaborate more on why it isn't supported yet? It seems like Thank you! |
Beta Was this translation helpful? Give feedback.
-
I have the same issue; I updated all of our SDK modules to the latest. In Why is this algorithm not supported in the Go SDK? It is supported in the AWS S3 CLI I just installed (version 2.23.5). |
Beta Was this translation helpful? Give feedback.
-
In AWS SDK for Go v2 service/s3 v1.73.0, we released changes to the S3 client that adopts new default integrity protections. For more information on default integrity behavior, please refer to the official SDK documentation. In SDK releases from this version on, clients default to enabling an additional checksum on all Put calls and enabling validation on Get calls.
You can disable default integrity protections for S3. We do not recommend this because checksums are important to S3 integrity posture. Integrity protections can be disabled by setting the config flag to
when_required
, or by using the related AWS shared config file settings or environment variables.Compatibility w/ 3rd-party S3 emulators
Disclaimer: the AWS SDKs and CLI are designed for usage with official AWS services. We may introduce and enable new features by default, such as these new default integrity protections, prior to them being supported or otherwise handled by third-party service implementations. You can disable the new behavior with the
WHEN_REQUIRED
value for therequest_checksum_calculation
andresponse_checksum_validation
configuration options covered in Data Integrity Protections for Amazon S3.Reinstating MD5 for checksum-required operations
Prior to this update, S3 operations that required a checksum - such as
DeleteObjects
(plural, not singular) - would have the SDK compute and send an MD5 checksum of the request payload by default. Sending an alternative checksum, such as CRC32, was always possible, but the SDKs did not exhibit this behavior.After this update, the Go SDK will instead compute and send a CRC32 checksum. This may result in compatibility issues with 3rd-party S3 emulators whose versions of these APIs were written to expect MD5.
The following code snippet demonstrates a re-usable functional option,
withContentMD5
, which reinstates the Content-MD5 checksum header behavior. You can apply this option to individual service calls if you experience any compatibility issues with 3rd-party service emulators.Beta Was this translation helpful? Give feedback.
All reactions