Skip to content

Conversation

@zoewangg
Copy link
Contributor

@zoewangg zoewangg commented Sep 28, 2023

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 AsyncHttpChecksumIntegrationTest and verified it worked.

@zoewangg zoewangg requested a review from a team as a code owner September 28, 2023 20:42
* 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")
Copy link
Contributor Author

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)

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;
}

return V4PayloadSigner.create();
}

private static V4PayloadSigner v4PayloadAsyncSigner(
Copy link
Contributor

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.

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug C 4 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 2 Security Hotspots
Code Smell A 451 Code Smells

84.2% 84.2% Coverage
4.0% 4.0% Duplication

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

@zoewangg zoewangg merged commit 0b9f12e into feature/master/sra-identity-auth Sep 28, 2023
@zoewangg zoewangg deleted the zoewang/fixAsyncSigning branch September 28, 2023 22:52
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.

2 participants