-
Notifications
You must be signed in to change notification settings - Fork 592
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
S3 SSECustomerKey no longer working since 3.498.0 #5863
Comments
Hi @john-yick , Thanks for letting us know. Thanks, |
Hi @john-yick , Is there a reason you were providing the key as a hexadecimal string? const SSECustomerKey = crypto
.createHash("md5")
.update(customerManagedKey)
.digest("hex"); This is breaking because of a change I made to the SSEC middleware here. The reason it's breaking is because S3 expects the The reason I made the change was that before the change, you needed to provide the key as binary, and the SDK would base64 encode it for you, which is not following the documentation. To explain what is happening in the old implementation with your code: I'm not sure why this has passed the service side validations on the S3 side, but if you have some more input as to why you were providing the key as a hex string in the first place maybe it can shed some light on the service side behavior. At any rate, I'm working on a fix to support the old (seemingly incorrect) behavior. |
@RanVaknin I am unsure why it converts into a Hex value as the implementation our side is quite old. But the code has been working for quite a long time, enough for us to have over 200k objects encrypted with this SSECustomerKey. We always assumed that it was correct as the response from S3 was valid and we could track the objects from S3's web console also. For the Thanks you for your support. |
Hi @john-yick , Can you please wait for tomorrow's release and update your SDK version and try again? Thanks~ |
@RanVaknin Sure thing, will give it a try tomorrow and let you know how it goes. Thanks, |
@RanVaknin I can confirm that the issue has been resolved 👍 Thanks for your assistance, |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Checkboxes for prior research
Describe the bug
Versions prior to 3.498.0 seem to work as expected for SSECustomerKey, but something within 3.498.0 has broken it for us.
I have crafted a small script below that works fine for 3.496.0 which we have running in production. But updating to any AWS SDK version higher than 3.496.0 causes an 403 Access Denied error to be thrown.
SDK version number
@aws-sdk/[email protected]
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v20.7.0
Reproduction Steps
Run the following code for a file that exists with SSECustomerKey encryption
Variables you will need to provide
Observed Behavior
An error is thrown on any version of the JS SDK 3.498.0 or higher
Expected Behavior
The GetObjectCommand should download the object to local as expected
Possible Solution
No response
Additional Information/Context
No response
The text was updated successfully, but these errors were encountered: