diff --git a/CHANGELOG.md b/CHANGELOG.md index 556cb9b..03f1d31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## 0.7.2 - 31-Dec-2023 + +### Changes + +* Update `aws-sdk-*` crates to version `1.*.0` + ## 0.7.1 - 20-Nov-2023 * Add ability to create empty archive (#124) diff --git a/Cargo.lock b/Cargo.lock index c0e1565..c579db7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -37,6 +37,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -126,19 +132,21 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "aws-config" -version = "0.56.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3d533e0263bf453cc80af4c8bcc4d64e2aca293bd16f81633a36f1bf4a97cb" +checksum = "11382bd8ac4c6c182a9775990935f96c916a865f1414486595f18eb8cfa9d90b" dependencies = [ "aws-credential-types", "aws-http", + "aws-runtime", "aws-sdk-sso", + "aws-sdk-ssooidc", "aws-sdk-sts", "aws-smithy-async", - "aws-smithy-client", "aws-smithy-http", - "aws-smithy-http-tower", "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", "aws-smithy-types", "aws-types", "bytes", @@ -146,52 +154,46 @@ dependencies = [ "hex", "http", "hyper", - "ring", - "time 0.3.21", + "ring 0.17.7", + "time", "tokio", - "tower", "tracing", "zeroize", ] [[package]] name = "aws-credential-types" -version = "0.56.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4834ba01c5ad1ed9740aa222de62190e3c565d11ab7e72cc68314a258994567" +checksum = "70a1629320d319dc715c6189b172349186557e209d2a7b893ff3d14efd33a47c" dependencies = [ "aws-smithy-async", + "aws-smithy-runtime-api", "aws-smithy-types", - "fastrand 2.0.0", - "tokio", - "tracing", "zeroize", ] [[package]] name = "aws-http" -version = "0.56.0" +version = "0.60.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72badf9de83cc7d66b21b004f09241836823b8302afb25a24708769e576a8d8f" +checksum = "30e4199d5d62ab09be6a64650c06cc5c4aa45806fed4c74bc4a5c8eaf039a6fa" dependencies = [ - "aws-credential-types", - "aws-smithy-http", + "aws-smithy-runtime-api", "aws-smithy-types", "aws-types", "bytes", "http", "http-body", - "lazy_static", - "percent-encoding", "pin-project-lite", "tracing", ] [[package]] name = "aws-runtime" -version = "0.56.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf832f522111225c02547e1e1c28137e840e4b082399d93a236e4b29193a4667" +checksum = "87116d357c905b53f1828d15366363fd27b330a0393cbef349e653f686d36bad" dependencies = [ "aws-credential-types", "aws-http", @@ -211,9 +213,9 @@ dependencies = [ [[package]] name = "aws-sdk-s3" -version = "0.29.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e30370b61599168d38190ad272bb91842cd81870a6ca035c05dd5726d22832c" +checksum = "21392b29994de019a7059af5eab144ea49d572dd52863d8e10537267f59f998c" dependencies = [ "aws-credential-types", "aws-http", @@ -221,7 +223,6 @@ dependencies = [ "aws-sigv4", "aws-smithy-async", "aws-smithy-checksums", - "aws-smithy-client", "aws-smithy-eventstream", "aws-smithy-http", "aws-smithy-json", @@ -235,23 +236,21 @@ dependencies = [ "http-body", "once_cell", "percent-encoding", - "regex", - "tokio-stream", + "regex-lite", "tracing", "url", ] [[package]] name = "aws-sdk-sso" -version = "0.29.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f41bf2c28d32dbb9894a8fcfcb148265d034d3f4a170552a47553a09de890895" +checksum = "da9d9a8ac4cdb8df39f9777fd41e15a9ae0d0b622b00909ae0322b4d2f9e6ac8" dependencies = [ "aws-credential-types", "aws-http", "aws-runtime", "aws-smithy-async", - "aws-smithy-client", "aws-smithy-http", "aws-smithy-json", "aws-smithy-runtime", @@ -260,22 +259,44 @@ dependencies = [ "aws-types", "bytes", "http", - "regex", - "tokio-stream", + "once_cell", + "regex-lite", + "tracing", +] + +[[package]] +name = "aws-sdk-ssooidc" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ba4a42aa91acecd5ca43b330b5c8eb7f8808d720b6a6f796a35faa302fc73d" +dependencies = [ + "aws-credential-types", + "aws-http", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "http", + "once_cell", + "regex-lite", "tracing", ] [[package]] name = "aws-sdk-sts" -version = "0.29.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e21aa1a5b0853969a1ef96ccfaa8ff5d57c761549786a4d5f86c1902b2586a" +checksum = "8e3c7c3dcec7cccd24a13953eedf0f2964c2d728d22112744274cf0098ad2e35" dependencies = [ "aws-credential-types", "aws-http", "aws-runtime", "aws-smithy-async", - "aws-smithy-client", "aws-smithy-http", "aws-smithy-json", "aws-smithy-query", @@ -285,48 +306,55 @@ dependencies = [ "aws-smithy-xml", "aws-types", "http", - "regex", + "once_cell", + "regex-lite", "tracing", ] [[package]] name = "aws-sigv4" -version = "0.56.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cb40a93429794065f41f0581734fc56a345f6a38d8e2e3c25c7448d930cd132" +checksum = "d222297ca90209dc62245f0a490355795f29de362eb5c19caea4f7f55fe69078" dependencies = [ + "aws-credential-types", "aws-smithy-eventstream", "aws-smithy-http", + "aws-smithy-runtime-api", + "aws-smithy-types", "bytes", + "crypto-bigint 0.5.5", "form_urlencoded", "hex", "hmac", "http", "once_cell", + "p256", "percent-encoding", - "regex", + "ring 0.17.7", "sha2", - "time 0.3.21", + "subtle", + "time", "tracing", + "zeroize", ] [[package]] name = "aws-smithy-async" -version = "0.56.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ee6d17d487c8b579423067718b3580c0908d0f01d7461813f94ec4323bad623" +checksum = "1e9f65000917e3aa94c259d67fe01fa9e4cd456187d026067d642436e6311a81" dependencies = [ "futures-util", "pin-project-lite", "tokio", - "tokio-stream", ] [[package]] name = "aws-smithy-checksums" -version = "0.56.0" +version = "0.60.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d1849fd5916904513fb0862543b36f8faab43c07984dbc476132b7da1aed056" +checksum = "4c2a63681f82fb85ca58d566534b7dc619c782fee0c61c1aa51e2b560c21cb4f" dependencies = [ "aws-smithy-http", "aws-smithy-types", @@ -345,33 +373,15 @@ dependencies = [ [[package]] name = "aws-smithy-client" -version = "0.56.0" +version = "0.60.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdbe0a3ad15283cc5f863a68cb6adc8e256e7c109c43c01bdd09be407219a1e9" -dependencies = [ - "aws-smithy-async", - "aws-smithy-http", - "aws-smithy-http-tower", - "aws-smithy-types", - "bytes", - "fastrand 2.0.0", - "http", - "http-body", - "hyper", - "hyper-rustls", - "lazy_static", - "pin-project-lite", - "rustls", - "tokio", - "tower", - "tracing", -] +checksum = "91e2c8c5e21624d233a091009d8d427165feaeb5b86ff8cee1dff67cad1b8b24" [[package]] name = "aws-smithy-eventstream" -version = "0.56.0" +version = "0.60.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56afef1aa766f512b4970b4c3150b9bf2df8035939723830df4b30267e2d7cb" +checksum = "a85e16fa903c70c49ab3785e5f4ac2ad2171b36e0616f321011fa57962404bb6" dependencies = [ "aws-smithy-types", "bytes", @@ -380,57 +390,45 @@ dependencies = [ [[package]] name = "aws-smithy-http" -version = "0.56.0" +version = "0.60.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34dc313472d727f5ef44fdda93e668ebfe17380c99dee512c403e3ca51863bb9" +checksum = "e4e816425a6b9caea4929ac97d0cb33674849bd5f0086418abc0d02c63f7a1bf" dependencies = [ "aws-smithy-eventstream", + "aws-smithy-runtime-api", "aws-smithy-types", "bytes", "bytes-utils", "futures-core", "http", "http-body", - "hyper", "once_cell", "percent-encoding", "pin-project-lite", "pin-utils", - "tokio", - "tokio-util", "tracing", ] [[package]] name = "aws-smithy-http-tower" -version = "0.56.0" +version = "0.60.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd50fca5a4ea4ec3771689ee93bf06b32de02a80af01ed93a8f8a4ed90e8483" -dependencies = [ - "aws-smithy-http", - "aws-smithy-types", - "bytes", - "http", - "http-body", - "pin-project-lite", - "tower", - "tracing", -] +checksum = "8264c9a50ad442fdba497ba0fe99f9e1e39f7efc4ac97836ae49105b29794c32" [[package]] name = "aws-smithy-json" -version = "0.56.0" +version = "0.60.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3591dd7c2fe01ab8025e4847a0a0f6d0c2b2269714688ffb856f9cf6c6d465cf" +checksum = "8ab3f6d49e08df2f8d05e1bb5b68998e1e67b76054d3c43e7b954becb9a5e9ac" dependencies = [ "aws-smithy-types", ] [[package]] name = "aws-smithy-query" -version = "0.56.0" +version = "0.60.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbabb1145e65dd57ae72d91a2619d3f5fba40b68a5f40ba009c30571dfd60aff" +checksum = "0f94a7a3aa509ff9e8b8d80749851d04e5eee0954c43f2e7d6396c4740028737" dependencies = [ "aws-smithy-types", "urlencoding", @@ -438,60 +436,73 @@ dependencies = [ [[package]] name = "aws-smithy-runtime" -version = "0.56.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3687fb838d4ad1c883b62eb59115bc9fb02c4f308aac49a7df89627067f6eb0d" +checksum = "8da5b0a3617390e769576321816112f711c13d7e1114685e022505cf51fe5e48" dependencies = [ "aws-smithy-async", - "aws-smithy-client", "aws-smithy-http", "aws-smithy-runtime-api", "aws-smithy-types", "bytes", "fastrand 2.0.0", + "h2", "http", "http-body", + "hyper", + "hyper-rustls", "once_cell", "pin-project-lite", "pin-utils", + "rustls", "tokio", "tracing", ] [[package]] name = "aws-smithy-runtime-api" -version = "0.56.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cfbf1e5c2108b41f5ca607cde40dd5109fecc448f5d30c8e614b61f36dce704" +checksum = "2404c9eb08bfe9af255945254d9afc69a367b7ee008b8db75c05e3bca485fc65" dependencies = [ "aws-smithy-async", - "aws-smithy-http", "aws-smithy-types", "bytes", "http", + "pin-project-lite", "tokio", "tracing", + "zeroize", ] [[package]] name = "aws-smithy-types" -version = "0.56.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed0a94eefd845a2a78677f1b72f02fa75802d38f7f59be675add140279aa8bf" +checksum = "2aba8136605d14ac88f57dc3a693a9f8a4eab4a3f52bc03ff13746f0cd704e97" dependencies = [ "base64-simd", + "bytes", + "bytes-utils", + "futures-core", + "http", + "http-body", "itoa", "num-integer", + "pin-project-lite", + "pin-utils", "ryu", "serde", - "time 0.3.21", + "time", + "tokio", + "tokio-util", ] [[package]] name = "aws-smithy-types-convert" -version = "0.56.0" +version = "0.60.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9ccd4edbe78d6290b89358c49ef65a49d6d108d563ce05a9b11b0d0c10aa987" +checksum = "2916d0db08f25d26d2d27d3a0d339075caead06c2a41f09870a121e2f87a4893" dependencies = [ "aws-smithy-types", "chrono", @@ -499,23 +510,22 @@ dependencies = [ [[package]] name = "aws-smithy-xml" -version = "0.56.0" +version = "0.60.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c88052c812f696143ad7ba729c63535209ff0e0f49e31a6d2b1205208ea6ea79" +checksum = "2e8f03926587fc881b12b102048bb04305bf7fb8c83e776f0ccc51eaa2378263" dependencies = [ "xmlparser", ] [[package]] name = "aws-types" -version = "0.56.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bceb8cf724ad057ad7f327d0d256d7147b3eac777b39849a26189e003dc9782" +checksum = "4e5d5ee29077e0fcd5ddd0c227b521a33aaf02434b7cdba1c55eec5c1f18ac47" dependencies = [ "aws-credential-types", "aws-smithy-async", - "aws-smithy-client", - "aws-smithy-http", + "aws-smithy-runtime-api", "aws-smithy-types", "http", "rustc_version", @@ -537,6 +547,12 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "base16ct" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" + [[package]] name = "base64" version = "0.21.1" @@ -553,6 +569,12 @@ dependencies = [ "vsimd", ] +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + [[package]] name = "bitflags" version = "1.3.2" @@ -602,11 +624,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -617,17 +640,16 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.24" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ + "android-tzdata", "iana-time-zone", "js-sys", - "num-integer", "num-traits", - "time 0.1.45", "wasm-bindgen", - "winapi", + "windows-targets 0.48.0", ] [[package]] @@ -718,6 +740,12 @@ dependencies = [ "windows-sys 0.45.0", ] +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + [[package]] name = "core-foundation" version = "0.9.3" @@ -761,6 +789,28 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crypto-bigint" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "crypto-common" version = "0.1.6" @@ -771,6 +821,16 @@ dependencies = [ "typenum", ] +[[package]] +name = "der" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" +dependencies = [ + "const-oid", + "zeroize", +] + [[package]] name = "digest" version = "0.10.7" @@ -855,12 +915,44 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" +[[package]] +name = "ecdsa" +version = "0.14.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" +dependencies = [ + "der", + "elliptic-curve", + "rfc6979", + "signature", +] + [[package]] name = "either" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +[[package]] +name = "elliptic-curve" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" +dependencies = [ + "base16ct", + "crypto-bigint 0.4.9", + "der", + "digest", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", +] + [[package]] name = "encode_unicode" version = "0.3.6" @@ -933,6 +1025,16 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +[[package]] +name = "ff" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "filetime" version = "0.2.21" @@ -1072,9 +1174,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if", "libc", @@ -1118,6 +1220,17 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +[[package]] +name = "group" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "h2" version = "0.3.19" @@ -1387,9 +1500,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.144" +version = "0.2.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" [[package]] name = "libgit2-sys" @@ -1603,6 +1716,17 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" +[[package]] +name = "p256" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" +dependencies = [ + "ecdsa", + "elliptic-curve", + "sha2", +] + [[package]] name = "parking_lot" version = "0.11.2" @@ -1689,6 +1813,16 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkcs8" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +dependencies = [ + "der", + "spki", +] + [[package]] name = "pkg-config" version = "0.3.27" @@ -1823,7 +1957,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.11", ] [[package]] @@ -1859,7 +1993,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.11", "redox_syscall 0.2.16", "thiserror", ] @@ -1884,6 +2018,12 @@ dependencies = [ "regex-syntax 0.6.29", ] +[[package]] +name = "regex-lite" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b661b2f27137bdbc16f00eda72866a92bb28af1753ffbd56744fb6e2e9cd8e" + [[package]] name = "regex-syntax" version = "0.6.29" @@ -1896,6 +2036,17 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" +[[package]] +name = "rfc6979" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" +dependencies = [ + "crypto-bigint 0.4.9", + "hmac", + "zeroize", +] + [[package]] name = "ring" version = "0.16.20" @@ -1905,12 +2056,26 @@ dependencies = [ "cc", "libc", "once_cell", - "spin", - "untrusted", + "spin 0.5.2", + "untrusted 0.7.1", "web-sys", "winapi", ] +[[package]] +name = "ring" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +dependencies = [ + "cc", + "getrandom 0.2.11", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", +] + [[package]] name = "rustc-demangle" version = "0.1.23" @@ -1942,12 +2107,12 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.6" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1feddffcfcc0b33f5c6ce9a29e341e4cd59c3f78e7ee45f4a40c038b1d6cbb" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", - "ring", + "ring 0.17.7", "rustls-webpki", "sct", ] @@ -1975,12 +2140,12 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.101.3" +version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "261e9e0888cba427c3316e6322805653c9425240b6fd96cee7cb671ab70ab8d0" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring", - "untrusted", + "ring 0.17.7", + "untrusted 0.9.0", ] [[package]] @@ -2025,8 +2190,22 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", +] + +[[package]] +name = "sec1" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", ] [[package]] @@ -2139,6 +2318,16 @@ dependencies = [ "libc", ] +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +dependencies = [ + "digest", + "rand_core 0.6.4", +] + [[package]] name = "slab" version = "0.4.8" @@ -2194,6 +2383,22 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spki" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +dependencies = [ + "base64ct", + "der", +] + [[package]] name = "ssstar" version = "0.7.1" @@ -2204,6 +2409,7 @@ dependencies = [ "aws-credential-types", "aws-sdk-s3", "aws-sdk-sts", + "aws-smithy-async", "aws-smithy-client", "aws-smithy-http", "aws-smithy-http-tower", @@ -2417,17 +2623,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - [[package]] name = "time" version = "0.3.21" @@ -2543,11 +2738,6 @@ version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite", - "tokio", "tower-layer", "tower-service", "tracing", @@ -2633,7 +2823,7 @@ dependencies = [ "sharded-slab", "smallvec", "thread_local", - "time 0.3.21", + "time", "tracing", "tracing-core", "tracing-log", @@ -2684,6 +2874,12 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" version = "2.3.1" @@ -2746,7 +2942,7 @@ dependencies = [ "rustversion", "sysinfo", "thiserror", - "time 0.3.21", + "time", ] [[package]] @@ -2787,12 +2983,6 @@ version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" diff --git a/Cargo.toml b/Cargo.toml index 93568da..6cd21c1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,17 +17,18 @@ version = "0.7.1" again = "0.1.2" assert_matches = "1.5.0" async-trait = "0.1" -aws-config = "0.56" -aws-credential-types = { version = "0.56", features = ["hardcoded-credentials"] } -aws-sdk-s3 = { version = "0.29.0", features = ["rt-tokio"] } -aws-sdk-sts = { version = "0.29.0" } -aws-smithy-client = "0.56" -aws-smithy-http = "0.56" -aws-smithy-http-tower = "0.56" -aws-smithy-runtime-api = "0.56" -aws-smithy-types = "0.56" -aws-smithy-types-convert = { version = "0.56", features = ["convert-chrono"] } -aws-types = { version = "0.56", features = [] } +aws-config = { version = "1.1.1", features = ["behavior-version-latest"] } +aws-credential-types = { version = "1.1.0", features = ["hardcoded-credentials"] } +aws-sdk-s3 = { version = "1.10.0", features = ["rt-tokio"] } +aws-sdk-sts = { version = "1.9.0" } +aws-smithy-async = "1.1.1" +aws-smithy-client = "0.60" +aws-smithy-http = "0.60" +aws-smithy-http-tower = "0.60" +aws-smithy-runtime-api = "1.1.1" +aws-smithy-types = "1.1.1" +aws-smithy-types-convert = { version = "0.60", features = ["convert-chrono"] } +aws-types = { version = "1.1.1", features = [] } base64 = "0.21.0" byte-unit = { version = "4" } bytes = "1.4.0" diff --git a/deny.toml b/deny.toml index c58887b..6cab46b 100644 --- a/deny.toml +++ b/deny.toml @@ -216,6 +216,16 @@ skip = [ # `clap` we still will have an issue, but now with 2 more crates: # linux-raw-sys 0.3.8 and rustix 0.37.19 that the freshest of clap uses { name = "fastrand", version = "1.9.0" }, + + # one of the dependencies of `aws-sigv4 v 1.1.1` crate depends on this outdated version of crate + { name = "crypto-bigint", version = "=0.4.9" }, + + # one of the dependencies of `aws-smithy-runtime v.1.1.1` crate depends on this outdated version of crates + { name = "ring", version = "=0.16.20" }, + { name = "untrusted", version = "=0.7.1" }, + + # ring v0.16.20 depend on this outdated version of crate + { name = "spin", version = "=0.5.2" }, ] # Similarly to `skip` allows you to skip certain crates during duplicate # detection. Unlike skip, it also includes the entire tree of transitive diff --git a/ssstar-testing/src/test_data.rs b/ssstar-testing/src/test_data.rs index c671610..8f23c9f 100644 --- a/ssstar-testing/src/test_data.rs +++ b/ssstar-testing/src/test_data.rs @@ -2,7 +2,7 @@ use crate::Result; use aws_sdk_s3::{primitives::ByteStream, Client}; use bytes::Bytes; -use futures::{StreamExt, TryStreamExt}; +use futures::StreamExt; use rand::prelude::*; use sha2::Digest; use std::{ @@ -279,7 +279,7 @@ where // First list all objects in the bucket and prefix let mut objects = HashMap::new(); - let pages = client + let mut pages = client .list_objects_v2() .bucket(bucket) .prefix(prefix) @@ -288,17 +288,17 @@ where // Translate this stream of pages of object listings into a stream of AWS SDK // 'Object' structs so we can process them one at a time - let mut pages = pages.map(|result| { + let mut results = vec![]; + + while let Some(result) = pages.next().await { let page = result?; let result: Result<Vec<aws_sdk_s3::types::Object>> = Ok(page.contents.unwrap_or_default()); - result - }); + results.push(result?); + } - while let Some(result) = pages.next().await { - for object in result? { - objects.insert(object.key().unwrap().to_owned(), object); - } + for object in results.into_iter().flatten() { + objects.insert(object.key().unwrap().to_owned(), object); } // Verify all of the expected keys are actually present in the `test_data` hash table, and make diff --git a/ssstar/Cargo.toml b/ssstar/Cargo.toml index aa92a54..a1740a9 100644 --- a/ssstar/Cargo.toml +++ b/ssstar/Cargo.toml @@ -39,13 +39,14 @@ async-trait = { workspace = true } aws-config = { workspace = true } aws-credential-types = { workspace = true } aws-sdk-s3 = { workspace = true } +aws-sdk-sts = { workspace = true } +aws-smithy-async = { workspace = true } aws-smithy-client = { workspace = true } aws-smithy-http = { workspace = true } aws-smithy-http-tower = { workspace = true } aws-smithy-runtime-api = { workspace = true } aws-smithy-types = { workspace = true } aws-smithy-types-convert = { workspace = true } -aws-sdk-sts = { workspace = true } aws-types = { workspace = true } byte-unit = { workspace = true } bytes = { workspace = true } diff --git a/ssstar/src/error.rs b/ssstar/src/error.rs index 584072d..ba5f186 100644 --- a/ssstar/src/error.rs +++ b/ssstar/src/error.rs @@ -4,10 +4,9 @@ use url::Url; pub type Result<T, E = S3TarError> = std::result::Result<T, E>; -use aws_smithy_http::{body::SdkBody, result::SdkError as RawSdkError}; -use http::Response; +use aws_smithy_runtime_api::{client::result::SdkError as RawSdkError, http::Response}; -pub(crate) type SdkError<T> = RawSdkError<T, Response<SdkBody>>; +pub(crate) type SdkError<T> = RawSdkError<T, Response>; #[derive(Debug, Snafu)] #[snafu(visibility(pub))] @@ -118,7 +117,7 @@ pub enum S3TarError { ReadByteStream { bucket: String, key: String, - source: aws_smithy_http::byte_stream::error::Error, + source: aws_smithy_types::byte_stream::error::Error, }, #[snafu(display("Unable to create new object '{key}' in S3 bucket '{bucket}', because the expected size of {size} bytes is larger than the 5TB maximum object size"))] diff --git a/ssstar/src/lib.rs b/ssstar/src/lib.rs index 1aeae50..42f1fc9 100644 --- a/ssstar/src/lib.rs +++ b/ssstar/src/lib.rs @@ -10,6 +10,7 @@ mod objstore; #[cfg(feature = "storage")] mod storage; mod tar; +mod util; mod writers; pub use config::Config; diff --git a/ssstar/src/objstore/s3.rs b/ssstar/src/objstore/s3.rs index 4ee090b..a394ec6 100644 --- a/ssstar/src/objstore/s3.rs +++ b/ssstar/src/objstore/s3.rs @@ -1,13 +1,14 @@ use super::{Bucket, MultipartUploader, ObjectStorage}; +use crate::util::aws_sdk::stream::IntoStream; use crate::{create, Config, Result}; use aws_config::{ default_provider::credentials::DefaultCredentialsChain, meta::region::RegionProviderChain, sts::AssumeRoleProvider, }; -use aws_sdk_s3::config::{ConfigBag, Credentials, Interceptor}; +use aws_sdk_s3::config::{ConfigBag, Credentials}; use aws_smithy_http::event_stream::BoxError; use aws_smithy_runtime_api::client::{ - interceptors::context::BeforeTransmitInterceptorContextMut, + interceptors::context::BeforeTransmitInterceptorContextMut, interceptors::Intercept, runtime_components::RuntimeComponents, }; use aws_types::region::Region; @@ -253,7 +254,7 @@ impl S3Bucket { bucket: dyn_clone::clone_box(self), key: key.clone(), version_id: None, - size: object.size() as u64, + size: object.size().expect("Objects always have a size") as u64, timestamp: object .last_modified() .expect("Objects always have a last modified time") @@ -573,14 +574,9 @@ impl S3Bucket { if let Err(e) = client.head_bucket().bucket(name).send().await { if let aws_sdk_s3::error::SdkError::ServiceError(err) = &e { let response = err.raw(); - if response.status() == http::StatusCode::MOVED_PERMANENTLY { - if let Some(value) = response.headers().get("x-amz-bucket-region") { - if let Ok(region) = value.to_str() { - // This is AWS's way of telling us we have the right bucket, but it is in - // another region so we should use the appropriate region endpoint - return Ok(Some(region.to_string())); - } - } + // If we have the region header, we can use that + if let Some(region) = response.headers().get("x-amz-bucket-region") { + return Ok(Some(region.to_string())); } }; @@ -700,7 +696,9 @@ impl Bucket for S3Bucket { // In S3 this is done with the HeadObject operation let metadata = self.head_object(key, version_id).await?; - Ok(metadata.content_length() as u64) + Ok(metadata + .content_length() + .expect("Objects always have a content length") as u64) } async fn list_matching_objects( @@ -725,7 +723,10 @@ impl Bucket for S3Bucket { bucket: dyn_clone::clone_box(self), key: key.to_string(), version_id: metadata.version_id().map(|id| id.to_string()), - size: metadata.content_length() as u64, + size: metadata + .content_length() + .expect("Objects always have a content length") + as u64, timestamp: metadata .last_modified() .expect("Objects always have a last modified time") @@ -756,7 +757,7 @@ impl Bucket for S3Bucket { // Translate this stream of pages of object listings into a stream of AWS SDK // 'Object' structs so we can process them one at a time - let objects = pages.map(|result| { + let objects = pages.into_stream().map(|result| { let page = result.with_context(|_| crate::error::ListObjectsInPrefixSnafu { bucket: self.inner.name.clone(), prefix: prefix.to_string(), @@ -811,7 +812,7 @@ impl Bucket for S3Bucket { // Translate this stream of pages of object listings into a stream of AWS SDK // 'Object' structs so we can process them one at a time - let objects = pages.map(|result| { + let objects = pages.into_stream().map(|result| { let page = result.with_context(|_| crate::error::ListObjectsInBucketSnafu { bucket: self.inner.name.clone(), })?; @@ -900,7 +901,7 @@ impl Bucket for S3Bucket { // Translate this stream of pages of object listings into a stream of AWS SDK // 'Object' structs so we can process them one at a time - let objects = pages.map(|result| { + let objects = pages.into_stream().map(|result| { let page = result.with_context(|_| crate::error::ListObjectsInBucketSnafu { bucket: self.inner.name.clone(), })?; @@ -1456,7 +1457,7 @@ pub struct UserAgentInterceptor { user_agent: Option<HeaderValue>, } -impl Interceptor for UserAgentInterceptor { +impl Intercept for UserAgentInterceptor { fn modify_before_signing( &self, context: &mut BeforeTransmitInterceptorContextMut, @@ -1515,14 +1516,16 @@ async fn make_s3_client( builder = builder.session_length(std::time::Duration::from_secs(seconds)); } - let assume_role_provider = builder.build( - DefaultCredentialsChain::builder() - .region(load_region_provider( - region.clone().or_else(|| config.aws_region.clone()), - )) - .build() - .await, - ); + let assume_role_provider = builder + .build_from_provider( + DefaultCredentialsChain::builder() + .region(load_region_provider( + region.clone().or_else(|| config.aws_region.clone()), + )) + .build() + .await, + ) + .await; aws_config_builder = aws_config_builder.credentials_provider(assume_role_provider); } diff --git a/ssstar/src/util/aws_sdk/mod.rs b/ssstar/src/util/aws_sdk/mod.rs new file mode 100644 index 0000000..baf29e0 --- /dev/null +++ b/ssstar/src/util/aws_sdk/mod.rs @@ -0,0 +1 @@ +pub mod stream; diff --git a/ssstar/src/util/aws_sdk/stream.rs b/ssstar/src/util/aws_sdk/stream.rs new file mode 100644 index 0000000..60ef789 --- /dev/null +++ b/ssstar/src/util/aws_sdk/stream.rs @@ -0,0 +1,52 @@ +use aws_smithy_async::future::pagination_stream::PaginationStream; +use futures::stream; +use futures::stream::{Stream, StreamExt}; +use std::pin::Pin; + +/// Converts [`Self`] into [`Stream`]. +pub trait IntoStream { + type Item; + + fn into_stream(self) -> Pin<Box<dyn Stream<Item = Self::Item> + Send>>; +} + +/// Converts [`PaginationStream`] into [`Stream`]. +impl<T> IntoStream for PaginationStream<T> +where + T: Send + Unpin + 'static, +{ + type Item = T; + + /// Uses [`unfold`](https://docs.rs/futures/0.3.15/futures/stream/fn.unfold.html) + /// to convert [`PaginationStream`] into [`Stream`]. + fn into_stream(self) -> Pin<Box<dyn Stream<Item = Self::Item> + Send + 'static>> { + stream::unfold(self, |mut state| async move { + state.next().await.map(|item| (item, state)) + }) + .boxed() + } +} + +#[cfg(test)] +mod tests { + use super::*; + use aws_smithy_async::future::pagination_stream::fn_stream::FnStream; + + #[tokio::test] + async fn test_into_stream() { + let items = vec![1, 2, 3, 4, 5]; + let pagination_stream = PaginationStream::new(FnStream::new(|tx| { + Box::pin(async move { + for i in items { + tx.send(i).await.unwrap(); + } + }) + })); + + let stream = pagination_stream.into_stream(); + + let result: Vec<_> = stream.collect().await; + + assert_eq!(result, vec![1, 2, 3, 4, 5]); + } +} diff --git a/ssstar/src/util/mod.rs b/ssstar/src/util/mod.rs new file mode 100644 index 0000000..7ec6405 --- /dev/null +++ b/ssstar/src/util/mod.rs @@ -0,0 +1 @@ +pub mod aws_sdk;