-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Announcement: S3 default integrity change #3166
Comments
Should fix S3 upload problems with newer gem version. See aws/aws-sdk-ruby#3166
We experienced data loss in production due to this minor-level update. While I understand the focus of AWS SDKs and CLI is on official AWS services, it's important to acknowledge the impact on users who rely on third-party storage providers. I believe AWS holds a responsibility to ensure the following when implementing changes of this nature:
These steps would help mitigate risks and maintain trust among users who depend on AWS SDKs in diverse environments. Your consideration of these points would be greatly appreciated. |
I'm so sorry you experienced data loss from this change. Can you please be specific about how that happened so I can forward that feedback to s3? Regarding your points:
Hopefully the ruby implementation (which I did) was not too painful. I simply implemented what was asked, so please don't shoot the messenger here 😊. |
Thank you for your quick reply!
What happened is that I updated to the latest Once I finally discovered this exception, I went and added the following configuration settings to my ActiveStorage request_checksum_calculation: when_required
response_checksum_validation: when_required The good news is that after writing my previous post, I was able to recover the lost files. The missing files were initially uploaded through a Telegram chatbot. This meant the files were still stored on Telegram's servers, and I was able to recover the original required file identifiers as part of the logs for the failed background jobs. If it wasn't for those logs, there would have been no way to recover the file identifiers and we would have essentially lost that data.
I see. I was unaware of this. I believe in recent Rails versions deprecation warnings will by default raise an error in a development environment. Perhaps this can be used to warn people of such changes. By setting There might be better approaches. This just one idea that came to mind.
Once I realized what was going on, the fix was relatively easy. I don't blame you. I appreciate your work on this gem and I understand the difficult position you must be in trying to balance your employer's and the developer's wishes. Thank you for hard work 🙏 |
In aws-sdk-s3 v1.178.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.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.The text was updated successfully, but these errors were encountered: