diff --git a/Cargo.lock b/Cargo.lock index 0c821e886..c37b24d86 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -210,19 +210,21 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "aws-config" -version = "0.56.1" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc6b3804dca60326e07205179847f17a4fce45af3a1106939177ad41ac08a6de" +checksum = "7489a72550db3712fe3a0a92068f832d6270ff82f518b84a800af131f99570d7" 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", @@ -230,52 +232,47 @@ dependencies = [ "hex", "http", "hyper", - "ring 0.16.20", + "ring", "time", "tokio", - "tower", "tracing", "zeroize", ] [[package]] name = "aws-credential-types" -version = "0.56.1" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a66ac8ef5fa9cf01c2d999f39d16812e90ec1467bd382cbbb74ba23ea86201" +checksum = "80009846d61a0a4f9070d789cf0e64db284cba6984fae3871050d044e6569cd2" dependencies = [ "aws-smithy-async", + "aws-smithy-runtime-api", "aws-smithy-types", - "fastrand", - "tokio", - "tracing", "zeroize", ] [[package]] name = "aws-http" -version = "0.56.1" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e626370f9ba806ae4c439e49675fd871f5767b093075cdf4fef16cac42ba900" +checksum = "1e65730b741a5f6422fd338bf6f76b7956b090affeaa045e78fca8c4186e0fd5" 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.1" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ac5cf0ff19c1bca0cea7932e11b239d1025a45696a4f44f72ea86e2b8bdd07" +checksum = "1d2414b96071ae840b97c0cc1d44b248d5607d648593cdf474f3fb5465572898" dependencies = [ "aws-credential-types", "aws-http", @@ -295,15 +292,14 @@ dependencies = [ [[package]] name = "aws-sdk-cloudfront" -version = "0.31.1" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f7b804ca21ea29a2c854b4fe16215f7a561e1db0e171349c526739c4b5add64" +checksum = "2a8aa0317541fdcacacd4e4958d513b7a1fc7a1ec306fde36c1adb1d77dc901d" dependencies = [ "aws-credential-types", "aws-http", "aws-runtime", "aws-smithy-async", - "aws-smithy-client", "aws-smithy-http", "aws-smithy-json", "aws-smithy-runtime", @@ -313,15 +309,14 @@ dependencies = [ "aws-types", "http", "regex", - "tokio-stream", "tracing", ] [[package]] name = "aws-sdk-s3" -version = "0.31.2" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c681fef332c3462634cd97fced8d1ac3cfdf790829bd7bfb4006cfba76712053" +checksum = "84022763485483ea17d417f9832d5da198bc36829b59f086c0d35ecd2ce59991" dependencies = [ "aws-credential-types", "aws-http", @@ -329,7 +324,6 @@ dependencies = [ "aws-sigv4", "aws-smithy-async", "aws-smithy-checksums", - "aws-smithy-client", "aws-smithy-eventstream", "aws-smithy-http", "aws-smithy-json", @@ -344,22 +338,42 @@ dependencies = [ "once_cell", "percent-encoding", "regex", - "tokio-stream", "tracing", "url", ] [[package]] name = "aws-sdk-sso" -version = "0.30.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "903f888ff190e64f6f5c83fb0f8d54f9c20481f1dc26359bb8896f5d99908949" +checksum = "341a5b00567d0f350025501c8fd36e1ca8055744a2d17e351f0b254f84eba48a" +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", + "regex", + "tracing", +] + +[[package]] +name = "aws-sdk-ssooidc" +version = "0.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbd4bffbd26f66269933bcd26123f2d6860769c0f769b6d3fc10eda025d287d8" dependencies = [ "aws-credential-types", "aws-http", "aws-runtime", "aws-smithy-async", - "aws-smithy-client", "aws-smithy-http", "aws-smithy-json", "aws-smithy-runtime", @@ -369,21 +383,19 @@ dependencies = [ "bytes", "http", "regex", - "tokio-stream", "tracing", ] [[package]] name = "aws-sdk-sts" -version = "0.30.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47ad6bf01afc00423d781d464220bf69fb6a674ad6629cbbcb06d88cdc2be82" +checksum = "51b1a8ae5c7098502a3e6d4130dbee1e1d3fcb8dc5d65cecab39e01d595f90f6" dependencies = [ "aws-credential-types", "aws-http", "aws-runtime", "aws-smithy-async", - "aws-smithy-client", "aws-smithy-http", "aws-smithy-json", "aws-smithy-query", @@ -399,42 +411,47 @@ dependencies = [ [[package]] name = "aws-sigv4" -version = "0.56.1" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7b28f4910bb956b7ab320b62e98096402354eca976c587d1eeccd523d9bac03" +checksum = "3347c738e0a8449020877d319cda56da74d6e8aba9fff210720fac66cae3c7f4" dependencies = [ + "aws-credential-types", "aws-smithy-eventstream", "aws-smithy-http", + "aws-smithy-runtime-api", "bytes", "form_urlencoded", "hex", "hmac", "http", + "num-bigint", "once_cell", + "p256", "percent-encoding", "regex", + "ring", "sha2", "time", "tracing", + "zeroize", ] [[package]] name = "aws-smithy-async" -version = "0.56.1" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cdb73f85528b9d19c23a496034ac53703955a59323d581c06aa27b4e4e247af" +checksum = "b4b65a284265d3eec6cc9f1daef2d0cc3b78684b712cb6c7f1d0f665456b7604" dependencies = [ "futures-util", "pin-project-lite", "tokio", - "tokio-stream", ] [[package]] name = "aws-smithy-checksums" -version = "0.56.1" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb15946af1b8d3beeff53ad991d9bff68ac22426b6d40372b958a75fa61eaed" +checksum = "d40f1d5a222ba11ac7d6b20f3668ae282970e50615fa5ee1dd8ac8180c0c1803" dependencies = [ "aws-smithy-http", "aws-smithy-types", @@ -451,38 +468,11 @@ dependencies = [ "tracing", ] -[[package]] -name = "aws-smithy-client" -version = "0.56.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c27b2756264c82f830a91cb4d2d485b2d19ad5bea476d9a966e03d27f27ba59a" -dependencies = [ - "aws-smithy-async", - "aws-smithy-http", - "aws-smithy-http-tower", - "aws-smithy-protocol-test", - "aws-smithy-types", - "bytes", - "fastrand", - "http", - "http-body", - "hyper", - "hyper-rustls", - "lazy_static", - "pin-project-lite", - "rustls", - "serde", - "serde_json", - "tokio", - "tower", - "tracing", -] - [[package]] name = "aws-smithy-eventstream" -version = "0.56.1" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "850233feab37b591b7377fd52063aa37af615687f5896807abe7f49bd4e1d25b" +checksum = "b16e7ecebc2b083a1b138868a46a343204a6097f343c4830a8b22b3a0d30013e" dependencies = [ "aws-smithy-types", "bytes", @@ -491,59 +481,42 @@ dependencies = [ [[package]] name = "aws-smithy-http" -version = "0.56.1" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54cdcf365d8eee60686885f750a34c190e513677db58bbc466c44c588abf4199" +checksum = "715aeb61fb743848d5d398ce6fb1259f5eba5e13dceec5d5064cada1a181d38d" 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.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "822de399d0ce62829a69dfa8c5cd08efdbe61a7426b953e2268f8b8b52a607bd" -dependencies = [ - "aws-smithy-http", - "aws-smithy-types", - "bytes", - "http", - "http-body", - "pin-project-lite", - "tower", "tracing", ] [[package]] name = "aws-smithy-json" -version = "0.56.1" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb1e7ab8fa7ad10c193af7ae56d2420989e9f4758bf03601a342573333ea34f" +checksum = "de21d368dcd5cab17033406ea6e7351b091164b208381de837510bd7558c0f30" dependencies = [ "aws-smithy-types", ] [[package]] name = "aws-smithy-protocol-test" -version = "0.56.1" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30600c65e5a9bedccff93c75872731ddc8a38dafbf95a18ba752227ab04f8574" +checksum = "94ed394939694a0ade77eaff154393e1f7f97e0e73533381e1003384e3173b50" dependencies = [ "assert-json-diff 1.1.0", + "aws-smithy-runtime-api", "http", "pretty_assertions", "regex", @@ -554,9 +527,9 @@ dependencies = [ [[package]] name = "aws-smithy-query" -version = "0.56.1" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28556a3902091c1f768a34f6c998028921bdab8d47d92586f363f14a4a32d047" +checksum = "9e5ace389c7e4def130bff7275647481c8d49b867909ca61d5dc9a809b3632f3" dependencies = [ "aws-smithy-types", "urlencoding", @@ -564,60 +537,76 @@ dependencies = [ [[package]] name = "aws-smithy-runtime" -version = "0.56.1" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "745e096b3553e7e0f40622aa04971ce52765af82bebdeeac53aa6fc82fe801e6" +checksum = "fb4395310662d10f1847324af5fe43e621922cba03b1aa6d26c21096e18a4e79" dependencies = [ "aws-smithy-async", - "aws-smithy-client", "aws-smithy-http", + "aws-smithy-protocol-test", "aws-smithy-runtime-api", "aws-smithy-types", "bytes", "fastrand", "http", "http-body", + "hyper", + "hyper-rustls", "once_cell", "pin-project-lite", "pin-utils", + "rustls", + "serde", + "serde_json", "tokio", "tracing", + "tracing-subscriber", ] [[package]] name = "aws-smithy-runtime-api" -version = "0.56.1" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93d0ae0c9cfd57944e9711ea610b48a963fb174a53aabacc08c5794a594b1d02" +checksum = "30e27594c06f5b36e97d18ef26ed693f1d4c7167b9bbb544b3a9bb653f9f7035" 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.1" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d90dbc8da2f6be461fa3c1906b20af8f79d14968fe47f2b7d29d086f62a51728" +checksum = "5d36f1723ed61e82094498e7283510fe21484b73c215c33874c81a84411b5bdc" dependencies = [ "base64-simd", + "bytes", + "bytes-utils", + "futures-core", + "http", + "http-body", "itoa 1.0.9", "num-integer", + "pin-project-lite", + "pin-utils", "ryu", "serde", "time", + "tokio", + "tokio-util", ] [[package]] name = "aws-smithy-types-convert" -version = "0.56.1" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4aec73ec67166b7bc64804aba0cf38808f5b2aecf05d353cad2e855aabce431a" +checksum = "30caf9501eefd09956d3faee2d6527067c94acd97e958d384a78c0b8e8b243d0" dependencies = [ "aws-smithy-types", "chrono", @@ -625,23 +614,22 @@ dependencies = [ [[package]] name = "aws-smithy-xml" -version = "0.56.1" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01d2dedcdd8023043716cfeeb3c6c59f2d447fce365d8e194838891794b23b6" +checksum = "68225c8d3e3e6c565a3cf764aa82440837ef15c33d1dd7205e15715444e4b4ad" dependencies = [ "xmlparser", ] [[package]] name = "aws-types" -version = "0.56.1" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85aa0451bf8af1bf22a4f028d5d28054507a14be43cb8ac0597a8471fba9edfe" +checksum = "acdc27aac60f715bab25f5d758ba5651b80aae791c48e9871ffe298683f00a2b" dependencies = [ "aws-credential-types", "aws-smithy-async", - "aws-smithy-client", - "aws-smithy-http", + "aws-smithy-runtime-api", "aws-smithy-types", "http", "rustc_version", @@ -734,6 +722,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.13.1" @@ -1296,6 +1290,18 @@ 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-common" version = "0.1.6" @@ -1421,6 +1427,16 @@ dependencies = [ "uuid", ] +[[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 = "der" version = "0.7.8" @@ -1526,8 +1542,9 @@ dependencies = [ "aws-config", "aws-sdk-cloudfront", "aws-sdk-s3", - "aws-smithy-client", "aws-smithy-http", + "aws-smithy-runtime", + "aws-smithy-types", "aws-smithy-types-convert", "axum", "axum-extra", @@ -1606,7 +1623,7 @@ dependencies = [ "tower-http", "tower-service", "tracing", - "tracing-log", + "tracing-log 0.2.0", "tracing-subscriber", "url", "uuid", @@ -1651,6 +1668,18 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +[[package]] +name = "ecdsa" +version = "0.14.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" +dependencies = [ + "der 0.6.1", + "elliptic-curve", + "rfc6979", + "signature 1.6.4", +] + [[package]] name = "either" version = "1.9.0" @@ -1660,6 +1689,26 @@ dependencies = [ "serde", ] +[[package]] +name = "elliptic-curve" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" +dependencies = [ + "base16ct", + "crypto-bigint", + "der 0.6.1", + "digest", + "ff", + "generic-array", + "group", + "pkcs8 0.9.0", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", +] + [[package]] name = "encoding_rs" version = "0.8.33" @@ -1778,6 +1827,16 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +[[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.22" @@ -3163,6 +3222,17 @@ dependencies = [ "phf 0.10.1", ] +[[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.21" @@ -4027,6 +4097,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "num-bigint" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-bigint-dig" version = "0.8.4" @@ -4207,6 +4288,17 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +[[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.12.1" @@ -4495,9 +4587,19 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" dependencies = [ - "der", - "pkcs8", - "spki", + "der 0.7.8", + "pkcs8 0.10.2", + "spki 0.7.2", +] + +[[package]] +name = "pkcs8" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +dependencies = [ + "der 0.6.1", + "spki 0.6.0", ] [[package]] @@ -4506,8 +4608,8 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der", - "spki", + "der 0.7.8", + "spki 0.7.2", ] [[package]] @@ -4967,18 +5069,14 @@ dependencies = [ ] [[package]] -name = "ring" -version = "0.16.20" +name = "rfc6979" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" dependencies = [ - "cc", - "libc", - "once_cell", - "spin 0.5.2", - "untrusted 0.7.1", - "web-sys", - "winapi", + "crypto-bigint", + "hmac", + "zeroize", ] [[package]] @@ -4991,7 +5089,7 @@ dependencies = [ "getrandom 0.2.10", "libc", "spin 0.9.8", - "untrusted 0.9.0", + "untrusted", "windows-sys 0.48.0", ] @@ -5016,10 +5114,10 @@ dependencies = [ "num-integer", "num-traits", "pkcs1", - "pkcs8", + "pkcs8 0.10.2", "rand_core 0.6.4", - "signature", - "spki", + "signature 2.1.0", + "spki 0.7.2", "subtle", "zeroize", ] @@ -5093,7 +5191,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "446e14c5cda4f3f30fe71863c34ec70f5ac79d6087097ad0bb433e1be5edf04c" dependencies = [ "log", - "ring 0.17.5", + "ring", "rustls-webpki", "sct", ] @@ -5125,8 +5223,8 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.5", - "untrusted 0.9.0", + "ring", + "untrusted", ] [[package]] @@ -5238,8 +5336,22 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.5", - "untrusted 0.9.0", + "ring", + "untrusted", +] + +[[package]] +name = "sec1" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +dependencies = [ + "base16ct", + "der 0.6.1", + "generic-array", + "pkcs8 0.9.0", + "subtle", + "zeroize", ] [[package]] @@ -5555,6 +5667,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 = "signature" version = "2.1.0" @@ -5672,6 +5794,16 @@ dependencies = [ "lock_api", ] +[[package]] +name = "spki" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +dependencies = [ + "base64ct", + "der 0.6.1", +] + [[package]] name = "spki" version = "0.7.2" @@ -5679,7 +5811,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" dependencies = [ "base64ct", - "der", + "der 0.7.8", ] [[package]] @@ -6476,6 +6608,17 @@ dependencies = [ "valuable", ] +[[package]] +name = "tracing-log" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + [[package]] name = "tracing-log" version = "0.2.0" @@ -6487,6 +6630,16 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-serde" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +dependencies = [ + "serde", + "tracing-core", +] + [[package]] name = "tracing-subscriber" version = "0.3.17" @@ -6497,10 +6650,15 @@ dependencies = [ "nu-ansi-term", "once_cell", "regex", + "serde", + "serde_json", "sharded-slab", + "smallvec", "thread_local", "tracing", "tracing-core", + "tracing-log 0.1.4", + "tracing-serde", ] [[package]] @@ -6655,12 +6813,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - [[package]] name = "untrusted" version = "0.9.0" diff --git a/Cargo.toml b/Cargo.toml index e1568ba80..e7ed6d6f2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -76,10 +76,10 @@ moka = { version ="0.12.0", default-features = false, features = ["sync"]} # Async tokio = { version = "1.0", features = ["rt-multi-thread", "signal", "macros"] } futures-util = "0.3.5" -aws-config = "0.56.0" -aws-sdk-s3 = "0.31.0" -aws-sdk-cloudfront = "0.31.0" -aws-smithy-types-convert = { version = "0.56.0", features = ["convert-chrono"] } +aws-config = "0.57.1" +aws-sdk-s3 = "0.35.0" +aws-sdk-cloudfront = "0.35.0" +aws-smithy-types-convert = { version = "0.57.1", features = ["convert-chrono"] } http = "0.2.6" uuid = "1.1.2" @@ -125,8 +125,9 @@ kuchikiki = "0.8" rand = "0.8" mockito = "1.0.2" test-case = "3.0.0" -aws-smithy-client = { version = "0.56.0", features = ["test-util"]} -aws-smithy-http = "0.56.0" +aws-smithy-types = "0.57.1" +aws-smithy-runtime = {version = "0.57.1", features = ["client", "test-util"]} +aws-smithy-http = "0.57.1" indoc = "2.0.0" [build-dependencies] diff --git a/src/cdn.rs b/src/cdn.rs index e055ece4d..445a68081 100644 --- a/src/cdn.rs +++ b/src/cdn.rs @@ -236,7 +236,7 @@ impl CdnBackend { let patterns = invalidation .invalidation_batch() .and_then(|batch| batch.paths()) - .and_then(|paths| paths.items()) + .map(|paths| paths.items()) .unwrap_or_default() .to_vec(); @@ -251,21 +251,18 @@ impl CdnBackend { distribution_id: distribution_id.to_owned(), invalidation_id: invalidation_id.to_owned(), path_patterns: patterns, - completed: invalidation - .status() - .map(|status| match status { - "InProgress" => false, - "Completed" => true, - _ => { - report_error(&anyhow!( - "got unknown cloudfront invalidation status: {} in {:?}", - status, - invalidation - )); - true - } - }) - .unwrap_or(true), + completed: match invalidation.status() { + "InProgress" => false, + "Completed" => true, + _ => { + report_error(&anyhow!( + "got unknown cloudfront invalidation status: {} in {:?}", + invalidation.status(), + invalidation + )); + true + } + }, })) } @@ -287,10 +284,12 @@ impl CdnBackend { Paths::builder() .quantity(path_patterns.len().try_into().unwrap()) .set_items(Some(path_patterns)) - .build(), + .build() + .context("could not build path items")?, ) .caller_reference(caller_reference) - .build(), + .build() + .context("could not build invalidation batch")?, ) .send() .await? @@ -299,7 +298,6 @@ impl CdnBackend { anyhow!("missing invalidation information in create-invalidation result") })? .id() - .ok_or_else(|| anyhow!("missing invalidation ID in create-invalidation result"))? .to_owned()) } } @@ -315,11 +313,11 @@ pub(crate) fn handle_queued_invalidation_requests( let mut active_invalidations = Vec::new(); for row in conn.query( - "SELECT - DISTINCT cdn_reference + "SELECT + DISTINCT cdn_reference FROM cdn_invalidation_queue - WHERE - cdn_reference IS NOT NULL AND + WHERE + cdn_reference IS NOT NULL AND cdn_distribution_id = $1 ", &[&distribution_id], @@ -350,9 +348,9 @@ pub(crate) fn handle_queued_invalidation_requests( let now = Utc::now(); for row in conn.query( "DELETE FROM cdn_invalidation_queue - WHERE - cdn_distribution_id = $1 AND - created_in_cdn IS NOT NULL AND + WHERE + cdn_distribution_id = $1 AND + created_in_cdn IS NOT NULL AND NOT (cdn_reference = ANY($2)) RETURNING created_in_cdn ", @@ -391,7 +389,7 @@ pub(crate) fn handle_queued_invalidation_requests( for row in transaction.query( "SELECT id, path_pattern, queued - FROM cdn_invalidation_queue + FROM cdn_invalidation_queue WHERE cdn_distribution_id = $1 AND created_in_cdn IS NULL ORDER BY queued, id LIMIT $2 @@ -424,11 +422,11 @@ pub(crate) fn handle_queued_invalidation_requests( { Ok(invalidation) => { transaction.execute( - "UPDATE cdn_invalidation_queue - SET + "UPDATE cdn_invalidation_queue + SET created_in_cdn = CURRENT_TIMESTAMP, cdn_reference = $1 - WHERE + WHERE id = ANY($2)", &[&invalidation.invalidation_id, &queued_entry_ids], )?; @@ -495,13 +493,13 @@ pub(crate) fn queued_or_active_crate_invalidations( .query( r#" SELECT - crate, - cdn_distribution_id, - path_pattern, + crate, + cdn_distribution_id, + path_pattern, queued, created_in_cdn, cdn_reference - FROM cdn_invalidation_queue + FROM cdn_invalidation_queue ORDER BY queued, id"#, &[], )? @@ -535,9 +533,9 @@ pub(crate) fn queued_or_active_crate_invalidation_count_by_distribution( conn.query( r#" SELECT - cdn_distribution_id, + cdn_distribution_id, count(*) - FROM cdn_invalidation_queue + FROM cdn_invalidation_queue GROUP BY cdn_distribution_id"#, &[], )? @@ -557,10 +555,8 @@ mod tests { config::{Credentials, Region}, Client, Config, }; - use aws_smithy_client::{ - erase::DynConnector, http_connector::HttpConnector, test_connection::TestConnection, - }; - use aws_smithy_http::body::SdkBody; + use aws_smithy_runtime::client::http::test_util::{ReplayEvent, StaticReplayClient}; + use aws_smithy_types::body::SdkBody; fn active_invalidations(cdn: &CdnBackend, distribution_id: &str) -> Vec { let CdnBackend::Dummy { @@ -592,7 +588,7 @@ mod tests { crate, cdn_distribution_id, path_pattern, queued, created_in_cdn, cdn_reference ) VALUES ( 'dummy', - $1, + $1, '/doesnt_matter', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, @@ -941,9 +937,7 @@ mod tests { }); } - async fn get_mock_config( - http_connector: impl Into, - ) -> aws_sdk_cloudfront::Config { + async fn get_mock_config(http_client: StaticReplayClient) -> aws_sdk_cloudfront::Config { let cfg = aws_config::from_env() .region(Region::new("eu-central-1")) .credentials_provider(Credentials::new( @@ -953,7 +947,7 @@ mod tests { None, "dummy", )) - .http_connector(http_connector) + .http_client(http_client) .load() .await; @@ -962,7 +956,7 @@ mod tests { #[tokio::test] async fn invalidate_path() { - let conn = TestConnection::new(vec![( + let conn = StaticReplayClient::new(vec![ReplayEvent::new( http::Request::builder() .header("content-type", "application/xml") .uri(http::uri::Uri::from_static( @@ -995,7 +989,7 @@ mod tests { )) .unwrap(), )]); - let client = Client::from_conf(get_mock_config(DynConnector::new(conn.clone())).await); + let client = Client::from_conf(get_mock_config(conn.clone()).await); CdnBackend::create_cloudfront_invalidation( &client, @@ -1006,13 +1000,13 @@ mod tests { .await .expect("error creating invalidation"); - assert_eq!(conn.requests().len(), 1); + assert_eq!(conn.actual_requests().count(), 1); conn.assert_requests_match(&[]); } #[tokio::test] async fn get_invalidation_info_doesnt_exist() { - let conn = TestConnection::new(vec![( + let conn = StaticReplayClient::new(vec![ReplayEvent::new( http::Request::builder() .header("content-type", "application/xml") .uri(http::uri::Uri::from_static( @@ -1025,7 +1019,7 @@ mod tests { .body(SdkBody::empty()) .unwrap(), )]); - let client = Client::from_conf(get_mock_config(DynConnector::new(conn.clone())).await); + let client = Client::from_conf(get_mock_config(conn.clone()).await); assert!(CdnBackend::get_cloudfront_invalidation_status( &client, @@ -1039,7 +1033,7 @@ mod tests { #[tokio::test] async fn get_invalidation_info_completed() { - let conn = TestConnection::new(vec![( + let conn = StaticReplayClient::new(vec![ReplayEvent::new( http::Request::builder() .header("content-type", "application/xml") .uri(http::uri::Uri::from_static( @@ -1064,7 +1058,7 @@ mod tests { "# )).unwrap(), )]); - let client = Client::from_conf(get_mock_config(DynConnector::new(conn.clone())).await); + let client = Client::from_conf(get_mock_config(conn.clone()).await); assert_eq!( CdnBackend::get_cloudfront_invalidation_status( diff --git a/src/storage/s3.rs b/src/storage/s3.rs index d8f5bb663..51e49d6e3 100644 --- a/src/storage/s3.rs +++ b/src/storage/s3.rs @@ -1,6 +1,6 @@ use super::{Blob, FileRange}; use crate::{Config, InstanceMetrics}; -use anyhow::Error; +use anyhow::{Context as _, Error}; use aws_sdk_s3::{ config::{retry::RetryConfig, Region}, error::SdkError, @@ -97,12 +97,9 @@ impl S3Backend { { Ok(tags) => Ok(tags .tag_set() - .map(|tags| { - tags.iter() - .filter(|tag| tag.key() == Some(PUBLIC_ACCESS_TAG)) - .any(|tag| tag.value() == Some(PUBLIC_ACCESS_VALUE)) - }) - .unwrap_or(false)), + .iter() + .filter(|tag| tag.key() == PUBLIC_ACCESS_TAG) + .any(|tag| tag.value() == PUBLIC_ACCESS_VALUE)), Err(SdkError::ServiceError(err)) => { if err.raw().status() == http::StatusCode::NOT_FOUND { Err(super::PathNotFoundError.into()) @@ -126,11 +123,16 @@ impl S3Backend { Tag::builder() .key(PUBLIC_ACCESS_TAG) .value(PUBLIC_ACCESS_VALUE) - .build(), + .build() + .context("could not build tag")?, ) .build() + .context("could not build tags")? } else { - Tagging::builder().build() + Tagging::builder() + .set_tag_set(Some(vec![])) + .build() + .context("could not build tags")? }) .send() .await @@ -259,11 +261,12 @@ impl S3Backend { .into_iter() .filter_map(|obj| { obj.key() - .map(|k| ObjectIdentifier::builder().key(k).build()) + .and_then(|k| ObjectIdentifier::builder().key(k).build().ok()) }) .collect(), )) - .build(); + .build() + .context("could not build delete request")?; let resp = self .client