Skip to content
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

Adds a client builder option to disable the default MD5 checksum vali… #4729

Merged
merged 2 commits into from
Dec 2, 2023

Conversation

cenedhryn
Copy link
Contributor

@cenedhryn cenedhryn commented Nov 30, 2023

…dation

Motivation and Context

The SDK automatically performs validation on the MD5 checksums that SQS returns for SendMessage, ReceiveMessage and SendMessageBatch. If the client application does not support MD5, the validation fails.

Fixes #4717

Modifications

Added a new client parameter to disable checksum validation. There are several ways to add this to the client and I chose a customClientContextParam, because most plumbing already exists

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Codegen

Results in

@Generated("software.amazon.awssdk:codegen")
@SdkPublicApi
public interface SqsBaseClientBuilder<B extends SqsBaseClientBuilder<B, C>, C> extends AwsClientBuilder<B, C> {

    /**
     * Enable message MD5 checksum validation.
     * <p>
     * Checksum validation for messages defaults to true. Only set to false if required, for instance if your
     * cryptographic library does not support MD5.
     * <p>
     * Supported operations are SendMessage, ReceiveMessage and SendMessageBatch.
     */
    B checksumValidationEnabled(Boolean checksumValidationEnabled);
}

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

@cenedhryn cenedhryn requested a review from a team as a code owner November 30, 2023 22:12
@cenedhryn cenedhryn force-pushed the salande/sqs-disable-md5-validation branch from ebd7447 to bd9c80b Compare December 1, 2023 21:07
Copy link

sonarcloud bot commented Dec 1, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

65.0% 65.0% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@cenedhryn cenedhryn merged commit 018582b into master Dec 2, 2023
13 of 14 checks passed
@cenedhryn cenedhryn deleted the salande/sqs-disable-md5-validation branch December 2, 2023 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MD5 checksum crash in AWS SQS receive messages
2 participants