-
Notifications
You must be signed in to change notification settings - Fork 853
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
MD5 checksum crash in AWS SQS receive messages #4717
Comments
@gorell acknowledged, there should be a way to disable the SQS message MD5 checksum validation in this case. Can you share more details about the FIPS compliant mode in the JDK you're using? How do you enable this mode in OpenJDK? |
We have customized OpenJDK for Salesforce needs where all the crypto operations are handled by the FIPS security provider which doesn't have support for MD5 any longer. |
|
Just to leave a quick example here, the SQS client now supports a SqsClient sqsClient = SqsClient.builder()
.checksumValidationEnabled(false)
.build(); SqsAsyncClient asyncClient = SqsAsyncClient.builder()
.checksumValidationEnabled(false)
.build(); Check the Javadocs for more info. The new attribute is available starting SDK version |
@debora-ito Are there any plans to support checksum validation in other format? Like what the s3 client is doing? Simply providing the ability to turn it off seems like a temporary rather than a long term solution? |
Describe the bug
Hi Team,
We run our JDK in FIPS mode - that doesn't include MD5 as a supported algorithm. When trying to receive messages using the AWS SDK v2 code, the following exception is thrown:
We create our SQS client using the following AWS SDK v2 code:
And we use this code for the message retrieval:
For the regular JDK the above code works fine. The problem for the FIPS-compliant JDK seems to be with the MD5 checksum being activated explicitly in AWS SDK v2 code, below please see the screenshot of software.amazon.awssdk.services.sqs.DefaultSqsBaseClientBuilder with the problematic code seemingly being activated in a hard coded way.
Expected Behavior
MD5 checksum shouldn't be done explicitly for SQS receive messages, or there should be a way to disable it. The above flow should pass. Send messages show work the similar way.
Current Behavior
Getting the above mentioned exception in SQS receive messages.
Reproduction Steps
Run receive messages as described above for a JDK that doesn't support MD5.
Possible Solution
There should be a way to disable the MD5 checksum.
Additional Information/Context
This S3 bug seems to be related though for S3 there is a workaround how to disable the checksum.
AWS Java SDK version used
2.20.42
JDK version used
openjdk 17.0.7
Operating System and version
Linux service-5b7c8c4788-c62fp 5.4.238-148.347.amzn2.x86_64 #1 SMP Thu Apr 6 19:42:57 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: