Skip to content

Generate flexible checksums for AWS clients - #996

Merged
stobrien89 merged 0 commit into
developfrom
python-client-checksums
Nov 30, 2026
Merged

stobrien89 merged 0 commit into
developfrom
python-client-checksums

Conversation

@stobrien89

Copy link
Copy Markdown
Contributor

Issue #, if available:

Description of changes:

Generated AWS clients now add and validate flexible checksums, matching Java's AwsFlexibleChecksumsIntegration. S3 needs this for operations such as PutObject, DeleteObjects and GetObject.

  • A new AwsChecksumsIntegration applies to AWS services whose operations have aws.protocols#httpChecksum.
  • Clients get a checksums module with flexible_checksums_plugin, which adds the runtime's FlexibleChecksumsInterceptor, or AsyncFlexibleChecksumsInterceptor in async clients. The package then needs smithy-aws-core[checksums].
  • Configs get request_checksum_calculation and response_checksum_validation only when an operation uses them, like Java. Both resolve from the environment and profile and default to when_supported.
  • Schemas keep aws.protocols#httpChecksum, which the interceptor reads.

The features fixture gains a request checksum on PutNote and response validation on GetNote. A new snapshot test checks that put_note(checksum_algorithm="SHA256") sends x-amz-checksum-sha256 from both clients.

Note: this doesn't fix the RestJsonHttpChecksumRequired vector. That uses smithy.api#httpChecksumRequired, which the runtime interceptor doesn't handle yet.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@stobrien89
stobrien89 requested a review from a team as a code owner November 27, 2026 23:04
@stobrien89 stobrien89 closed this Nov 30, 2026
@stobrien89
stobrien89 force-pushed the python-client-checksums branch from a0704d1 to 51c6349 Compare November 30, 2026 16:11
@stobrien89
stobrien89 merged commit 51c6349 into develop Nov 30, 2026
23 checks passed
@stobrien89

stobrien89 commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor Author

My mistake: a force-push during a rebase set this branch to develop, so GitHub marked it merged with no changes. Nothing from this PR landed. It's reopened as #999 on the rebased branch.

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