Skip to content

Conversation

dagnir
Copy link
Contributor

@dagnir dagnir commented Sep 26, 2025

Motivation and Context

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 and others added 3 commits September 19, 2025 11:07
* Reuse computed checksums across retries

This commit adds the ability to reuse previously computed checksums for
a request across retries.

This ensures that if a request data stream is modified between attempts
that the server will reject the request.

As part of this change, the `http-auth-spi` package has been updated to
expose a new interface: `PayloadChecksumStore`. This is a simple storage
interface that allows signers to store and retrieve computed checksums.
Additionally, a new `SignerProperty` is introduced,
`SdkInternalHttpSignerProperty.CHECKSUM_CACHE` so that signers and
their callers can access this cache.

Note that both the interface and associated signer property are
`@SdkProtectedApi` and not intended to be used by non-SDK consumers of
`http-auth-spi`.

Finally, this adds a dependency on `checksums-spi` for `http-auth-spi`.

* Update core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/http/pipeline/stages/SigningStage.java

Co-authored-by: David Ho <70000000+davidh44@users.noreply.github.com>

* Review comments

---------

Co-authored-by: David Ho <70000000+davidh44@users.noreply.github.com>
* Reuse computed checkums for async payloads

This is a continuation of #6413 that adds support for checksum reuse on
async payloads.

Additionally, this commit renames references to "ChecksumCache" to
"ChecksumStore".

* Fix cross module issue
* Reuse checksums in legacy signing codepath

This commit adds support for reusing calculated payload checksums over
retries in the legacy (i.e. non-SRA) signing codepaths.

* S3 testing with non-SRA
@dagnir dagnir added the api-surface-area-approved-by-team Indicate API surface area introduced by this PR has been approved by team label Sep 26, 2025
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
65.0% Coverage on New Code (required ≥ 80%)
3.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-surface-area-approved-by-team Indicate API surface area introduced by this PR has been approved by team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant