Skip to content

Conversation

@dagnir
Copy link
Contributor

@dagnir dagnir commented Oct 14, 2025

Motivation and Context

This PR adds support for async payload signing in the V4a signer. Note an important difference to the V4 implementation: This supports the fallback to signing the payload when the request is sent over http. This is because calling the signAsync() method previously always threw UnsupportedOperationException, so there is no risk of performance regression for existing users.

Modifications

Testing

Screenshots (if appropriate)

Types of changes

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

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

@dagnir dagnir force-pushed the dongie/sra-chunk-encoding-pt2 branch 5 times, most recently from 966149f to ef5d53f Compare October 16, 2025 18:42
@dagnir dagnir changed the base branch from dongie/sra-chunk-encoding-pt1 to feature/master/sra-async-chunked-encoding October 16, 2025 18:59
@dagnir dagnir force-pushed the dongie/sra-chunk-encoding-pt2 branch 2 times, most recently from d4f0f87 to 5ac3968 Compare October 17, 2025 14:00
@dagnir dagnir changed the title [WIP] V4a async payload signing V4a async payload signing Oct 17, 2025

@ParameterizedTest(name = "{index} {3}")
@MethodSource("streamingInputChecksumCalculationParams")
public void asyncStreamingInput_checksumCalculation(RequestChecksumCalculation requestChecksumCalculation,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add an integ test as well?

SdkHttpRequest.Builder request, Publisher<ByteBuffer> payload, String checksum) {

return SignerUtils.moveContentLength(request, payload)
.thenApply(p -> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: is there any difference between sigv4a and sigv4 for this logic here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, we can consolidate this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually nm, they're slightly different that it's a bit annoying to consolidate the two. The normal V4a version doesn't have a checksum parameter

@dagnir dagnir marked this pull request as ready for review October 21, 2025 19:19
@dagnir dagnir requested a review from a team as a code owner October 21, 2025 19:19
@dagnir dagnir changed the base branch from feature/master/sra-async-chunked-encoding to master October 22, 2025 21:06
@dagnir dagnir force-pushed the dongie/sra-chunk-encoding-pt2 branch from 5ac3968 to 802f635 Compare October 22, 2025 21:10
@dagnir dagnir force-pushed the dongie/sra-chunk-encoding-pt2 branch from a5b7bd0 to dbb0e6a Compare October 28, 2025 18:20
@sonarqubecloud
Copy link

@dagnir dagnir added the force-s3-regression-tests Used to force the s3-regression-tests workflow to run. label Oct 28, 2025
@dagnir dagnir force-pushed the dongie/sra-chunk-encoding-pt2 branch from 6fe5c9e to f5876e0 Compare October 28, 2025 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

force-s3-regression-tests Used to force the s3-regression-tests workflow to run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants