-
Notifications
You must be signed in to change notification settings - Fork 969
Use HttpChecksumStage for async trailer support #4503
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
Use HttpChecksumStage for async trailer support #4503
Conversation
| * If http is used, payload signing will be enforced, but it's not currently supported in async path | ||
| * TODO: re-enable it once it's supported | ||
| */ | ||
| @Disabled("Payload signing is not supported for S3 async client") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is not supported today. The reason it passes is because payload signing is bypassed (request.contentStreamProvider() == null)
Lines 279 to 285 in 38e221b
| private boolean isPayloadSigningEnabled(SdkHttpFullRequest.Builder request, AwsS3V4SignerParams signerParams) { | |
| /** | |
| * If we aren't using https we should always sign the payload unless there is no payload | |
| */ | |
| if (!request.protocol().equals("https") && request.contentStreamProvider() != null) { | |
| return true; | |
| } |
...c/main/java/software/amazon/awssdk/core/internal/http/pipeline/stages/HttpChecksumStage.java
Show resolved
Hide resolved
| return V4PayloadSigner.create(); | ||
| } | ||
|
|
||
| private static V4PayloadSigner v4PayloadAsyncSigner( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, this makes it clear.
|
SonarCloud Quality Gate failed.
|












Motivation and Context
Async signing is not supported in SRA signer at the moment, so we need to rely on existing HttpChecksumStage. Note that for sync, we still use new SRA signer.
Modifications
Use HttpChecksumStage for async trailer support
Testing
Ran
AsyncHttpChecksumIntegrationTestand verified it worked.