Unverified Commit f7f037d3 authored by Landon James's avatar Landon James Committed by GitHub
Browse files

Flexible Checksums V2 (#3967)



## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here -->
Flexible checksums V2 will be launching this week

## Description
<!--- Describe your changes in detail -->

## Testing
<!--- Please describe in detail how you tested your changes -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [x] For changes to the smithy-rs codegen or runtime crates, I have
created a changelog entry Markdown file in the `.changelog` directory,
specifying "client," "server," or both in the `applies_to` key.
- [x] For changes to the AWS SDK, generated SDK code, or SDK runtime
crates, I have created a changelog entry Markdown file in the
`.changelog` directory, specifying "aws-sdk-rust" in the `applies_to`
key.

----

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

---------

Co-authored-by: default avatarZelda Hessler <zhessler@amazon.com>
Co-authored-by: default avatarAaron Todd <aajtodd@users.noreply.github.com>
parent cadce6c3
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
---
applies_to: ["client"]
authors: ["landonxjames"]
references: ["smithy-rs#3967"]
breaking: false
new_feature: true
bug_fix: true
---

Updates client generation to conform with Smithy's updates to the [httpChecksum trait](https://smithy.io/2.0/aws/aws-core.html#aws-protocols-httpchecksum-trait).
+12 −0
Original line number Diff line number Diff line
---
applies_to: ["client", "aws-sdk-rust"]
authors: ["landonxjames"]
references: ["smithy-rs#3845"]
breaking: false
new_feature: true
bug_fix: true
---

S3 client behavior is updated to always calculate a checksum by default for operations that support it (such as PutObject or UploadPart), or require it (such as DeleteObjects). The default checksum algorithm is CRC32. Checksum behavior can be configured using `when_supported` and `when_required` options - in shared config using request_checksum_calculation, or as env variable using AWS_REQUEST_CHECKSUM_CALCULATION.

The S3 client attempts to validate response checksums for all S3 API operations that support checksums. However, if the SDK has not implemented the specified checksum algorithm then this validation is skipped. Checksum validation behavior can be configured using `when_supported` and `when_required` options - in shared config using response_checksum_validation, or as env variable using AWS_RESPONSE_CHECKSUM_VALIDATION.
+180 −8
Original line number Diff line number Diff line
@@ -38,12 +38,55 @@ version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299"

[[package]]
name = "anstream"
version = "0.6.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
dependencies = [
 "anstyle",
 "anstyle-parse",
 "anstyle-query",
 "anstyle-wincon",
 "colorchoice",
 "is_terminal_polyfill",
 "utf8parse",
]

[[package]]
name = "anstyle"
version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"

[[package]]
name = "anstyle-parse"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
dependencies = [
 "utf8parse",
]

[[package]]
name = "anstyle-query"
version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
dependencies = [
 "windows-sys 0.59.0",
]

[[package]]
name = "anstyle-wincon"
version = "3.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125"
dependencies = [
 "anstyle",
 "windows-sys 0.59.0",
]

[[package]]
name = "arbitrary"
version = "1.4.1"
@@ -138,7 +181,7 @@ dependencies = [

[[package]]
name = "aws-runtime"
version = "1.5.3"
version = "1.5.4"
dependencies = [
 "arbitrary",
 "aws-credential-types",
@@ -184,7 +227,7 @@ version = "0.60.3"

[[package]]
name = "aws-sigv4"
version = "1.2.6"
version = "1.2.7"
dependencies = [
 "aws-credential-types",
 "aws-smithy-eventstream",
@@ -220,7 +263,7 @@ dependencies = [

[[package]]
name = "aws-smithy-async"
version = "1.2.3"
version = "1.2.4"
dependencies = [
 "futures-util",
 "pin-project-lite",
@@ -229,13 +272,14 @@ dependencies = [

[[package]]
name = "aws-smithy-checksums"
version = "0.60.13"
version = "0.62.0"
dependencies = [
 "aws-smithy-http",
 "aws-smithy-types",
 "bytes",
 "crc32c",
 "crc32fast",
 "crc64fast-nvme",
 "hex",
 "http 0.2.12",
 "http-body 0.4.6",
@@ -248,7 +292,7 @@ dependencies = [

[[package]]
name = "aws-smithy-eventstream"
version = "0.60.5"
version = "0.60.6"
dependencies = [
 "aws-smithy-types",
 "bytes",
@@ -257,7 +301,7 @@ dependencies = [

[[package]]
name = "aws-smithy-http"
version = "0.60.11"
version = "0.60.12"
dependencies = [
 "aws-smithy-runtime-api",
 "aws-smithy-types",
@@ -332,7 +376,7 @@ dependencies = [

[[package]]
name = "aws-smithy-types"
version = "1.2.11"
version = "1.2.12"
dependencies = [
 "base64-simd",
 "bytes",
@@ -356,7 +400,7 @@ dependencies = [

[[package]]
name = "aws-types"
version = "1.3.3"
version = "1.3.4"
dependencies = [
 "aws-credential-types",
 "aws-smithy-async",
@@ -488,6 +532,25 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"

[[package]]
name = "cbindgen"
version = "0.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fce8dd7fcfcbf3a0a87d8f515194b49d6135acab73e18bd380d1d93bb1a15eb"
dependencies = [
 "clap",
 "heck",
 "indexmap",
 "log",
 "proc-macro2",
 "quote",
 "serde",
 "serde_json",
 "syn 2.0.94",
 "tempfile",
 "toml",
]

[[package]]
name = "cbor-diag"
version = "0.1.12"
@@ -575,8 +638,10 @@ version = "4.5.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96b01801b5fc6a0a232407abc821660c9c6d25a1cafc0d4f85f29fb8d9afc121"
dependencies = [
 "anstream",
 "anstyle",
 "clap_lex",
 "strsim",
]

[[package]]
@@ -585,6 +650,12 @@ version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"

[[package]]
name = "colorchoice"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"

[[package]]
name = "const-oid"
version = "0.9.6"
@@ -625,6 +696,21 @@ dependencies = [
 "libc",
]

[[package]]
name = "crc"
version = "3.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636"
dependencies = [
 "crc-catalog",
]

[[package]]
name = "crc-catalog"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5"

[[package]]
name = "crc32c"
version = "0.6.8"
@@ -643,6 +729,16 @@ dependencies = [
 "cfg-if",
]

[[package]]
name = "crc64fast-nvme"
version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5e2ee08013e3f228d6d2394116c4549a6df77708442c62d887d83f68ef2ee37"
dependencies = [
 "cbindgen",
 "crc",
]

[[package]]
name = "criterion"
version = "0.5.1"
@@ -1015,6 +1111,12 @@ dependencies = [
 "foldhash",
]

[[package]]
name = "heck"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"

[[package]]
name = "hermit-abi"
version = "0.4.0"
@@ -1311,6 +1413,12 @@ dependencies = [
 "windows-sys 0.52.0",
]

[[package]]
name = "is_terminal_polyfill"
version = "1.70.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"

[[package]]
name = "itertools"
version = "0.10.5"
@@ -2106,6 +2214,15 @@ dependencies = [
 "serde",
]

[[package]]
name = "serde_spanned"
version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1"
dependencies = [
 "serde",
]

[[package]]
name = "sha1"
version = "0.10.6"
@@ -2209,6 +2326,12 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"

[[package]]
name = "strsim"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"

[[package]]
name = "subtle"
version = "2.6.1"
@@ -2409,6 +2532,40 @@ dependencies = [
 "tokio",
]

[[package]]
name = "toml"
version = "0.8.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e"
dependencies = [
 "serde",
 "serde_spanned",
 "toml_datetime",
 "toml_edit",
]

[[package]]
name = "toml_datetime"
version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41"
dependencies = [
 "serde",
]

[[package]]
name = "toml_edit"
version = "0.22.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5"
dependencies = [
 "indexmap",
 "serde",
 "serde_spanned",
 "toml_datetime",
 "winnow",
]

[[package]]
name = "tower-service"
version = "0.3.3"
@@ -2556,6 +2713,12 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"

[[package]]
name = "utf8parse"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"

[[package]]
name = "uuid"
version = "1.12.0"
@@ -2801,6 +2964,15 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"

[[package]]
name = "winnow"
version = "0.6.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39281189af81c07ec09db316b302a3e67bf9bd7cbf6c820b50e35fee9c2fa980"
dependencies = [
 "memchr",
]

[[package]]
name = "write16"
version = "1.0.0"
+6 −6
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"

[[package]]
name = "aws-config"
version = "1.5.13"
version = "1.5.14"
dependencies = [
 "aws-credential-types",
 "aws-runtime",
@@ -89,7 +89,7 @@ dependencies = [

[[package]]
name = "aws-runtime"
version = "1.5.3"
version = "1.5.4"
dependencies = [
 "aws-credential-types",
 "aws-sigv4",
@@ -174,7 +174,7 @@ dependencies = [

[[package]]
name = "aws-sigv4"
version = "1.2.6"
version = "1.2.7"
dependencies = [
 "aws-credential-types",
 "aws-smithy-http",
@@ -195,7 +195,7 @@ dependencies = [

[[package]]
name = "aws-smithy-async"
version = "1.2.3"
version = "1.2.4"
dependencies = [
 "futures-util",
 "pin-project-lite",
@@ -299,7 +299,7 @@ dependencies = [

[[package]]
name = "aws-smithy-types"
version = "1.2.11"
version = "1.2.12"
dependencies = [
 "base64-simd",
 "bytes",
@@ -327,7 +327,7 @@ dependencies = [

[[package]]
name = "aws-types"
version = "1.3.3"
version = "1.3.4"
dependencies = [
 "aws-credential-types",
 "aws-smithy-async",
+1 −1
Original line number Diff line number Diff line
[package]
name = "aws-config"
version = "1.5.13"
version = "1.5.14"
authors = [
    "AWS Rust SDK Team <aws-sdk-rust@amazon.com>",
    "Russell Cohen <rcoh@amazon.com>",
Loading