From bb1153394b7c3fcc9224f5b558f10b4c2714660b Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Wed, 23 Jul 2025 12:30:20 -0400 Subject: [PATCH 01/43] Wip - add path for authentication using MongoDB URI behind aws-sdk-auth feature flag --- Cargo.lock | 619 ++++++++++++++++++++++++++++++++++++++++- Cargo.toml | 7 + src/client/auth/aws.rs | 60 ++++ 3 files changed, 679 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0c5539fda..29c6cf7af 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -137,6 +137,353 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +[[package]] +name = "aws-config" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebd9b83179adf8998576317ce47785948bcff399ec5b15f4dfbdedd44ddf5b92" +dependencies = [ + "aws-credential-types", + "aws-runtime", + "aws-sdk-sso", + "aws-sdk-ssooidc", + "aws-sdk-sts", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "fastrand", + "hex", + "http 1.3.1", + "ring", + "time", + "tokio", + "tracing", + "url", + "zeroize", +] + +[[package]] +name = "aws-credential-types" +version = "1.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b68c2194a190e1efc999612792e25b1ab3abfefe4306494efaaabc25933c0cbe" +dependencies = [ + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", + "zeroize", +] + +[[package]] +name = "aws-lc-rs" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08b5d4e069cbc868041a64bd68dc8cb39a0d79585cd6c5a24caa8c2d622121be" +dependencies = [ + "aws-lc-sys", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbfd150b5dbdb988bcc8fb1fe787eb6b7ee6180ca24da683b61ea5405f3d43ff" +dependencies = [ + "bindgen", + "cc", + "cmake", + "dunce", + "fs_extra", +] + +[[package]] +name = "aws-runtime" +version = "1.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2090e664216c78e766b6bac10fe74d2f451c02441d43484cd76ac9a295075f7" +dependencies = [ + "aws-credential-types", + "aws-sigv4", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "fastrand", + "http 0.2.12", + "http-body 0.4.6", + "percent-encoding", + "pin-project-lite", + "tracing", + "uuid", +] + +[[package]] +name = "aws-sdk-sso" +version = "1.76.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64bf26698dd6d238ef1486bdda46f22a589dc813368ba868dc3d94c8d27b56ba" +dependencies = [ + "aws-credential-types", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "fastrand", + "http 0.2.12", + "regex-lite", + "tracing", +] + +[[package]] +name = "aws-sdk-ssooidc" +version = "1.77.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cd07ed1edd939fae854a22054299ae3576500f4e0fadc560ca44f9c6ea1664" +dependencies = [ + "aws-credential-types", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "fastrand", + "http 0.2.12", + "regex-lite", + "tracing", +] + +[[package]] +name = "aws-sdk-sts" +version = "1.78.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37f7766d2344f56d10d12f3c32993da36d78217f32594fe4fb8e57a538c1cdea" +dependencies = [ + "aws-credential-types", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-query", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-smithy-xml", + "aws-types", + "fastrand", + "http 0.2.12", + "regex-lite", + "tracing", +] + +[[package]] +name = "aws-sigv4" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfb9021f581b71870a17eac25b52335b82211cdc092e02b6876b2bcefa61666" +dependencies = [ + "aws-credential-types", + "aws-smithy-http", + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "form_urlencoded", + "hex", + "hmac", + "http 0.2.12", + "http 1.3.1", + "percent-encoding", + "sha2", + "time", + "tracing", +] + +[[package]] +name = "aws-smithy-async" +version = "1.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e190749ea56f8c42bf15dd76c65e14f8f765233e6df9b0506d9d934ebef867c" +dependencies = [ + "futures-util", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "aws-smithy-http" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43c82ba4cab184ea61f6edaafc1072aad3c2a17dcf4c0fce19ac5694b90d8b5f" +dependencies = [ + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "bytes-utils", + "futures-core", + "http 0.2.12", + "http 1.3.1", + "http-body 0.4.6", + "percent-encoding", + "pin-project-lite", + "pin-utils", + "tracing", +] + +[[package]] +name = "aws-smithy-http-client" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f108f1ca850f3feef3009bdcc977be201bca9a91058864d9de0684e64514bee0" +dependencies = [ + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", + "h2", + "http 1.3.1", + "hyper 1.6.0", + "hyper-rustls", + "hyper-util", + "pin-project-lite", + "rustls", + "rustls-native-certs", + "rustls-pki-types", + "tokio", + "tower 0.5.2", + "tracing", +] + +[[package]] +name = "aws-smithy-json" +version = "0.61.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a16e040799d29c17412943bdbf488fd75db04112d0c0d4b9290bacf5ae0014b9" +dependencies = [ + "aws-smithy-types", +] + +[[package]] +name = "aws-smithy-observability" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9364d5989ac4dd918e5cc4c4bdcc61c9be17dcd2586ea7f69e348fc7c6cab393" +dependencies = [ + "aws-smithy-runtime-api", +] + +[[package]] +name = "aws-smithy-query" +version = "0.60.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2fbd61ceb3fe8a1cb7352e42689cec5335833cd9f94103a61e98f9bb61c64bb" +dependencies = [ + "aws-smithy-types", + "urlencoding", +] + +[[package]] +name = "aws-smithy-runtime" +version = "1.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "660f70d9d8af6876b4c9aa8dcb0dbaf0f89b04ee9a4455bea1b4ba03b15f26f6" +dependencies = [ + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-http-client", + "aws-smithy-observability", + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "fastrand", + "http 0.2.12", + "http 1.3.1", + "http-body 0.4.6", + "http-body 1.0.1", + "pin-project-lite", + "pin-utils", + "tokio", + "tracing", +] + +[[package]] +name = "aws-smithy-runtime-api" +version = "1.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38280ac228bc479f347fcfccf4bf4d22d68f3bb4629685cb591cabd856567bbc" +dependencies = [ + "aws-smithy-async", + "aws-smithy-types", + "bytes", + "http 0.2.12", + "http 1.3.1", + "pin-project-lite", + "tokio", + "tracing", + "zeroize", +] + +[[package]] +name = "aws-smithy-types" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d498595448e43de7f4296b7b7a18a8a02c61ec9349128c80a368f7c3b4ab11a8" +dependencies = [ + "base64-simd", + "bytes", + "bytes-utils", + "http 0.2.12", + "http 1.3.1", + "http-body 0.4.6", + "http-body 1.0.1", + "http-body-util", + "itoa", + "num-integer", + "pin-project-lite", + "pin-utils", + "ryu", + "serde", + "time", +] + +[[package]] +name = "aws-smithy-xml" +version = "0.60.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db87b96cb1b16c024980f133968d52882ca0daaee3a086c6decc500f6c99728" +dependencies = [ + "xmlparser", +] + +[[package]] +name = "aws-types" +version = "1.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a322fec39e4df22777ed3ad8ea868ac2f94cd15e1a55f6ee8d8d6305057689a" +dependencies = [ + "aws-credential-types", + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", + "rustc_version", + "tracing", +] + [[package]] name = "backtrace" version = "0.3.75" @@ -164,12 +511,45 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64-simd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339abbe78e73178762e23bea9dfd08e697eb3f3301cd4be981c0f78ba5859195" +dependencies = [ + "outref", + "vsimd", +] + [[package]] name = "base64ct" version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" +[[package]] +name = "bindgen" +version = "0.69.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" +dependencies = [ + "bitflags 2.9.0", + "cexpr", + "clang-sys", + "itertools", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash 1.1.0", + "shlex", + "syn 2.0.101", + "which", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -270,6 +650,16 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +[[package]] +name = "bytes-utils" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dafe3a8757b027e2be6e4e5601ed563c55989fcf1546e933c66c8eb3a058d35" +dependencies = [ + "bytes", + "either", +] + [[package]] name = "cbc" version = "0.1.2" @@ -290,6 +680,15 @@ dependencies = [ "shlex", ] +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + [[package]] name = "cfg-if" version = "1.0.1" @@ -325,6 +724,26 @@ dependencies = [ "inout", ] +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "cmake" +version = "0.1.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0" +dependencies = [ + "cc", +] + [[package]] name = "const-oid" version = "0.9.6" @@ -367,6 +786,16 @@ dependencies = [ "libc", ] +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -575,6 +1004,12 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + [[package]] name = "dyn-clone" version = "1.0.19" @@ -670,6 +1105,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "function_name" version = "0.2.3" @@ -828,6 +1269,12 @@ version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" +[[package]] +name = "glob" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" + [[package]] name = "h2" version = "0.4.10" @@ -1061,6 +1508,7 @@ dependencies = [ "hyper 1.6.0", "hyper-util", "rustls", + "rustls-native-certs", "rustls-pki-types", "tokio", "tokio-rustls", @@ -1307,6 +1755,15 @@ dependencies = [ "serde", ] +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.15" @@ -1371,18 +1828,40 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + [[package]] name = "libc" version = "0.2.174" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" +[[package]] +name = "libloading" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" +dependencies = [ + "cfg-if", + "windows-targets 0.52.6", +] + [[package]] name = "linked-hash-map" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + [[package]] name = "linux-raw-sys" version = "0.9.4" @@ -1502,6 +1981,12 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + [[package]] name = "miniz_oxide" version = "0.8.9" @@ -1546,6 +2031,9 @@ dependencies = [ "anyhow", "approx", "async-trait", + "aws-config", + "aws-credential-types", + "aws-types", "backtrace", "base64 0.13.1", "bitflags 1.3.2", @@ -1639,7 +2127,7 @@ dependencies = [ "openssl-probe", "openssl-sys", "schannel", - "security-framework", + "security-framework 2.11.1", "security-framework-sys", "tempfile", ] @@ -1662,6 +2150,16 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -1678,6 +2176,15 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.19" @@ -1756,6 +2263,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "outref" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a80800c0488c3a21695ea981a54918fbb37abf04f4d0720c453632255e2ff0e" + [[package]] name = "overload" version = "0.1.1" @@ -1921,6 +2434,16 @@ dependencies = [ "yansi", ] +[[package]] +name = "prettyplease" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6837b9e10d61f45f987d50808f83d1ee3d206c66acf650c3e4ae2e1f6ddedf55" +dependencies = [ + "proc-macro2", + "syn 2.0.101", +] + [[package]] name = "proc-macro-crate" version = "0.1.5" @@ -1950,7 +2473,7 @@ dependencies = [ "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash", + "rustc-hash 2.1.1", "rustls", "socket2", "thiserror 2.0.12", @@ -1970,7 +2493,7 @@ dependencies = [ "lru-slab", "rand 0.9.1", "ring", - "rustc-hash", + "rustc-hash 2.1.1", "rustls", "rustls-pki-types", "slab", @@ -2146,6 +2669,12 @@ dependencies = [ "regex-syntax", ] +[[package]] +name = "regex-lite" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" + [[package]] name = "regex-syntax" version = "0.8.5" @@ -2222,6 +2751,12 @@ version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + [[package]] name = "rustc-hash" version = "2.1.1" @@ -2247,6 +2782,19 @@ dependencies = [ "semver", ] +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags 2.9.0", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] + [[package]] name = "rustix" version = "1.0.7" @@ -2256,7 +2804,7 @@ dependencies = [ "bitflags 2.9.0", "errno", "libc", - "linux-raw-sys", + "linux-raw-sys 0.9.4", "windows-sys 0.59.0", ] @@ -2266,6 +2814,7 @@ version = "0.23.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7160e3e10bf4535308537f3c4e1641468cd0e485175d6163087c0393c7d46643" dependencies = [ + "aws-lc-rs", "log", "once_cell", "ring", @@ -2275,6 +2824,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "rustls-native-certs" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3" +dependencies = [ + "openssl-probe", + "rustls-pki-types", + "schannel", + "security-framework 3.2.0", +] + [[package]] name = "rustls-pki-types" version = "1.12.0" @@ -2291,6 +2852,7 @@ version = "0.103.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4a72fe2bcf7a6ac6fd7d0b9e5cb68aeb7d4c0a0271730218b3e92d43b4eb435" dependencies = [ + "aws-lc-rs", "ring", "rustls-pki-types", "untrusted", @@ -2362,7 +2924,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ "bitflags 2.9.0", - "core-foundation", + "core-foundation 0.9.4", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" +dependencies = [ + "bitflags 2.9.0", + "core-foundation 0.10.1", "core-foundation-sys", "libc", "security-framework-sys", @@ -2667,7 +3242,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ "bitflags 2.9.0", - "core-foundation", + "core-foundation 0.9.4", "system-configuration-sys", ] @@ -2702,7 +3277,7 @@ dependencies = [ "fastrand", "getrandom 0.3.2", "once_cell", - "rustix", + "rustix 1.0.7", "windows-sys 0.59.0", ] @@ -3108,6 +3683,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "urlencoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" + [[package]] name = "utf8_iter" version = "1.0.4" @@ -3144,6 +3725,12 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "vsimd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" + [[package]] name = "want" version = "0.3.1" @@ -3277,6 +3864,18 @@ dependencies = [ "rustls-pki-types", ] +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix 0.38.44", +] + [[package]] name = "widestring" version = "1.2.0" @@ -3557,6 +4156,12 @@ dependencies = [ "tap", ] +[[package]] +name = "xmlparser" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4" + [[package]] name = "yansi" version = "1.0.1" diff --git a/Cargo.toml b/Cargo.toml index c8e8d8733..d555314ce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,6 +44,10 @@ cert-key-password = ["dep:pem", "dep:pkcs8"] # This can only be used with the tokio-runtime feature flag. aws-auth = ["dep:reqwest"] +# Enable support AWS SDK for authentication. +# This can only be used with the tokio-runtime and aws-auth feature flags. +aws-sdk-auth = ["dep:reqwest"] + # Enable support for on-demand Azure KMS credentials. # This can only be used with the tokio-runtime feature flag. azure-kms = ["dep:reqwest"] @@ -120,6 +124,9 @@ webpki-roots = "0.26" zstd = { version = "0.11.2", optional = true } macro_magic = "0.5.1" rustversion = "1.0.20" +aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } +aws-credential-types = "1.2.4" +aws-types = "1.3.7" [dependencies.bson2] git = "https://github.com/mongodb/bson-rust" diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index cb9a938b5..a8a4c189b 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -1,5 +1,9 @@ use std::{fs::File, io::Read, time::Duration}; +// Note: Uncomment the following lines for AWS SDK for authentication +// use aws_config::BehaviorVersion; +// use aws_credential_types::provider::ProvideCredentials; +// use aws_types::sdk_config::SharedCredentialsProvider; use chrono::{offset::Utc, DateTime}; use hmac::Hmac; use once_cell::sync::Lazy; @@ -90,6 +94,48 @@ async fn authenticate_stream_inner( let server_first = ServerFirst::parse(server_first_response.auth_response_body(MECH_NAME)?)?; server_first.validate(&nonce)?; + #[cfg(feature = "aws-sdk-auth")] + let aws_credential = if let (Some(access_key), Some(secret_key)) = + (&credential.username, &credential.password) + { + // Look for credentials in the MongoDB URI + AwsCredential::from_sdk_creds( + access_key.clone(), + secret_key.clone(), + credential + .mechanism_properties + .as_ref() + .and_then(|mp| mp.get_str("AWS_SESSION_TOKEN").ok()) + .map(str::to_owned), + None, + ) + } else { + // If credentials are not provided in the URI, use the AWS SDK to load + // Note: Untested but compiles + // let creds = aws_config::load_defaults(BehaviorVersion::latest()) + // .await + // .credentials_provider() + // .expect("no credential provider configured") + // .provide_credentials() + // .await + // .map_err(|e| { + // Error::authentication_error(MECH_NAME, &format!("failed to get creds: {e}")) + // })?; + // AwsCredential::from_sdk_creds( + // creds.access_key_id().to_string(), + // creds.secret_access_key().to_string(), + // creds.session_token().map(|s| s.to_string()), + // None, + // ) + + // For now, throw an error + return Err(Error::authentication_error( + MECH_NAME, + "Credentials must be provided in the MongoDB URI - methods supported by the AWS SDK \ + are not yet tested", + )); + }; + #[cfg(not(feature = "aws-sdk-auth"))] let aws_credential = { // Limit scope of this variable to avoid holding onto the lock for the duration of // authenticate_stream. @@ -246,6 +292,20 @@ impl AwsCredential { } } + fn from_sdk_creds( + access_key_id: String, + secret_access_key: String, + session_token: Option, + expiration: Option, + ) -> Self { + Self { + access_key_id, + secret_access_key, + session_token, + expiration, + } + } + async fn get_from_assume_role_with_web_identity_request( token_file: String, role_arn: String, From 3d78f80e9621bd9c237b9e250e07280d3ce85dda Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Wed, 23 Jul 2025 13:58:50 -0400 Subject: [PATCH 02/43] Get auth credentials through env variables using AWS SDK --- Cargo.lock | 8 ++++---- Cargo.toml | 14 ++++++++++++-- src/client/auth/aws.rs | 44 +++++++++++++++++------------------------- 3 files changed, 34 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 29c6cf7af..416f13114 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -181,9 +181,9 @@ dependencies = [ [[package]] name = "aws-lc-rs" -version = "1.13.2" +version = "1.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08b5d4e069cbc868041a64bd68dc8cb39a0d79585cd6c5a24caa8c2d622121be" +checksum = "5c953fe1ba023e6b7730c0d4b031d06f267f23a46167dcbd40316644b10a17ba" dependencies = [ "aws-lc-sys", "zeroize", @@ -1847,7 +1847,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.48.5", ] [[package]] @@ -2792,7 +2792,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index d555314ce..e62dc9cbf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,7 @@ aws-auth = ["dep:reqwest"] # Enable support AWS SDK for authentication. # This can only be used with the tokio-runtime and aws-auth feature flags. -aws-sdk-auth = ["dep:reqwest"] +aws-sdk-auth = ["dep:reqwest", "aws-config"] # Enable support for on-demand Azure KMS credentials. # This can only be used with the tokio-runtime feature flag. @@ -124,10 +124,20 @@ webpki-roots = "0.26" zstd = { version = "0.11.2", optional = true } macro_magic = "0.5.1" rustversion = "1.0.20" -aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } aws-credential-types = "1.2.4" aws-types = "1.3.7" +[dependencies.aws-config] +version = "1.8.2" +optional = true +default-features = false +features = [ + "behavior-version-latest", + "sso", + "default-https-client", + "rt-tokio" +] + [dependencies.bson2] git = "https://github.com/mongodb/bson-rust" branch = "2.15.x" diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index a8a4c189b..bca3945fa 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -1,9 +1,9 @@ use std::{fs::File, io::Read, time::Duration}; // Note: Uncomment the following lines for AWS SDK for authentication -// use aws_config::BehaviorVersion; -// use aws_credential_types::provider::ProvideCredentials; -// use aws_types::sdk_config::SharedCredentialsProvider; +use aws_config::BehaviorVersion; +use aws_credential_types::provider::ProvideCredentials; +use aws_types::sdk_config::SharedCredentialsProvider; use chrono::{offset::Utc, DateTime}; use hmac::Hmac; use once_cell::sync::Lazy; @@ -111,29 +111,21 @@ async fn authenticate_stream_inner( ) } else { // If credentials are not provided in the URI, use the AWS SDK to load - // Note: Untested but compiles - // let creds = aws_config::load_defaults(BehaviorVersion::latest()) - // .await - // .credentials_provider() - // .expect("no credential provider configured") - // .provide_credentials() - // .await - // .map_err(|e| { - // Error::authentication_error(MECH_NAME, &format!("failed to get creds: {e}")) - // })?; - // AwsCredential::from_sdk_creds( - // creds.access_key_id().to_string(), - // creds.secret_access_key().to_string(), - // creds.session_token().map(|s| s.to_string()), - // None, - // ) - - // For now, throw an error - return Err(Error::authentication_error( - MECH_NAME, - "Credentials must be provided in the MongoDB URI - methods supported by the AWS SDK \ - are not yet tested", - )); + let creds = aws_config::load_defaults(BehaviorVersion::latest()) + .await + .credentials_provider() + .expect("no credential provider configured") + .provide_credentials() + .await + .map_err(|e| { + Error::authentication_error(MECH_NAME, &format!("failed to get creds: {e}")) + })?; + AwsCredential::from_sdk_creds( + creds.access_key_id().to_string(), + creds.secret_access_key().to_string(), + creds.session_token().map(|s| s.to_string()), + None, + ) }; #[cfg(not(feature = "aws-sdk-auth"))] let aws_credential = { From 1f4c5903ac8fda0a6280f42d8e8e4bcf810691d4 Mon Sep 17 00:00:00 2001 From: Isabel Atkinson Date: Wed, 23 Jul 2025 12:12:21 -0600 Subject: [PATCH 03/43] test URI/environment variable credentials --- .evergreen/config.yml | 134 +++++++++++++++++++++--------------------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index df014fe12..69404fde0 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -222,7 +222,7 @@ buildvariants: - name: aws-auth display_name: "AWS Authentication" - patchable: false + # patchable: false run_on: - ubuntu2004-small expansions: @@ -892,16 +892,16 @@ tasks: - func: "add aws auth variables to file" - func: "run aws auth test with regular aws credentials" - - name: test-aws-auth-assume-role-credentials - tags: [aws-auth] - commands: - - func: "bootstrap mongo-orchestration" - vars: - ORCHESTRATION_FILE: auth-aws.json - MONGODB_VERSION: rapid - TOPOLOGY: server - - func: "add aws auth variables to file" - - func: "run aws auth test with assume role credentials" + # - name: test-aws-auth-assume-role-credentials + # tags: [aws-auth] + # commands: + # - func: "bootstrap mongo-orchestration" + # vars: + # ORCHESTRATION_FILE: auth-aws.json + # MONGODB_VERSION: rapid + # TOPOLOGY: server + # - func: "add aws auth variables to file" + # - func: "run aws auth test with assume role credentials" - name: test-aws-auth-environment-variables tags: [aws-auth] @@ -914,62 +914,62 @@ tasks: - func: "add aws auth variables to file" - func: "run aws auth test with aws credentials as environment variables" - - name: test-aws-auth-environment-variables-session-token - tags: [aws-auth] - commands: - - func: "bootstrap mongo-orchestration" - vars: - ORCHESTRATION_FILE: auth-aws.json - MONGODB_VERSION: rapid - TOPOLOGY: server - - func: "add aws auth variables to file" - - func: "run aws auth test with aws credentials and session token as environment variables" - - - name: test-aws-auth-ec2 - tags: [aws-auth] - commands: - - func: "bootstrap mongo-orchestration" - vars: - ORCHESTRATION_FILE: auth-aws.json - MONGODB_VERSION: rapid - TOPOLOGY: server - - func: "add aws auth variables to file" - - func: "run aws auth test with aws EC2 credentials" - - - name: test-aws-auth-ecs - tags: [aws-auth] - commands: - - func: "bootstrap mongo-orchestration" - vars: - ORCHESTRATION_FILE: auth-aws.json - MONGODB_VERSION: rapid - TOPOLOGY: server - - func: "add aws auth variables to file" - - func: "run aws ecs auth test" - - - name: test-aws-auth-assume-role-with-web-identity - tags: [aws-auth] - commands: - - func: "bootstrap mongo-orchestration" - vars: - ORCHESTRATION_FILE: auth-aws.json - MONGODB_VERSION: rapid - TOPOLOGY: server - - func: "add aws auth variables to file" - - func: "run aws assume role with web identity test" - - - name: test-aws-auth-assume-role-with-web-identity-session-name - tags: [aws-auth] - commands: - - func: "bootstrap mongo-orchestration" - vars: - ORCHESTRATION_FILE: auth-aws.json - MONGODB_VERSION: rapid - TOPOLOGY: server - - func: "add aws auth variables to file" - - func: "run aws assume role with web identity test" - vars: - AWS_ROLE_SESSION_NAME: test + # - name: test-aws-auth-environment-variables-session-token + # tags: [aws-auth] + # commands: + # - func: "bootstrap mongo-orchestration" + # vars: + # ORCHESTRATION_FILE: auth-aws.json + # MONGODB_VERSION: rapid + # TOPOLOGY: server + # - func: "add aws auth variables to file" + # - func: "run aws auth test with aws credentials and session token as environment variables" + + # - name: test-aws-auth-ec2 + # tags: [aws-auth] + # commands: + # - func: "bootstrap mongo-orchestration" + # vars: + # ORCHESTRATION_FILE: auth-aws.json + # MONGODB_VERSION: rapid + # TOPOLOGY: server + # - func: "add aws auth variables to file" + # - func: "run aws auth test with aws EC2 credentials" + + # - name: test-aws-auth-ecs + # tags: [aws-auth] + # commands: + # - func: "bootstrap mongo-orchestration" + # vars: + # ORCHESTRATION_FILE: auth-aws.json + # MONGODB_VERSION: rapid + # TOPOLOGY: server + # - func: "add aws auth variables to file" + # - func: "run aws ecs auth test" + + # - name: test-aws-auth-assume-role-with-web-identity + # tags: [aws-auth] + # commands: + # - func: "bootstrap mongo-orchestration" + # vars: + # ORCHESTRATION_FILE: auth-aws.json + # MONGODB_VERSION: rapid + # TOPOLOGY: server + # - func: "add aws auth variables to file" + # - func: "run aws assume role with web identity test" + + # - name: test-aws-auth-assume-role-with-web-identity-session-name + # tags: [aws-auth] + # commands: + # - func: "bootstrap mongo-orchestration" + # vars: + # ORCHESTRATION_FILE: auth-aws.json + # MONGODB_VERSION: rapid + # TOPOLOGY: server + # - func: "add aws auth variables to file" + # - func: "run aws assume role with web identity test" + # vars: + # AWS_ROLE_SESSION_NAME: test - name: test-atlas-connectivity commands: From 6fe85bc06736d8805ed5532e2bec0098a187d1ad Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Wed, 23 Jul 2025 14:56:08 -0400 Subject: [PATCH 04/43] Add conditional imports for aws_config modules behind aws-sdk-auth feature flag --- src/client/auth/aws.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index bca3945fa..006d5615f 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -1,15 +1,17 @@ -use std::{fs::File, io::Read, time::Duration}; - -// Note: Uncomment the following lines for AWS SDK for authentication +#[cfg(feature = "aws-sdk-auth")] use aws_config::BehaviorVersion; +#[cfg(feature = "aws-sdk-auth")] use aws_credential_types::provider::ProvideCredentials; +#[cfg(feature = "aws-sdk-auth")] use aws_types::sdk_config::SharedCredentialsProvider; + use chrono::{offset::Utc, DateTime}; use hmac::Hmac; use once_cell::sync::Lazy; use rand::distributions::{Alphanumeric, DistString}; use serde::Deserialize; use sha2::{Digest, Sha256}; +use std::{fs::File, io::Read, time::Duration}; use tokio::sync::Mutex; use crate::{ From b6e1d9a26b9e4f43ce5609819d86e248d9d4f292 Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Wed, 23 Jul 2025 17:06:21 -0400 Subject: [PATCH 05/43] Try to pin aws_sdk dependency versions to fix tests --- Cargo.lock | 19 +++++++++++-------- Cargo.toml | 15 +++++++++++++++ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 416f13114..f217f1ede 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -228,9 +228,9 @@ dependencies = [ [[package]] name = "aws-sdk-sso" -version = "1.76.0" +version = "1.75.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64bf26698dd6d238ef1486bdda46f22a589dc813368ba868dc3d94c8d27b56ba" +checksum = "36d2a4d2753a2304cc0a86cff15581179c420c7b3054c0cbc884a2e497e79ae5" dependencies = [ "aws-credential-types", "aws-runtime", @@ -250,9 +250,9 @@ dependencies = [ [[package]] name = "aws-sdk-ssooidc" -version = "1.77.0" +version = "1.76.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cd07ed1edd939fae854a22054299ae3576500f4e0fadc560ca44f9c6ea1664" +checksum = "719f007d6914388e2f14943c663447cfc44bb9d0478bb96df891258ba5145f82" dependencies = [ "aws-credential-types", "aws-runtime", @@ -272,9 +272,9 @@ dependencies = [ [[package]] name = "aws-sdk-sts" -version = "1.78.0" +version = "1.77.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37f7766d2344f56d10d12f3c32993da36d78217f32594fe4fb8e57a538c1cdea" +checksum = "2efcc3dbb630f3e0d16a4f79fcd4b3fb1c59cb89f1031c46e44976f640b5de27" dependencies = [ "aws-credential-types", "aws-runtime", @@ -1847,7 +1847,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" dependencies = [ "cfg-if", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -2033,6 +2033,9 @@ dependencies = [ "async-trait", "aws-config", "aws-credential-types", + "aws-sdk-sso", + "aws-sdk-ssooidc", + "aws-sdk-sts", "aws-types", "backtrace", "base64 0.13.1", @@ -2792,7 +2795,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.4.15", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index e62dc9cbf..7f7598fb5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -138,6 +138,21 @@ features = [ "rt-tokio" ] +[dependencies.aws-sdk-sso] +version = "=1.75.0" +optional = true +default-features = false + +[dependencies.aws-sdk-ssooidc] +version = "=1.76.0" +optional = true +default-features = false + +[dependencies.aws-sdk-sts] +version = "=1.77.0" +optional = true +default-features = false + [dependencies.bson2] git = "https://github.com/mongodb/bson-rust" branch = "2.15.x" From 915b08782d7c5379dba992b67f290fb0dac5c55f Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Thu, 24 Jul 2025 20:50:25 -0400 Subject: [PATCH 06/43] Remove aws-sdk-auth ff --- Cargo.toml | 6 +-- src/client/auth/aws.rs | 118 ++++++++++++++++++++++++++--------------- 2 files changed, 75 insertions(+), 49 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 35c74c41d..99ca7e381 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,11 +41,7 @@ dns-resolver = ["dep:hickory-resolver", "dep:hickory-proto"] cert-key-password = ["dep:pem", "dep:pkcs8"] # Enable support for MONGODB-AWS authentication. -aws-auth = ["dep:reqwest"] - -# Enable support AWS SDK for authentication. -# This can only be used with the tokio-runtime and aws-auth feature flags. -aws-sdk-auth = ["dep:reqwest", "aws-config"] +aws-auth = ["dep:reqwest", "aws-config"] # Enable support for on-demand Azure KMS credentials. azure-kms = ["dep:reqwest"] diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index 006d5615f..3896826e1 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -1,17 +1,23 @@ -#[cfg(feature = "aws-sdk-auth")] +#[cfg(feature = "aws-auth")] use aws_config::BehaviorVersion; -#[cfg(feature = "aws-sdk-auth")] + +#[cfg(feature = "aws-auth")] use aws_credential_types::provider::ProvideCredentials; -#[cfg(feature = "aws-sdk-auth")] + +#[allow(unused_imports)] +#[cfg(feature = "aws-auth")] use aws_types::sdk_config::SharedCredentialsProvider; +// Note from RUST-1529: commented Duration import since original implementation is commented out +// use std::time::Duration; + use chrono::{offset::Utc, DateTime}; use hmac::Hmac; use once_cell::sync::Lazy; use rand::distributions::{Alphanumeric, DistString}; use serde::Deserialize; use sha2::{Digest, Sha256}; -use std::{fs::File, io::Read, time::Duration}; +use std::{fs::File, io::Read}; use tokio::sync::Mutex; use crate::{ @@ -61,7 +67,9 @@ async fn authenticate_stream_inner( conn: &mut Connection, credential: &Credential, server_api: Option<&ServerApi>, - http_client: &HttpClient, + // Note from RUST-1529: http_client is used in the original non-AWS SDK implementation for + // credentials + _http_client: &HttpClient, ) -> Result<()> { let source = match credential.source.as_deref() { Some("$external") | None => "$external", @@ -96,7 +104,7 @@ async fn authenticate_stream_inner( let server_first = ServerFirst::parse(server_first_response.auth_response_body(MECH_NAME)?)?; server_first.validate(&nonce)?; - #[cfg(feature = "aws-sdk-auth")] + // Find credentials using MongoDB URI or AWS SDK let aws_credential = if let (Some(access_key), Some(secret_key)) = (&credential.username, &credential.password) { @@ -113,41 +121,63 @@ async fn authenticate_stream_inner( ) } else { // If credentials are not provided in the URI, use the AWS SDK to load - let creds = aws_config::load_defaults(BehaviorVersion::latest()) + // let creds = aws_config::load_defaults(BehaviorVersion::latest()) + // .await + // .credentials_provider() + // .expect("no credential provider configured") + // .provide_credentials() + // .await + // .map_err(|e| { + // Error::authentication_error(MECH_NAME, &format!("failed to get creds: {e}")) + // })?; + + // AwsCredential::from_sdk_creds( + // creds.access_key_id().to_string(), + // creds.secret_access_key().to_string(), + // creds.session_token().map(|s| s.to_string()), + // None, + // ) + let provider = aws_config::load_defaults(BehaviorVersion::latest()) .await .credentials_provider() - .expect("no credential provider configured") - .provide_credentials() - .await - .map_err(|e| { - Error::authentication_error(MECH_NAME, &format!("failed to get creds: {e}")) - })?; - AwsCredential::from_sdk_creds( - creds.access_key_id().to_string(), - creds.secret_access_key().to_string(), - creds.session_token().map(|s| s.to_string()), - None, - ) - }; - #[cfg(not(feature = "aws-sdk-auth"))] - let aws_credential = { - // Limit scope of this variable to avoid holding onto the lock for the duration of - // authenticate_stream. - let cached_credential = CACHED_CREDENTIAL.lock().await; - match *cached_credential { - Some(ref aws_credential) if !aws_credential.is_expired() => aws_credential.clone(), - _ => { - // From the spec: the driver MUST not place a lock on making a request. - drop(cached_credential); - let aws_credential = AwsCredential::get(credential, http_client).await?; - if aws_credential.expiration.is_some() { - *CACHED_CREDENTIAL.lock().await = Some(aws_credential.clone()); - } - aws_credential + .expect("no credential provider configured"); + + match provider.provide_credentials().await { + Ok(creds) => AwsCredential::from_sdk_creds( + creds.access_key_id().to_string(), + creds.secret_access_key().to_string(), + creds.session_token().map(|s| s.to_string()), + None, + ), + Err(e) => { + eprintln!("AWS credential error: {:#?}", e); + return Err(Error::authentication_error( + MECH_NAME, + &format!("failed to get creds: {e}"), + )); } } }; + // Find credentials using original implementation without AWS SDK + // let aws_credential = { + // // Limit scope of this variable to avoid holding onto the lock for the duration of + // // authenticate_stream. + // let cached_credential = CACHED_CREDENTIAL.lock().await; + // match *cached_credential { + // Some(ref aws_credential) if !aws_credential.is_expired() => aws_credential.clone(), + // _ => { + // // From the spec: the driver MUST not place a lock on making a request. + // drop(cached_credential); + // let aws_credential = AwsCredential::get(credential, http_client).await?; + // if aws_credential.expiration.is_some() { + // *CACHED_CREDENTIAL.lock().await = Some(aws_credential.clone()); + // } + // aws_credential + // } + // } + // }; + let date = Utc::now(); let authorization_header = aws_credential.compute_authorization_header( @@ -526,15 +556,15 @@ impl AwsCredential { self.session_token.as_deref() } - fn is_expired(&self) -> bool { - match self.expiration { - Some(expiration) => { - expiration.saturating_duration_since(crate::bson::DateTime::now()) - < Duration::from_secs(5 * 60) - } - None => true, - } - } + // fn is_expired(&self) -> bool { + // match self.expiration { + // Some(expiration) => { + // expiration.saturating_duration_since(crate::bson::DateTime::now()) + // < Duration::from_secs(5 * 60) + // } + // None => true, + // } + // } } /// The response from the server to the `saslStart` command in a MONGODB-AWS authentication attempt. From f5a65afb7196ca3d7cf27c317d881f411de4b4f6 Mon Sep 17 00:00:00 2001 From: Isabel Atkinson Date: Fri, 25 Jul 2025 09:20:04 -0600 Subject: [PATCH 07/43] fix dependencies for MSRV --- Cargo.lock | 875 ++++++++--------------------------------------------- Cargo.toml | 20 +- 2 files changed, 125 insertions(+), 770 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d64125c8e..7d0a5ece5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" @@ -35,7 +35,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", - "getrandom 0.3.3", + "getrandom 0.3.2", "once_cell", "version_check", "zerocopy", @@ -111,7 +111,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -122,7 +122,7 @@ checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -137,353 +137,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" -[[package]] -name = "aws-config" -version = "1.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd9b83179adf8998576317ce47785948bcff399ec5b15f4dfbdedd44ddf5b92" -dependencies = [ - "aws-credential-types", - "aws-runtime", - "aws-sdk-sso", - "aws-sdk-ssooidc", - "aws-sdk-sts", - "aws-smithy-async", - "aws-smithy-http", - "aws-smithy-json", - "aws-smithy-runtime", - "aws-smithy-runtime-api", - "aws-smithy-types", - "aws-types", - "bytes", - "fastrand", - "hex", - "http 1.3.1", - "ring", - "time", - "tokio", - "tracing", - "url", - "zeroize", -] - -[[package]] -name = "aws-credential-types" -version = "1.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b68c2194a190e1efc999612792e25b1ab3abfefe4306494efaaabc25933c0cbe" -dependencies = [ - "aws-smithy-async", - "aws-smithy-runtime-api", - "aws-smithy-types", - "zeroize", -] - -[[package]] -name = "aws-lc-rs" -version = "1.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c953fe1ba023e6b7730c0d4b031d06f267f23a46167dcbd40316644b10a17ba" -dependencies = [ - "aws-lc-sys", - "zeroize", -] - -[[package]] -name = "aws-lc-sys" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbfd150b5dbdb988bcc8fb1fe787eb6b7ee6180ca24da683b61ea5405f3d43ff" -dependencies = [ - "bindgen 0.69.5", - "cc", - "cmake", - "dunce", - "fs_extra", -] - -[[package]] -name = "aws-runtime" -version = "1.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2090e664216c78e766b6bac10fe74d2f451c02441d43484cd76ac9a295075f7" -dependencies = [ - "aws-credential-types", - "aws-sigv4", - "aws-smithy-async", - "aws-smithy-http", - "aws-smithy-runtime", - "aws-smithy-runtime-api", - "aws-smithy-types", - "aws-types", - "bytes", - "fastrand", - "http 0.2.12", - "http-body 0.4.6", - "percent-encoding", - "pin-project-lite", - "tracing", - "uuid", -] - -[[package]] -name = "aws-sdk-sso" -version = "1.75.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36d2a4d2753a2304cc0a86cff15581179c420c7b3054c0cbc884a2e497e79ae5" -dependencies = [ - "aws-credential-types", - "aws-runtime", - "aws-smithy-async", - "aws-smithy-http", - "aws-smithy-json", - "aws-smithy-runtime", - "aws-smithy-runtime-api", - "aws-smithy-types", - "aws-types", - "bytes", - "fastrand", - "http 0.2.12", - "regex-lite", - "tracing", -] - -[[package]] -name = "aws-sdk-ssooidc" -version = "1.76.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719f007d6914388e2f14943c663447cfc44bb9d0478bb96df891258ba5145f82" -dependencies = [ - "aws-credential-types", - "aws-runtime", - "aws-smithy-async", - "aws-smithy-http", - "aws-smithy-json", - "aws-smithy-runtime", - "aws-smithy-runtime-api", - "aws-smithy-types", - "aws-types", - "bytes", - "fastrand", - "http 0.2.12", - "regex-lite", - "tracing", -] - -[[package]] -name = "aws-sdk-sts" -version = "1.77.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2efcc3dbb630f3e0d16a4f79fcd4b3fb1c59cb89f1031c46e44976f640b5de27" -dependencies = [ - "aws-credential-types", - "aws-runtime", - "aws-smithy-async", - "aws-smithy-http", - "aws-smithy-json", - "aws-smithy-query", - "aws-smithy-runtime", - "aws-smithy-runtime-api", - "aws-smithy-types", - "aws-smithy-xml", - "aws-types", - "fastrand", - "http 0.2.12", - "regex-lite", - "tracing", -] - -[[package]] -name = "aws-sigv4" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfb9021f581b71870a17eac25b52335b82211cdc092e02b6876b2bcefa61666" -dependencies = [ - "aws-credential-types", - "aws-smithy-http", - "aws-smithy-runtime-api", - "aws-smithy-types", - "bytes", - "form_urlencoded", - "hex", - "hmac", - "http 0.2.12", - "http 1.3.1", - "percent-encoding", - "sha2", - "time", - "tracing", -] - -[[package]] -name = "aws-smithy-async" -version = "1.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e190749ea56f8c42bf15dd76c65e14f8f765233e6df9b0506d9d934ebef867c" -dependencies = [ - "futures-util", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "aws-smithy-http" -version = "0.62.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43c82ba4cab184ea61f6edaafc1072aad3c2a17dcf4c0fce19ac5694b90d8b5f" -dependencies = [ - "aws-smithy-runtime-api", - "aws-smithy-types", - "bytes", - "bytes-utils", - "futures-core", - "http 0.2.12", - "http 1.3.1", - "http-body 0.4.6", - "percent-encoding", - "pin-project-lite", - "pin-utils", - "tracing", -] - -[[package]] -name = "aws-smithy-http-client" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f108f1ca850f3feef3009bdcc977be201bca9a91058864d9de0684e64514bee0" -dependencies = [ - "aws-smithy-async", - "aws-smithy-runtime-api", - "aws-smithy-types", - "h2", - "http 1.3.1", - "hyper 1.6.0", - "hyper-rustls", - "hyper-util", - "pin-project-lite", - "rustls", - "rustls-native-certs", - "rustls-pki-types", - "tokio", - "tower 0.5.2", - "tracing", -] - -[[package]] -name = "aws-smithy-json" -version = "0.61.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a16e040799d29c17412943bdbf488fd75db04112d0c0d4b9290bacf5ae0014b9" -dependencies = [ - "aws-smithy-types", -] - -[[package]] -name = "aws-smithy-observability" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9364d5989ac4dd918e5cc4c4bdcc61c9be17dcd2586ea7f69e348fc7c6cab393" -dependencies = [ - "aws-smithy-runtime-api", -] - -[[package]] -name = "aws-smithy-query" -version = "0.60.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fbd61ceb3fe8a1cb7352e42689cec5335833cd9f94103a61e98f9bb61c64bb" -dependencies = [ - "aws-smithy-types", - "urlencoding", -] - -[[package]] -name = "aws-smithy-runtime" -version = "1.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "660f70d9d8af6876b4c9aa8dcb0dbaf0f89b04ee9a4455bea1b4ba03b15f26f6" -dependencies = [ - "aws-smithy-async", - "aws-smithy-http", - "aws-smithy-http-client", - "aws-smithy-observability", - "aws-smithy-runtime-api", - "aws-smithy-types", - "bytes", - "fastrand", - "http 0.2.12", - "http 1.3.1", - "http-body 0.4.6", - "http-body 1.0.1", - "pin-project-lite", - "pin-utils", - "tokio", - "tracing", -] - -[[package]] -name = "aws-smithy-runtime-api" -version = "1.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38280ac228bc479f347fcfccf4bf4d22d68f3bb4629685cb591cabd856567bbc" -dependencies = [ - "aws-smithy-async", - "aws-smithy-types", - "bytes", - "http 0.2.12", - "http 1.3.1", - "pin-project-lite", - "tokio", - "tracing", - "zeroize", -] - -[[package]] -name = "aws-smithy-types" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d498595448e43de7f4296b7b7a18a8a02c61ec9349128c80a368f7c3b4ab11a8" -dependencies = [ - "base64-simd", - "bytes", - "bytes-utils", - "http 0.2.12", - "http 1.3.1", - "http-body 0.4.6", - "http-body 1.0.1", - "http-body-util", - "itoa", - "num-integer", - "pin-project-lite", - "pin-utils", - "ryu", - "serde", - "time", -] - -[[package]] -name = "aws-smithy-xml" -version = "0.60.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db87b96cb1b16c024980f133968d52882ca0daaee3a086c6decc500f6c99728" -dependencies = [ - "xmlparser", -] - -[[package]] -name = "aws-types" -version = "1.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b069d19bf01e46298eaedd7c6f283fe565a59263e53eebec945f3e6398f42390" -dependencies = [ - "aws-credential-types", - "aws-smithy-async", - "aws-smithy-runtime-api", - "aws-smithy-types", - "rustc_version", - "tracing", -] - [[package]] name = "backtrace" version = "0.3.75" @@ -511,63 +164,30 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" -[[package]] -name = "base64-simd" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "339abbe78e73178762e23bea9dfd08e697eb3f3301cd4be981c0f78ba5859195" -dependencies = [ - "outref", - "vsimd", -] - [[package]] name = "base64ct" version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" -[[package]] -name = "bindgen" -version = "0.69.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" -dependencies = [ - "bitflags 2.9.1", - "cexpr", - "clang-sys", - "itertools 0.12.1", - "lazy_static", - "lazycell", - "log", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash 1.1.0", - "shlex", - "syn 2.0.104", - "which", -] - [[package]] name = "bindgen" version = "0.71.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "cexpr", "clang-sys", - "itertools 0.13.0", + "itertools", "log", "prettyplease", "proc-macro2", "quote", "regex", - "rustc-hash 2.1.1", + "rustc-hash", "shlex", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -578,9 +198,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.1" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" +checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" [[package]] name = "bitvec" @@ -621,12 +241,12 @@ dependencies = [ "base64 0.22.1", "bitvec", "getrandom 0.2.16", - "getrandom 0.3.3", + "getrandom 0.3.2", "hex", - "indexmap 2.10.0", + "indexmap 2.9.0", "js-sys", "once_cell", - "rand 0.9.2", + "rand 0.9.1", "serde", "serde_bytes", "serde_json", @@ -637,18 +257,18 @@ dependencies = [ [[package]] name = "bson" version = "3.0.0" -source = "git+https://github.com/mongodb/bson-rust?branch=main#2e4f285a5d6b54ece5ffd85db198dca0ac5f695b" +source = "git+https://github.com/mongodb/bson-rust?branch=main#174fe65a7a79a67742008c669bd672bd025d439a" dependencies = [ "ahash", "base64 0.22.1", "bitvec", "getrandom 0.2.16", - "getrandom 0.3.3", + "getrandom 0.3.2", "hex", - "indexmap 2.10.0", + "indexmap 2.9.0", "js-sys", "once_cell", - "rand 0.9.2", + "rand 0.9.1", "serde", "serde_bytes", "serde_json", @@ -670,16 +290,6 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" -[[package]] -name = "bytes-utils" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dafe3a8757b027e2be6e4e5601ed563c55989fcf1546e933c66c8eb3a058d35" -dependencies = [ - "bytes", - "either", -] - [[package]] name = "cbc" version = "0.1.2" @@ -755,15 +365,6 @@ dependencies = [ "libloading", ] -[[package]] -name = "cmake" -version = "0.1.54" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0" -dependencies = [ - "cc", -] - [[package]] name = "const-oid" version = "0.9.6" @@ -806,16 +407,6 @@ dependencies = [ "libc", ] -[[package]] -name = "core-foundation" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -847,7 +438,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d4ddf7139e64dc916b11d434421031bcc5ba02e521a49a011652a0f68775188" dependencies = [ "anyhow", - "bitflags 2.9.1", + "bitflags 2.9.0", "bytes", "libgssapi", "windows", @@ -925,7 +516,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -936,7 +527,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -973,7 +564,7 @@ checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -984,7 +575,7 @@ checksum = "510c292c8cf384b1a340b816a9a6cf2599eb8f566a44949024af88418000c50b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -997,7 +588,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -1034,15 +625,9 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] -[[package]] -name = "dunce" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" - [[package]] name = "dyn-clone" version = "1.0.19" @@ -1073,7 +658,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -1089,7 +674,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.52.0", ] [[package]] @@ -1138,12 +723,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "fs_extra" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" - [[package]] name = "function_name" version = "0.2.3" @@ -1226,7 +805,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -1284,9 +863,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.3.3" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" dependencies = [ "cfg-if", "js-sys", @@ -1320,7 +899,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.3.1", - "indexmap 2.10.0", + "indexmap 2.9.0", "slab", "tokio", "tokio-util", @@ -1335,9 +914,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.15.4" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" +checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" [[package]] name = "heck" @@ -1396,7 +975,7 @@ dependencies = [ "parking_lot", "rand 0.8.5", "resolv-conf", - "smallvec 1.15.1", + "smallvec 1.15.0", "thiserror 1.0.69", "tokio", "tracing", @@ -1504,7 +1083,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.10", + "socket2", "tokio", "tower-service", "tracing", @@ -1526,7 +1105,7 @@ dependencies = [ "httparse", "itoa", "pin-project-lite", - "smallvec 1.15.1", + "smallvec 1.15.0", "tokio", "want", ] @@ -1541,12 +1120,11 @@ dependencies = [ "hyper 1.6.0", "hyper-util", "rustls", - "rustls-native-certs", "rustls-pki-types", "tokio", "tokio-rustls", "tower-service", - "webpki-roots 1.0.2", + "webpki-roots 1.0.0", ] [[package]] @@ -1567,9 +1145,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.16" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" +checksum = "7f66d5bd4c6f02bf0542fad85d626775bab9258cf795a4256dcaf3161114d1df" dependencies = [ "base64 0.22.1", "bytes", @@ -1583,7 +1161,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2 0.6.0", + "socket2", "system-configuration", "tokio", "tower-service", @@ -1652,7 +1230,7 @@ dependencies = [ "icu_normalizer_data", "icu_properties", "icu_provider", - "smallvec 1.15.1", + "smallvec 1.15.0", "zerovec", ] @@ -1714,7 +1292,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ "idna_adapter", - "smallvec 1.15.1", + "smallvec 1.15.0", "utf8_iter", ] @@ -1741,12 +1319,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.10.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" +checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" dependencies = [ "equivalent", - "hashbrown 0.15.4", + "hashbrown 0.15.3", "serde", ] @@ -1762,11 +1340,11 @@ dependencies = [ [[package]] name = "io-uring" -version = "0.7.9" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" +checksum = "b86e202f00093dcba4275d4636b93ef9dd75d025ae560d2521b45ea28ab49013" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "cfg-if", "libc", ] @@ -1777,7 +1355,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.5.10", + "socket2", "widestring", "windows-sys 0.48.0", "winreg", @@ -1799,15 +1377,6 @@ dependencies = [ "serde", ] -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.13.0" @@ -1829,7 +1398,7 @@ version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" dependencies = [ - "getrandom 0.3.3", + "getrandom 0.3.2", "libc", ] @@ -1881,12 +1450,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "libc" version = "0.2.174" @@ -1899,7 +1462,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "834339e86b2561169d45d3b01741967fee3e5716c7d0b6e33cd4e3b34c9558cd" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "bytes", "lazy_static", "libgssapi-sys", @@ -1911,7 +1474,7 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7518e6902e94f92e7c7271232684b60988b4bd813529b4ef9d97aead96956ae8" dependencies = [ - "bindgen 0.71.1", + "bindgen", "pkg-config", ] @@ -1922,7 +1485,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" dependencies = [ "cfg-if", - "windows-targets 0.53.2", + "windows-targets 0.48.5", ] [[package]] @@ -1931,12 +1494,6 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" -[[package]] -name = "linux-raw-sys" -version = "0.4.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" - [[package]] name = "linux-raw-sys" version = "0.9.4" @@ -1989,7 +1546,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -2003,7 +1560,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -2014,7 +1571,7 @@ checksum = "b02abfe41815b5bd98dbd4260173db2c116dda171dc0fe7838cb206333b83308" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -2025,7 +1582,7 @@ checksum = "73ea28ee64b88876bf45277ed9a5817c1817df061a74f2b988971a12570e5869" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -2106,12 +1663,6 @@ dependencies = [ "anyhow", "approx", "async-trait", - "aws-config", - "aws-credential-types", - "aws-sdk-sso", - "aws-sdk-ssooidc", - "aws-sdk-sts", - "aws-types", "backtrace", "base64 0.13.1", "bitflags 1.3.2", @@ -2166,7 +1717,7 @@ dependencies = [ "sha1", "sha2", "snap", - "socket2 0.5.10", + "socket2", "stringprep", "strsim", "take_mut", @@ -2191,7 +1742,7 @@ dependencies = [ "macro_magic", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -2206,7 +1757,7 @@ dependencies = [ "openssl-probe", "openssl-sys", "schannel", - "security-framework 2.11.1", + "security-framework", "security-framework-sys", "tempfile", ] @@ -2217,7 +1768,7 @@ version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "cfg-if", "cfg_aliases", "libc", @@ -2255,15 +1806,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.19" @@ -2304,7 +1846,7 @@ version = "0.10.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "cfg-if", "foreign-types", "libc", @@ -2321,7 +1863,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -2342,12 +1884,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "outref" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a80800c0488c3a21695ea981a54918fbb37abf04f4d0720c453632255e2ff0e" - [[package]] name = "overload" version = "0.1.1" @@ -2373,7 +1909,7 @@ dependencies = [ "cfg-if", "libc", "redox_syscall", - "smallvec 1.15.1", + "smallvec 1.15.0", "windows-targets 0.52.6", ] @@ -2429,7 +1965,7 @@ checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -2515,12 +2051,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.36" +version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff24dfcda44452b9816fff4cd4227e1bb73ff5a2f1bc1105aa92fb8565ce44d2" +checksum = "6837b9e10d61f45f987d50808f83d1ee3d206c66acf650c3e4ae2e1f6ddedf55" dependencies = [ "proc-macro2", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -2552,9 +2088,9 @@ dependencies = [ "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash 2.1.1", + "rustc-hash", "rustls", - "socket2 0.5.10", + "socket2", "thiserror 2.0.12", "tokio", "tracing", @@ -2568,11 +2104,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49df843a9161c85bb8aae55f101bc0bac8bcafd637a620d9122fd7e0b2f7422e" dependencies = [ "bytes", - "getrandom 0.3.3", + "getrandom 0.3.2", "lru-slab", - "rand 0.9.2", + "rand 0.9.1", "ring", - "rustc-hash 2.1.1", + "rustc-hash", "rustls", "rustls-pki-types", "slab", @@ -2591,9 +2127,9 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2 0.5.10", + "socket2", "tracing", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -2630,9 +2166,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.2" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", @@ -2673,7 +2209,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "getrandom 0.3.3", + "getrandom 0.3.2", ] [[package]] @@ -2698,11 +2234,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.15" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8af0dde094006011e6a740d4879319439489813bd0bcdc7d821beaeeff48ec" +checksum = "de3a5d9f0aba1dbcec1cc47f0ff94a4b778fe55bca98a6dfa92e4e094e57b1c4" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", ] [[package]] @@ -2722,7 +2258,7 @@ checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -2748,12 +2284,6 @@ dependencies = [ "regex-syntax", ] -[[package]] -name = "regex-lite" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" - [[package]] name = "regex-syntax" version = "0.8.5" @@ -2801,7 +2331,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 1.0.2", + "webpki-roots 1.0.0", ] [[package]] @@ -2830,12 +2360,6 @@ version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - [[package]] name = "rustc-hash" version = "2.1.1" @@ -2861,30 +2385,17 @@ dependencies = [ "semver", ] -[[package]] -name = "rustix" -version = "0.38.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" -dependencies = [ - "bitflags 2.9.1", - "errno", - "libc", - "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", -] - [[package]] name = "rustix" version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "errno", "libc", - "linux-raw-sys 0.9.4", - "windows-sys 0.60.2", + "linux-raw-sys", + "windows-sys 0.52.0", ] [[package]] @@ -2893,7 +2404,6 @@ version = "0.23.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2491382039b29b9b11ff08b76ff6c97cf287671dbb74f0be44bda389fffe9bd1" dependencies = [ - "aws-lc-rs", "log", "once_cell", "ring", @@ -2903,18 +2413,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "rustls-native-certs" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3" -dependencies = [ - "openssl-probe", - "rustls-pki-types", - "schannel", - "security-framework 3.2.0", -] - [[package]] name = "rustls-pki-types" version = "1.12.0" @@ -2931,7 +2429,6 @@ version = "0.103.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc" dependencies = [ - "aws-lc-rs", "ring", "rustls-pki-types", "untrusted", @@ -3014,21 +2511,8 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.9.1", - "core-foundation 0.9.4", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" -dependencies = [ - "bitflags 2.9.1", - "core-foundation 0.10.1", + "bitflags 2.9.0", + "core-foundation", "core-foundation-sys", "libc", "security-framework-sys", @@ -3087,7 +2571,7 @@ checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -3096,7 +2580,7 @@ version = "1.0.141" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3" dependencies = [ - "indexmap 2.10.0", + "indexmap 2.9.0", "itoa", "memchr", "ryu", @@ -3135,7 +2619,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.10.0", + "indexmap 2.9.0", "schemars 0.9.0", "schemars 1.0.4", "serde", @@ -3154,7 +2638,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -3226,9 +2710,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.15.1" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" [[package]] name = "snap" @@ -3246,16 +2730,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "socket2" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" -dependencies = [ - "libc", - "windows-sys 0.59.0", -] - [[package]] name = "spki" version = "0.7.3" @@ -3308,9 +2782,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.104" +version = "2.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" +checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" dependencies = [ "proc-macro2", "quote", @@ -3334,7 +2808,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -3343,8 +2817,8 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.9.1", - "core-foundation 0.9.4", + "bitflags 2.9.0", + "core-foundation", "system-configuration-sys", ] @@ -3377,10 +2851,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" dependencies = [ "fastrand", - "getrandom 0.3.3", + "getrandom 0.3.2", "once_cell", - "rustix 1.0.8", - "windows-sys 0.59.0", + "rustix", + "windows-sys 0.52.0", ] [[package]] @@ -3409,7 +2883,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -3420,7 +2894,7 @@ checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -3512,7 +2986,7 @@ dependencies = [ "pin-project-lite", "signal-hook-registry", "slab", - "socket2 0.5.10", + "socket2", "tokio-macros", "windows-sys 0.52.0", ] @@ -3525,7 +2999,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -3629,7 +3103,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "bytes", "futures-util", "http 1.3.1", @@ -3673,7 +3147,7 @@ checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -3705,7 +3179,7 @@ checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "nu-ansi-term", "sharded-slab", - "smallvec 1.15.1", + "smallvec 1.15.0", "thread_local", "tracing-core", "tracing-log", @@ -3734,7 +3208,7 @@ checksum = "3c36781cc0e46a83726d9879608e4cf6c2505237e263a8eb8c24502989cfdb28" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -3787,12 +3261,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "urlencoding" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" - [[package]] name = "utf8_iter" version = "1.0.4" @@ -3805,7 +3273,7 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" dependencies = [ - "getrandom 0.3.3", + "getrandom 0.3.2", "js-sys", "serde", "wasm-bindgen", @@ -3829,12 +3297,6 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" -[[package]] -name = "vsimd" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" - [[package]] name = "want" version = "0.3.1" @@ -3881,7 +3343,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", "wasm-bindgen-shared", ] @@ -3916,7 +3378,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3956,30 +3418,18 @@ version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" dependencies = [ - "webpki-roots 1.0.2", + "webpki-roots 1.0.0", ] [[package]] name = "webpki-roots" -version = "1.0.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8983c3ab33d6fb807cfcdad2491c4ea8cbc8ed839181c7dfd9c67c83e261b2" +checksum = "2853738d1cc4f2da3a225c18ec6c3721abb31961096e9dbf5ab35fa88b19cfdb" dependencies = [ "rustls-pki-types", ] -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix 0.38.44", -] - [[package]] name = "widestring" version = "1.2.0" @@ -4062,7 +3512,7 @@ checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -4073,7 +3523,7 @@ checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -4148,15 +3598,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-sys" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" -dependencies = [ - "windows-targets 0.53.2", -] - [[package]] name = "windows-targets" version = "0.48.5" @@ -4181,29 +3622,13 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", + "windows_i686_gnullvm", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] -[[package]] -name = "windows-targets" -version = "0.53.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" -dependencies = [ - "windows_aarch64_gnullvm 0.53.0", - "windows_aarch64_msvc 0.53.0", - "windows_i686_gnu 0.53.0", - "windows_i686_gnullvm 0.53.0", - "windows_i686_msvc 0.53.0", - "windows_x86_64_gnu 0.53.0", - "windows_x86_64_gnullvm 0.53.0", - "windows_x86_64_msvc 0.53.0", -] - [[package]] name = "windows-threading" version = "0.1.0" @@ -4225,12 +3650,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" - [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -4243,12 +3662,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" - [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -4261,24 +3674,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" -[[package]] -name = "windows_i686_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" - [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" - [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -4291,12 +3692,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_i686_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" - [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -4309,12 +3704,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" - [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -4327,12 +3716,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" - [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -4345,12 +3728,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" - [[package]] name = "winreg" version = "0.50.0" @@ -4367,7 +3744,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", ] [[package]] @@ -4385,12 +3762,6 @@ dependencies = [ "tap", ] -[[package]] -name = "xmlparser" -version = "0.13.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4" - [[package]] name = "yansi" version = "1.0.1" @@ -4417,7 +3788,7 @@ checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", "synstructure", ] @@ -4438,7 +3809,7 @@ checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -4458,7 +3829,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", "synstructure", ] @@ -4498,7 +3869,7 @@ checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 99ca7e381..6e91967bf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -125,28 +125,12 @@ aws-credential-types = "1.2.4" aws-types = "1.3.7" [dependencies.aws-config] -version = "1.8.2" -optional = true -default-features = false -features = [ - "behavior-version-latest", - "sso", - "default-https-client", - "rt-tokio" -] - -[dependencies.aws-sdk-sso] -version = "=1.75.0" -optional = true -default-features = false - -[dependencies.aws-sdk-ssooidc] -version = "=1.76.0" +version = "1" optional = true default-features = false [dependencies.aws-sdk-sts] -version = "=1.77.0" +version = "=1.73" optional = true default-features = false From cf3f3a51e8e082f4ebee6a7dcfa3be2af37219ce Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Fri, 25 Jul 2025 14:44:26 -0400 Subject: [PATCH 08/43] Fix lint on AwsCredential unused fields --- src/client/auth/aws.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index 3896826e1..42d832f9a 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -249,6 +249,7 @@ fn non_empty(s: Option) -> Option { } } +#[allow(dead_code)] impl AwsCredential { /// Derives the credentials for an authentication attempt given the set of credentials the user /// passed in. From 8df943f9c9e05d113769b481de7d14be3ce44d3f Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Fri, 25 Jul 2025 15:14:53 -0400 Subject: [PATCH 09/43] Fix lint --- src/client/auth/aws.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index 42d832f9a..1e856f085 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -224,6 +224,8 @@ async fn authenticate_stream_inner( } /// Contains the credentials for MONGODB-AWS authentication. +// RUST-1529 note: dead_code tag was added to avoid unused warnings for expiration field +#[allow(dead_code)] #[derive(Clone, Debug, Deserialize)] #[serde(rename_all = "PascalCase")] pub(crate) struct AwsCredential { @@ -249,7 +251,6 @@ fn non_empty(s: Option) -> Option { } } -#[allow(dead_code)] impl AwsCredential { /// Derives the credentials for an authentication attempt given the set of credentials the user /// passed in. From 6b9d1292f2444fbc8a4553fcb72d2536aa1c527c Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Fri, 25 Jul 2025 15:57:30 -0400 Subject: [PATCH 10/43] Uncomment tests --- .evergreen/config.yml | 132 +++++++++++++++++++++--------------------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 1b9b6e8ce..9ddc2656d 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -853,16 +853,16 @@ tasks: - func: "add aws auth variables to file" - func: "run aws auth test with regular aws credentials" - # - name: test-aws-auth-assume-role-credentials - # tags: [aws-auth] - # commands: - # - func: "bootstrap mongo-orchestration" - # vars: - # ORCHESTRATION_FILE: auth-aws.json - # MONGODB_VERSION: rapid - # TOPOLOGY: server - # - func: "add aws auth variables to file" - # - func: "run aws auth test with assume role credentials" + - name: test-aws-auth-assume-role-credentials + tags: [aws-auth] + commands: + - func: "bootstrap mongo-orchestration" + vars: + ORCHESTRATION_FILE: auth-aws.json + MONGODB_VERSION: rapid + TOPOLOGY: server + - func: "add aws auth variables to file" + - func: "run aws auth test with assume role credentials" - name: test-aws-auth-environment-variables tags: [aws-auth] @@ -875,62 +875,62 @@ tasks: - func: "add aws auth variables to file" - func: "run aws auth test with aws credentials as environment variables" - # - name: test-aws-auth-environment-variables-session-token - # tags: [aws-auth] - # commands: - # - func: "bootstrap mongo-orchestration" - # vars: - # ORCHESTRATION_FILE: auth-aws.json - # MONGODB_VERSION: rapid - # TOPOLOGY: server - # - func: "add aws auth variables to file" - # - func: "run aws auth test with aws credentials and session token as environment variables" - - # - name: test-aws-auth-ec2 - # tags: [aws-auth] - # commands: - # - func: "bootstrap mongo-orchestration" - # vars: - # ORCHESTRATION_FILE: auth-aws.json - # MONGODB_VERSION: rapid - # TOPOLOGY: server - # - func: "add aws auth variables to file" - # - func: "run aws auth test with aws EC2 credentials" - - # - name: test-aws-auth-ecs - # tags: [aws-auth] - # commands: - # - func: "bootstrap mongo-orchestration" - # vars: - # ORCHESTRATION_FILE: auth-aws.json - # MONGODB_VERSION: rapid - # TOPOLOGY: server - # - func: "add aws auth variables to file" - # - func: "run aws ecs auth test" - - # - name: test-aws-auth-assume-role-with-web-identity - # tags: [aws-auth] - # commands: - # - func: "bootstrap mongo-orchestration" - # vars: - # ORCHESTRATION_FILE: auth-aws.json - # MONGODB_VERSION: rapid - # TOPOLOGY: server - # - func: "add aws auth variables to file" - # - func: "run aws assume role with web identity test" - - # - name: test-aws-auth-assume-role-with-web-identity-session-name - # tags: [aws-auth] - # commands: - # - func: "bootstrap mongo-orchestration" - # vars: - # ORCHESTRATION_FILE: auth-aws.json - # MONGODB_VERSION: rapid - # TOPOLOGY: server - # - func: "add aws auth variables to file" - # - func: "run aws assume role with web identity test" - # vars: - # AWS_ROLE_SESSION_NAME: test + - name: test-aws-auth-environment-variables-session-token + tags: [aws-auth] + commands: + - func: "bootstrap mongo-orchestration" + vars: + ORCHESTRATION_FILE: auth-aws.json + MONGODB_VERSION: rapid + TOPOLOGY: server + - func: "add aws auth variables to file" + - func: "run aws auth test with aws credentials and session token as environment variables" + + - name: test-aws-auth-ec2 + tags: [aws-auth] + commands: + - func: "bootstrap mongo-orchestration" + vars: + ORCHESTRATION_FILE: auth-aws.json + MONGODB_VERSION: rapid + TOPOLOGY: server + - func: "add aws auth variables to file" + - func: "run aws auth test with aws EC2 credentials" + + - name: test-aws-auth-ecs + tags: [aws-auth] + commands: + - func: "bootstrap mongo-orchestration" + vars: + ORCHESTRATION_FILE: auth-aws.json + MONGODB_VERSION: rapid + TOPOLOGY: server + - func: "add aws auth variables to file" + - func: "run aws ecs auth test" + + - name: test-aws-auth-assume-role-with-web-identity + tags: [aws-auth] + commands: + - func: "bootstrap mongo-orchestration" + vars: + ORCHESTRATION_FILE: auth-aws.json + MONGODB_VERSION: rapid + TOPOLOGY: server + - func: "add aws auth variables to file" + - func: "run aws assume role with web identity test" + + - name: test-aws-auth-assume-role-with-web-identity-session-name + tags: [aws-auth] + commands: + - func: "bootstrap mongo-orchestration" + vars: + ORCHESTRATION_FILE: auth-aws.json + MONGODB_VERSION: rapid + TOPOLOGY: server + - func: "add aws auth variables to file" + - func: "run aws assume role with web identity test" + vars: + AWS_ROLE_SESSION_NAME: test - name: test-gssapi-auth commands: From e99fff26724c438193e30423ea64418343f85a8b Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Fri, 25 Jul 2025 16:01:13 -0400 Subject: [PATCH 11/43] Revert comments in config.yml --- .evergreen/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 9ddc2656d..e40e29c64 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -223,7 +223,7 @@ buildvariants: - name: aws-auth display_name: "AWS Authentication" - # patchable: false + patchable: false run_on: - ubuntu2004-small expansions: From 73d3a8227c8790848c302cd3a866c9623fec6f5b Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Fri, 25 Jul 2025 17:03:49 -0400 Subject: [PATCH 12/43] Clean up comments --- Cargo.lock | 627 +++++++++++++++++++++++++++++++++-------- src/client/auth/aws.rs | 55 ++-- 2 files changed, 530 insertions(+), 152 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 20038bcea..022af3b85 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 4 +version = 3 [[package]] name = "addr2line" @@ -35,7 +35,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", - "getrandom 0.3.2", + "getrandom 0.3.3", "once_cell", "version_check", "zerocopy", @@ -111,7 +111,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -122,7 +122,7 @@ checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -137,6 +137,257 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +[[package]] +name = "aws-config" +version = "1.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02a18fd934af6ae7ca52410d4548b98eb895aab0f1ea417d168d85db1434a141" +dependencies = [ + "aws-credential-types", + "aws-runtime", + "aws-sdk-sts", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "fastrand", + "http 1.3.1", + "time", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "aws-credential-types" +version = "1.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b68c2194a190e1efc999612792e25b1ab3abfefe4306494efaaabc25933c0cbe" +dependencies = [ + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", + "zeroize", +] + +[[package]] +name = "aws-runtime" +version = "1.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2090e664216c78e766b6bac10fe74d2f451c02441d43484cd76ac9a295075f7" +dependencies = [ + "aws-credential-types", + "aws-sigv4", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "fastrand", + "http 0.2.12", + "http-body 0.4.6", + "percent-encoding", + "pin-project-lite", + "tracing", + "uuid", +] + +[[package]] +name = "aws-sdk-sts" +version = "1.73.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1e9c3c24e36183e2f698235ed38dcfbbdff1d09b9232dc866c4be3011e0b47e" +dependencies = [ + "aws-credential-types", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-query", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-smithy-xml", + "aws-types", + "fastrand", + "http 0.2.12", + "regex-lite", + "tracing", +] + +[[package]] +name = "aws-sigv4" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfb9021f581b71870a17eac25b52335b82211cdc092e02b6876b2bcefa61666" +dependencies = [ + "aws-credential-types", + "aws-smithy-http", + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "form_urlencoded", + "hex", + "hmac", + "http 0.2.12", + "http 1.3.1", + "percent-encoding", + "sha2", + "time", + "tracing", +] + +[[package]] +name = "aws-smithy-async" +version = "1.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e190749ea56f8c42bf15dd76c65e14f8f765233e6df9b0506d9d934ebef867c" +dependencies = [ + "futures-util", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "aws-smithy-http" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43c82ba4cab184ea61f6edaafc1072aad3c2a17dcf4c0fce19ac5694b90d8b5f" +dependencies = [ + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "bytes-utils", + "futures-core", + "http 0.2.12", + "http 1.3.1", + "http-body 0.4.6", + "percent-encoding", + "pin-project-lite", + "pin-utils", + "tracing", +] + +[[package]] +name = "aws-smithy-json" +version = "0.61.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a16e040799d29c17412943bdbf488fd75db04112d0c0d4b9290bacf5ae0014b9" +dependencies = [ + "aws-smithy-types", +] + +[[package]] +name = "aws-smithy-observability" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9364d5989ac4dd918e5cc4c4bdcc61c9be17dcd2586ea7f69e348fc7c6cab393" +dependencies = [ + "aws-smithy-runtime-api", +] + +[[package]] +name = "aws-smithy-query" +version = "0.60.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2fbd61ceb3fe8a1cb7352e42689cec5335833cd9f94103a61e98f9bb61c64bb" +dependencies = [ + "aws-smithy-types", + "urlencoding", +] + +[[package]] +name = "aws-smithy-runtime" +version = "1.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "660f70d9d8af6876b4c9aa8dcb0dbaf0f89b04ee9a4455bea1b4ba03b15f26f6" +dependencies = [ + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-observability", + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "fastrand", + "http 0.2.12", + "http 1.3.1", + "http-body 0.4.6", + "http-body 1.0.1", + "pin-project-lite", + "pin-utils", + "tokio", + "tracing", +] + +[[package]] +name = "aws-smithy-runtime-api" +version = "1.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "937a49ecf061895fca4a6dd8e864208ed9be7546c0527d04bc07d502ec5fba1c" +dependencies = [ + "aws-smithy-async", + "aws-smithy-types", + "bytes", + "http 0.2.12", + "http 1.3.1", + "pin-project-lite", + "tokio", + "tracing", + "zeroize", +] + +[[package]] +name = "aws-smithy-types" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d498595448e43de7f4296b7b7a18a8a02c61ec9349128c80a368f7c3b4ab11a8" +dependencies = [ + "base64-simd", + "bytes", + "bytes-utils", + "http 0.2.12", + "http 1.3.1", + "http-body 0.4.6", + "http-body 1.0.1", + "http-body-util", + "itoa", + "num-integer", + "pin-project-lite", + "pin-utils", + "ryu", + "serde", + "time", +] + +[[package]] +name = "aws-smithy-xml" +version = "0.60.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db87b96cb1b16c024980f133968d52882ca0daaee3a086c6decc500f6c99728" +dependencies = [ + "xmlparser", +] + +[[package]] +name = "aws-types" +version = "1.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b069d19bf01e46298eaedd7c6f283fe565a59263e53eebec945f3e6398f42390" +dependencies = [ + "aws-credential-types", + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", + "rustc_version", + "tracing", +] + [[package]] name = "backtrace" version = "0.3.75" @@ -164,11 +415,21 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64-simd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339abbe78e73178762e23bea9dfd08e697eb3f3301cd4be981c0f78ba5859195" +dependencies = [ + "outref", + "vsimd", +] + [[package]] name = "base64ct" -version = "1.8.0" +version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" +checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3" [[package]] name = "bindgen" @@ -176,7 +437,7 @@ version = "0.71.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "cexpr", "clang-sys", "itertools", @@ -187,7 +448,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -198,9 +459,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" [[package]] name = "bitvec" @@ -241,12 +502,12 @@ dependencies = [ "base64 0.22.1", "bitvec", "getrandom 0.2.16", - "getrandom 0.3.2", + "getrandom 0.3.3", "hex", - "indexmap 2.9.0", + "indexmap 2.10.0", "js-sys", "once_cell", - "rand 0.9.1", + "rand 0.9.2", "serde", "serde_bytes", "serde_json", @@ -257,18 +518,18 @@ dependencies = [ [[package]] name = "bson" version = "3.0.0" -source = "git+https://github.com/mongodb/bson-rust?branch=main#266aa3039e603cad96a5dde377aaf8251be76c79" +source = "git+https://github.com/mongodb/bson-rust?branch=main#3b7e988d83216b8f089814bb995344cf27b52fa3" dependencies = [ "ahash", "base64 0.22.1", "bitvec", "getrandom 0.2.16", - "getrandom 0.3.2", + "getrandom 0.3.3", "hex", - "indexmap 2.9.0", + "indexmap 2.10.0", "js-sys", "once_cell", - "rand 0.9.1", + "rand 0.9.2", "serde", "serde_bytes", "serde_json", @@ -290,6 +551,16 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +[[package]] +name = "bytes-utils" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dafe3a8757b027e2be6e4e5601ed563c55989fcf1546e933c66c8eb3a058d35" +dependencies = [ + "bytes", + "either", +] + [[package]] name = "cbc" version = "0.1.2" @@ -438,7 +709,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d4ddf7139e64dc916b11d434421031bcc5ba02e521a49a011652a0f68775188" dependencies = [ "anyhow", - "bitflags 2.9.0", + "bitflags 2.9.1", "bytes", "libgssapi", "windows", @@ -516,7 +787,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -527,7 +798,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -564,7 +835,7 @@ checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -575,7 +846,7 @@ checksum = "510c292c8cf384b1a340b816a9a6cf2599eb8f566a44949024af88418000c50b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -588,7 +859,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -625,7 +896,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -658,7 +929,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -674,7 +945,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.60.2", ] [[package]] @@ -805,7 +1076,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -863,9 +1134,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ "cfg-if", "js-sys", @@ -899,7 +1170,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.3.1", - "indexmap 2.9.0", + "indexmap 2.10.0", "slab", "tokio", "tokio-util", @@ -914,9 +1185,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.15.3" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" +checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" [[package]] name = "heck" @@ -975,7 +1246,7 @@ dependencies = [ "parking_lot", "rand 0.8.5", "resolv-conf", - "smallvec 1.15.0", + "smallvec 1.15.1", "thiserror 1.0.69", "tokio", "tracing", @@ -1083,7 +1354,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.5.10", "tokio", "tower-service", "tracing", @@ -1105,7 +1376,7 @@ dependencies = [ "httparse", "itoa", "pin-project-lite", - "smallvec 1.15.0", + "smallvec 1.15.1", "tokio", "want", ] @@ -1124,7 +1395,7 @@ dependencies = [ "tokio", "tokio-rustls", "tower-service", - "webpki-roots 1.0.0", + "webpki-roots 1.0.2", ] [[package]] @@ -1145,9 +1416,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f66d5bd4c6f02bf0542fad85d626775bab9258cf795a4256dcaf3161114d1df" +checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" dependencies = [ "base64 0.22.1", "bytes", @@ -1161,7 +1432,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2", + "socket2 0.6.0", "system-configuration", "tokio", "tower-service", @@ -1230,7 +1501,7 @@ dependencies = [ "icu_normalizer_data", "icu_properties", "icu_provider", - "smallvec 1.15.0", + "smallvec 1.15.1", "zerovec", ] @@ -1292,7 +1563,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ "idna_adapter", - "smallvec 1.15.0", + "smallvec 1.15.1", "utf8_iter", ] @@ -1319,12 +1590,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" +checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" dependencies = [ "equivalent", - "hashbrown 0.15.3", + "hashbrown 0.15.4", "serde", ] @@ -1340,11 +1611,11 @@ dependencies = [ [[package]] name = "io-uring" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b86e202f00093dcba4275d4636b93ef9dd75d025ae560d2521b45ea28ab49013" +checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "cfg-if", "libc", ] @@ -1355,7 +1626,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2", + "socket2 0.5.10", "widestring", "windows-sys 0.48.0", "winreg", @@ -1398,7 +1669,7 @@ version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" dependencies = [ - "getrandom 0.3.2", + "getrandom 0.3.3", "libc", ] @@ -1462,7 +1733,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "834339e86b2561169d45d3b01741967fee3e5716c7d0b6e33cd4e3b34c9558cd" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "bytes", "lazy_static", "libgssapi-sys", @@ -1485,7 +1756,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" dependencies = [ "cfg-if", - "windows-targets 0.48.5", + "windows-targets 0.53.2", ] [[package]] @@ -1546,7 +1817,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1560,7 +1831,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1571,7 +1842,7 @@ checksum = "b02abfe41815b5bd98dbd4260173db2c116dda171dc0fe7838cb206333b83308" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1582,7 +1853,7 @@ checksum = "73ea28ee64b88876bf45277ed9a5817c1817df061a74f2b988971a12570e5869" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1663,6 +1934,10 @@ dependencies = [ "anyhow", "approx", "async-trait", + "aws-config", + "aws-credential-types", + "aws-sdk-sts", + "aws-types", "backtrace", "base64 0.13.1", "bitflags 1.3.2", @@ -1717,7 +1992,7 @@ dependencies = [ "sha1", "sha2", "snap", - "socket2", + "socket2 0.5.10", "stringprep", "strsim", "take_mut", @@ -1742,7 +2017,7 @@ dependencies = [ "macro_magic", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1768,7 +2043,7 @@ version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "cfg-if", "cfg_aliases", "libc", @@ -1806,6 +2081,15 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.19" @@ -1846,7 +2130,7 @@ version = "0.10.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "cfg-if", "foreign-types", "libc", @@ -1863,7 +2147,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1884,6 +2168,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "outref" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a80800c0488c3a21695ea981a54918fbb37abf04f4d0720c453632255e2ff0e" + [[package]] name = "overload" version = "0.1.1" @@ -1909,7 +2199,7 @@ dependencies = [ "cfg-if", "libc", "redox_syscall", - "smallvec 1.15.0", + "smallvec 1.15.1", "windows-targets 0.52.6", ] @@ -1965,7 +2255,7 @@ checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -2051,12 +2341,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.34" +version = "0.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6837b9e10d61f45f987d50808f83d1ee3d206c66acf650c3e4ae2e1f6ddedf55" +checksum = "ff24dfcda44452b9816fff4cd4227e1bb73ff5a2f1bc1105aa92fb8565ce44d2" dependencies = [ "proc-macro2", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -2090,7 +2380,7 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls", - "socket2", + "socket2 0.5.10", "thiserror 2.0.12", "tokio", "tracing", @@ -2104,9 +2394,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49df843a9161c85bb8aae55f101bc0bac8bcafd637a620d9122fd7e0b2f7422e" dependencies = [ "bytes", - "getrandom 0.3.2", + "getrandom 0.3.3", "lru-slab", - "rand 0.9.1", + "rand 0.9.2", "ring", "rustc-hash", "rustls", @@ -2127,9 +2417,9 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2", + "socket2 0.5.10", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2166,9 +2456,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", @@ -2209,7 +2499,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "getrandom 0.3.2", + "getrandom 0.3.3", ] [[package]] @@ -2234,11 +2524,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.14" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3a5d9f0aba1dbcec1cc47f0ff94a4b778fe55bca98a6dfa92e4e094e57b1c4" +checksum = "7e8af0dde094006011e6a740d4879319439489813bd0bcdc7d821beaeeff48ec" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", ] [[package]] @@ -2258,7 +2548,7 @@ checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -2284,6 +2574,12 @@ dependencies = [ "regex-syntax", ] +[[package]] +name = "regex-lite" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" + [[package]] name = "regex-syntax" version = "0.8.5" @@ -2331,7 +2627,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 1.0.0", + "webpki-roots 1.0.2", ] [[package]] @@ -2391,11 +2687,11 @@ version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.60.2", ] [[package]] @@ -2511,7 +2807,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "core-foundation", "core-foundation-sys", "libc", @@ -2571,7 +2867,7 @@ checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -2580,7 +2876,7 @@ version = "1.0.141" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3" dependencies = [ - "indexmap 2.9.0", + "indexmap 2.10.0", "itoa", "memchr", "ryu", @@ -2619,7 +2915,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.9.0", + "indexmap 2.10.0", "schemars 0.9.0", "schemars 1.0.4", "serde", @@ -2638,7 +2934,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -2710,9 +3006,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.15.0" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "snap" @@ -2730,6 +3026,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "socket2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + [[package]] name = "spki" version = "0.7.3" @@ -2782,9 +3088,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.101" +version = "2.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" +checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" dependencies = [ "proc-macro2", "quote", @@ -2808,7 +3114,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -2817,7 +3123,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "core-foundation", "system-configuration-sys", ] @@ -2851,10 +3157,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" dependencies = [ "fastrand", - "getrandom 0.3.2", + "getrandom 0.3.3", "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2883,7 +3189,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -2894,7 +3200,7 @@ checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -2986,7 +3292,7 @@ dependencies = [ "pin-project-lite", "signal-hook-registry", "slab", - "socket2", + "socket2 0.5.10", "tokio-macros", "windows-sys 0.52.0", ] @@ -2999,7 +3305,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3103,7 +3409,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "bytes", "futures-util", "http 1.3.1", @@ -3147,7 +3453,7 @@ checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3179,7 +3485,7 @@ checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "nu-ansi-term", "sharded-slab", - "smallvec 1.15.0", + "smallvec 1.15.1", "thread_local", "tracing-core", "tracing-log", @@ -3208,7 +3514,7 @@ checksum = "3c36781cc0e46a83726d9879608e4cf6c2505237e263a8eb8c24502989cfdb28" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3261,6 +3567,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "urlencoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" + [[package]] name = "utf8_iter" version = "1.0.4" @@ -3273,7 +3585,7 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" dependencies = [ - "getrandom 0.3.2", + "getrandom 0.3.3", "js-sys", "serde", "wasm-bindgen", @@ -3297,6 +3609,12 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "vsimd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" + [[package]] name = "want" version = "0.3.1" @@ -3343,7 +3661,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "wasm-bindgen-shared", ] @@ -3378,7 +3696,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3418,14 +3736,14 @@ version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" dependencies = [ - "webpki-roots 1.0.0", + "webpki-roots 1.0.2", ] [[package]] name = "webpki-roots" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2853738d1cc4f2da3a225c18ec6c3721abb31961096e9dbf5ab35fa88b19cfdb" +checksum = "7e8983c3ab33d6fb807cfcdad2491c4ea8cbc8ed839181c7dfd9c67c83e261b2" dependencies = [ "rustls-pki-types", ] @@ -3512,7 +3830,7 @@ checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3523,7 +3841,7 @@ checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3598,6 +3916,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.2", +] + [[package]] name = "windows-targets" version = "0.48.5" @@ -3622,13 +3949,29 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", + "windows_i686_gnullvm 0.52.6", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] +[[package]] +name = "windows-targets" +version = "0.53.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" +dependencies = [ + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", +] + [[package]] name = "windows-threading" version = "0.1.0" @@ -3650,6 +3993,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -3662,6 +4011,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -3674,12 +4029,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -3692,6 +4059,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -3704,6 +4077,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -3716,6 +4095,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -3728,6 +4113,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + [[package]] name = "winreg" version = "0.50.0" @@ -3744,7 +4135,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", ] [[package]] @@ -3762,6 +4153,12 @@ dependencies = [ "tap", ] +[[package]] +name = "xmlparser" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4" + [[package]] name = "yansi" version = "1.0.1" @@ -3788,7 +4185,7 @@ checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "synstructure", ] @@ -3809,7 +4206,7 @@ checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3829,7 +4226,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "synstructure", ] @@ -3869,7 +4266,7 @@ checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index 1e856f085..15a73ea51 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -67,8 +67,7 @@ async fn authenticate_stream_inner( conn: &mut Connection, credential: &Credential, server_api: Option<&ServerApi>, - // Note from RUST-1529: http_client is used in the original non-AWS SDK implementation for - // credentials + // RUST-1529 note: http_client is used in the non-AWS SDK implementation to get credentials _http_client: &HttpClient, ) -> Result<()> { let source = match credential.source.as_deref() { @@ -121,42 +120,22 @@ async fn authenticate_stream_inner( ) } else { // If credentials are not provided in the URI, use the AWS SDK to load - // let creds = aws_config::load_defaults(BehaviorVersion::latest()) - // .await - // .credentials_provider() - // .expect("no credential provider configured") - // .provide_credentials() - // .await - // .map_err(|e| { - // Error::authentication_error(MECH_NAME, &format!("failed to get creds: {e}")) - // })?; - - // AwsCredential::from_sdk_creds( - // creds.access_key_id().to_string(), - // creds.secret_access_key().to_string(), - // creds.session_token().map(|s| s.to_string()), - // None, - // ) - let provider = aws_config::load_defaults(BehaviorVersion::latest()) + let creds = aws_config::load_defaults(BehaviorVersion::latest()) .await .credentials_provider() - .expect("no credential provider configured"); - - match provider.provide_credentials().await { - Ok(creds) => AwsCredential::from_sdk_creds( - creds.access_key_id().to_string(), - creds.secret_access_key().to_string(), - creds.session_token().map(|s| s.to_string()), - None, - ), - Err(e) => { - eprintln!("AWS credential error: {:#?}", e); - return Err(Error::authentication_error( - MECH_NAME, - &format!("failed to get creds: {e}"), - )); - } - } + .expect("no credential provider configured") + .provide_credentials() + .await + .map_err(|e| { + Error::authentication_error(MECH_NAME, &format!("failed to get creds: {e}")) + })?; + + AwsCredential::from_sdk_creds( + creds.access_key_id().to_string(), + creds.secret_access_key().to_string(), + creds.session_token().map(|s| s.to_string()), + None, + ) }; // Find credentials using original implementation without AWS SDK @@ -224,7 +203,7 @@ async fn authenticate_stream_inner( } /// Contains the credentials for MONGODB-AWS authentication. -// RUST-1529 note: dead_code tag was added to avoid unused warnings for expiration field +// RUST-1529 note: dead_code tag added to avoid unused warnings on expiration field #[allow(dead_code)] #[derive(Clone, Debug, Deserialize)] #[serde(rename_all = "PascalCase")] @@ -558,6 +537,8 @@ impl AwsCredential { self.session_token.as_deref() } + // RUST-1529 note: commented out is_expired method since it is not used in the current + // implementation // fn is_expired(&self) -> bool { // match self.expiration { // Some(expiration) => { From dd94b4842c0aa66af416779fd769e45d65564ef6 Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Sat, 26 Jul 2025 11:45:34 -0400 Subject: [PATCH 13/43] Remove unused imports and replace expect --- src/client/auth/aws.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index 15a73ea51..fcb3fcbb4 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -4,10 +4,6 @@ use aws_config::BehaviorVersion; #[cfg(feature = "aws-auth")] use aws_credential_types::provider::ProvideCredentials; -#[allow(unused_imports)] -#[cfg(feature = "aws-auth")] -use aws_types::sdk_config::SharedCredentialsProvider; - // Note from RUST-1529: commented Duration import since original implementation is commented out // use std::time::Duration; @@ -123,7 +119,12 @@ async fn authenticate_stream_inner( let creds = aws_config::load_defaults(BehaviorVersion::latest()) .await .credentials_provider() - .expect("no credential provider configured") + .ok_or_else(|| { + Error::authentication_error( + MECH_NAME, + &format!("no credential provider configured"), + ) + })? .provide_credentials() .await .map_err(|e| { From e10a3ba28b707e892e0455d9ddb8bbf5e3bfa525 Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Sat, 26 Jul 2025 11:46:12 -0400 Subject: [PATCH 14/43] Make dependencies optional and comment back patchable: false --- .evergreen/config.yml | 2 +- Cargo.lock | 4 ++-- Cargo.toml | 14 +++++++++++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index e40e29c64..9ddc2656d 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -223,7 +223,7 @@ buildvariants: - name: aws-auth display_name: "AWS Authentication" - patchable: false + # patchable: false run_on: - ubuntu2004-small expansions: diff --git a/Cargo.lock b/Cargo.lock index 022af3b85..bd2f47f16 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2524,9 +2524,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.15" +version = "0.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8af0dde094006011e6a740d4879319439489813bd0bcdc7d821beaeeff48ec" +checksum = "7251471db004e509f4e75a62cca9435365b5ec7bcdff530d612ac7c87c44a792" dependencies = [ "bitflags 2.9.1", ] diff --git a/Cargo.toml b/Cargo.toml index 6e91967bf..e734d1283 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,7 +41,7 @@ dns-resolver = ["dep:hickory-resolver", "dep:hickory-proto"] cert-key-password = ["dep:pem", "dep:pkcs8"] # Enable support for MONGODB-AWS authentication. -aws-auth = ["dep:reqwest", "aws-config"] +aws-auth = ["dep:reqwest", "aws-credential-types", "aws-types", "aws-config"] # Enable support for on-demand Azure KMS credentials. azure-kms = ["dep:reqwest"] @@ -121,8 +121,16 @@ webpki-roots = "0.26" zstd = { version = "0.11.2", optional = true } macro_magic = "0.5.1" rustversion = "1.0.20" -aws-credential-types = "1.2.4" -aws-types = "1.3.7" + +[dependencies.aws-credential-types] +version = "1.2.4" +optional = true +default-features = false + +[dependencies.aws-types] +version = "1.3.7" +optional = true +default-features = false [dependencies.aws-config] version = "1" From f3656242ea25f59cde886c885bc90d83a33f8eba Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Sat, 26 Jul 2025 11:50:52 -0400 Subject: [PATCH 15/43] Move get credentials logic to a public method --- src/client/auth/aws.rs | 80 ++++++++++++++++--------------- src/client/csfle/state_machine.rs | 9 ++-- 2 files changed, 45 insertions(+), 44 deletions(-) diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index fcb3fcbb4..74f78d5f3 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -99,45 +99,7 @@ async fn authenticate_stream_inner( let server_first = ServerFirst::parse(server_first_response.auth_response_body(MECH_NAME)?)?; server_first.validate(&nonce)?; - // Find credentials using MongoDB URI or AWS SDK - let aws_credential = if let (Some(access_key), Some(secret_key)) = - (&credential.username, &credential.password) - { - // Look for credentials in the MongoDB URI - AwsCredential::from_sdk_creds( - access_key.clone(), - secret_key.clone(), - credential - .mechanism_properties - .as_ref() - .and_then(|mp| mp.get_str("AWS_SESSION_TOKEN").ok()) - .map(str::to_owned), - None, - ) - } else { - // If credentials are not provided in the URI, use the AWS SDK to load - let creds = aws_config::load_defaults(BehaviorVersion::latest()) - .await - .credentials_provider() - .ok_or_else(|| { - Error::authentication_error( - MECH_NAME, - &format!("no credential provider configured"), - ) - })? - .provide_credentials() - .await - .map_err(|e| { - Error::authentication_error(MECH_NAME, &format!("failed to get creds: {e}")) - })?; - - AwsCredential::from_sdk_creds( - creds.access_key_id().to_string(), - creds.secret_access_key().to_string(), - creds.session_token().map(|s| s.to_string()), - None, - ) - }; + let aws_credential = get_aws_credentials(credential).await?; // Find credentials using original implementation without AWS SDK // let aws_credential = { @@ -203,6 +165,46 @@ async fn authenticate_stream_inner( Ok(()) } +// Find credentials using MongoDB URI or AWS SDK +pub async fn get_aws_credentials(credential: &Credential) -> Result { + if let (Some(access_key), Some(secret_key)) = (&credential.username, &credential.password) { + // Look for credentials in the MongoDB URI + Ok(AwsCredential::from_sdk_creds( + access_key.clone(), + secret_key.clone(), + credential + .mechanism_properties + .as_ref() + .and_then(|mp| mp.get_str("AWS_SESSION_TOKEN").ok()) + .map(str::to_owned), + None, + )) + } else { + // If credentials are not provided in the URI, use the AWS SDK to load + let creds = aws_config::load_defaults(BehaviorVersion::latest()) + .await + .credentials_provider() + .ok_or_else(|| { + Error::authentication_error( + MECH_NAME, + &format!("no credential provider configured"), + ) + })? + .provide_credentials() + .await + .map_err(|e| { + Error::authentication_error(MECH_NAME, &format!("failed to get creds: {e}")) + })?; + + Ok(AwsCredential::from_sdk_creds( + creds.access_key_id().to_string(), + creds.secret_access_key().to_string(), + creds.session_token().map(|s| s.to_string()), + None, + )) + } +} + /// Contains the credentials for MONGODB-AWS authentication. // RUST-1529 note: dead_code tag added to avoid unused warnings on expiration field #[allow(dead_code)] diff --git a/src/client/csfle/state_machine.rs b/src/client/csfle/state_machine.rs index 5d7363126..78e699903 100644 --- a/src/client/csfle/state_machine.rs +++ b/src/client/csfle/state_machine.rs @@ -255,11 +255,10 @@ impl CryptExecutor { runtime::HttpClient, }; - let aws_creds = AwsCredential::get( - &Credential::default(), - &HttpClient::default(), - ) - .await?; + // Original implementation using the AWS SDK + let aws_creds = + get_aws_credentials(&Credential::default()).await?; + let mut creds = rawdoc! { "accessKeyId": aws_creds.access_key(), "secretAccessKey": aws_creds.secret_key(), From 408ca2f370e3e2c580b23a43bdc495619e8c6eff Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Sat, 26 Jul 2025 12:17:28 -0400 Subject: [PATCH 16/43] Change return type of get_aws_credentials from AwsCredential to aws_credential_types::Credential --- src/client/auth/aws.rs | 23 ++++++++++++----------- src/client/csfle/state_machine.rs | 4 ++-- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index 74f78d5f3..bea851139 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -2,7 +2,7 @@ use aws_config::BehaviorVersion; #[cfg(feature = "aws-auth")] -use aws_credential_types::provider::ProvideCredentials; +use aws_credential_types::{provider::ProvideCredentials, Credentials}; // Note from RUST-1529: commented Duration import since original implementation is commented out // use std::time::Duration; @@ -99,7 +99,13 @@ async fn authenticate_stream_inner( let server_first = ServerFirst::parse(server_first_response.auth_response_body(MECH_NAME)?)?; server_first.validate(&nonce)?; - let aws_credential = get_aws_credentials(credential).await?; + let creds = get_aws_credentials(credential).await?; + let aws_credential = AwsCredential::from_sdk_creds( + creds.access_key_id().to_string(), + creds.secret_access_key().to_string(), + creds.session_token().map(|s| s.to_string()), + None, + ); // Find credentials using original implementation without AWS SDK // let aws_credential = { @@ -166,10 +172,10 @@ async fn authenticate_stream_inner( } // Find credentials using MongoDB URI or AWS SDK -pub async fn get_aws_credentials(credential: &Credential) -> Result { +pub async fn get_aws_credentials(credential: &Credential) -> Result { if let (Some(access_key), Some(secret_key)) = (&credential.username, &credential.password) { // Look for credentials in the MongoDB URI - Ok(AwsCredential::from_sdk_creds( + Ok(Credentials::new( access_key.clone(), secret_key.clone(), credential @@ -178,6 +184,7 @@ pub async fn get_aws_credentials(credential: &Credential) -> Result Result Date: Sat, 26 Jul 2025 12:30:40 -0400 Subject: [PATCH 17/43] Fix lint and imports --- src/client/auth/aws.rs | 345 +++++++++++++++--------------- src/client/csfle/state_machine.rs | 12 +- 2 files changed, 179 insertions(+), 178 deletions(-) diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index bea851139..7e9823b69 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -6,18 +6,19 @@ use aws_credential_types::{provider::ProvideCredentials, Credentials}; // Note from RUST-1529: commented Duration import since original implementation is commented out // use std::time::Duration; +// use rand::distributions::{Alphanumeric, DistString}; +// use std::{fs::File, io::Read}; +// use crate::bson::rawdoc; use chrono::{offset::Utc, DateTime}; use hmac::Hmac; use once_cell::sync::Lazy; -use rand::distributions::{Alphanumeric, DistString}; use serde::Deserialize; use sha2::{Digest, Sha256}; -use std::{fs::File, io::Read}; use tokio::sync::Mutex; use crate::{ - bson::{doc, rawdoc, spec::BinarySubtype, Binary, Bson, Document}, + bson::{doc, spec::BinarySubtype, Binary, Bson, Document}, client::{ auth::{ self, @@ -36,8 +37,8 @@ use crate::{ #[cfg(not(feature = "bson-3"))] use crate::bson_compat::DocumentExt as _; -const AWS_ECS_IP: &str = "169.254.170.2"; -const AWS_EC2_IP: &str = "169.254.169.254"; +// const AWS_ECS_IP: &str = "169.254.170.2"; +// const AWS_EC2_IP: &str = "169.254.169.254"; const AWS_LONG_DATE_FMT: &str = "%Y%m%dT%H%M%SZ"; const MECH_NAME: &str = "MONGODB-AWS"; @@ -192,10 +193,7 @@ pub async fn get_aws_credentials(credential: &Credential) -> Result .await .credentials_provider() .ok_or_else(|| { - Error::authentication_error( - MECH_NAME, - &format!("no credential provider configured"), - ) + Error::authentication_error(MECH_NAME, "no credential provider configured") })? .provide_credentials() .await @@ -226,81 +224,82 @@ pub(crate) struct AwsCredential { expiration: Option, } -fn non_empty(s: Option) -> Option { - match s { - None => None, - Some(s) if s.is_empty() => None, - Some(s) => Some(s), - } -} +// fn non_empty(s: Option) -> Option { +// match s { +// None => None, +// Some(s) if s.is_empty() => None, +// Some(s) => Some(s), +// } +// } impl AwsCredential { - /// Derives the credentials for an authentication attempt given the set of credentials the user - /// passed in. - pub(crate) async fn get(credential: &Credential, http_client: &HttpClient) -> Result { - let access_key = credential - .username - .clone() - .or_else(|| non_empty(std::env::var("AWS_ACCESS_KEY_ID").ok())); - let secret_key = credential - .password - .clone() - .or_else(|| non_empty(std::env::var("AWS_SECRET_ACCESS_KEY").ok())); - let session_token = credential - .mechanism_properties - .as_ref() - .and_then(|d| d.get_str("AWS_SESSION_TOKEN").ok()) - .map(|s| s.to_string()) - .or_else(|| non_empty(std::env::var("AWS_SESSION_TOKEN").ok())); - - let found_access_key = access_key.is_some(); - let found_secret_key = secret_key.is_some(); - - // If we have an access key and secret key, we can continue with the credentials we've - // found. - if let (Some(access_key), Some(secret_key)) = (access_key, secret_key) { - return Ok(Self { - access_key_id: access_key, - secret_access_key: secret_key, - session_token, - expiration: None, - }); - } + // /// Derives the credentials for an authentication attempt given the set of credentials the + // user /// passed in. + // pub(crate) async fn get(credential: &Credential, http_client: &HttpClient) -> Result { + // let access_key = credential + // .username + // .clone() + // .or_else(|| non_empty(std::env::var("AWS_ACCESS_KEY_ID").ok())); + // let secret_key = credential + // .password + // .clone() + // .or_else(|| non_empty(std::env::var("AWS_SECRET_ACCESS_KEY").ok())); + // let session_token = credential + // .mechanism_properties + // .as_ref() + // .and_then(|d| d.get_str("AWS_SESSION_TOKEN").ok()) + // .map(|s| s.to_string()) + // .or_else(|| non_empty(std::env::var("AWS_SESSION_TOKEN").ok())); + + // let found_access_key = access_key.is_some(); + // let found_secret_key = secret_key.is_some(); + + // // If we have an access key and secret key, we can continue with the credentials we've + // // found. + // if let (Some(access_key), Some(secret_key)) = (access_key, secret_key) { + // return Ok(Self { + // access_key_id: access_key, + // secret_access_key: secret_key, + // session_token, + // expiration: None, + // }); + // } - if found_access_key || found_secret_key { - return Err(Error::authentication_error( - MECH_NAME, - "cannot specify only one of access key and secret key; either both or neither \ - must be provided", - )); - } + // if found_access_key || found_secret_key { + // return Err(Error::authentication_error( + // MECH_NAME, + // "cannot specify only one of access key and secret key; either both or neither \ + // must be provided", + // )); + // } - if session_token.is_some() { - return Err(Error::authentication_error( - MECH_NAME, - "cannot specify session token without both access key and secret key", - )); - } + // if session_token.is_some() { + // return Err(Error::authentication_error( + // MECH_NAME, + // "cannot specify session token without both access key and secret key", + // )); + // } - if let (Ok(token_file), Ok(role_arn)) = ( - std::env::var("AWS_WEB_IDENTITY_TOKEN_FILE"), - std::env::var("AWS_ROLE_ARN"), - ) { - return Self::get_from_assume_role_with_web_identity_request( - token_file, - role_arn, - http_client, - ) - .await; - } + // if let (Ok(token_file), Ok(role_arn)) = ( + // std::env::var("AWS_WEB_IDENTITY_TOKEN_FILE"), + // std::env::var("AWS_ROLE_ARN"), + // ) { + // return Self::get_from_assume_role_with_web_identity_request( + // token_file, + // role_arn, + // http_client, + // ) + // .await; + // } - if let Ok(relative_uri) = std::env::var("AWS_CONTAINER_CREDENTIALS_RELATIVE_URI") { - Self::get_from_ecs(relative_uri, http_client).await - } else { - Self::get_from_ec2(http_client).await - } - } + // if let Ok(relative_uri) = std::env::var("AWS_CONTAINER_CREDENTIALS_RELATIVE_URI") { + // Self::get_from_ecs(relative_uri, http_client).await + // } else { + // Self::get_from_ec2(http_client).await + // } + // } + // Creates AwsCredential from keys. fn from_sdk_creds( access_key_id: String, secret_access_key: String, @@ -315,93 +314,93 @@ impl AwsCredential { } } - async fn get_from_assume_role_with_web_identity_request( - token_file: String, - role_arn: String, - http_client: &HttpClient, - ) -> Result { - let mut file = File::open(&token_file).map_err(|_| { - Error::authentication_error(MECH_NAME, "could not open identity token file") - })?; - let mut buffer = Vec::::new(); - file.read_to_end(&mut buffer).map_err(|_| { - Error::authentication_error(MECH_NAME, "could not read identity token file") - })?; - let token = std::str::from_utf8(&buffer).map_err(|_| { - Error::authentication_error(MECH_NAME, "could not read identity token file") - })?; - - let session_name = std::env::var("AWS_ROLE_SESSION_NAME") - .unwrap_or_else(|_| Alphanumeric.sample_string(&mut rand::thread_rng(), 10)); - - let query = rawdoc! { - "Action": "AssumeRoleWithWebIdentity", - "RoleSessionName": session_name, - "RoleArn": role_arn, - "WebIdentityToken": token, - "Version": "2011-06-15", - }; - - let response = http_client - .get("https://sts.amazonaws.com/") - .headers(&[("Accept", "application/json")]) - .query(query) - .send::() - .await - .map_err(|_| Error::unknown_authentication_error(MECH_NAME))?; - - let credential = response - .get_document("AssumeRoleWithWebIdentityResponse") - .and_then(|d| d.get_document("AssumeRoleWithWebIdentityResult")) - .and_then(|d| d.get_document("Credentials")) - .map_err(|_| Error::unknown_authentication_error(MECH_NAME))? - .to_owned(); - - Ok(crate::bson_compat::deserialize_from_document(credential)?) - } - - /// Obtains credentials from the ECS endpoint. - async fn get_from_ecs(relative_uri: String, http_client: &HttpClient) -> Result { - // Use the local IP address that AWS uses for ECS agents. - let uri = format!("http://{}/{}", AWS_ECS_IP, relative_uri); - - http_client - .get(&uri) - .send() - .await - .map_err(|_| Error::unknown_authentication_error(MECH_NAME)) - } - - /// Obtains temporary credentials for an EC2 instance to use for authentication. - async fn get_from_ec2(http_client: &HttpClient) -> Result { - let temporary_token = http_client - .put(format!("http://{}/latest/api/token", AWS_EC2_IP)) - .headers(&[("X-aws-ec2-metadata-token-ttl-seconds", "30")]) - .send_and_get_string() - .await - .map_err(|_| Error::unknown_authentication_error(MECH_NAME))?; + // async fn get_from_assume_role_with_web_identity_request( + // token_file: String, + // role_arn: String, + // http_client: &HttpClient, + // ) -> Result { + // let mut file = File::open(&token_file).map_err(|_| { + // Error::authentication_error(MECH_NAME, "could not open identity token file") + // })?; + // let mut buffer = Vec::::new(); + // file.read_to_end(&mut buffer).map_err(|_| { + // Error::authentication_error(MECH_NAME, "could not read identity token file") + // })?; + // let token = std::str::from_utf8(&buffer).map_err(|_| { + // Error::authentication_error(MECH_NAME, "could not read identity token file") + // })?; + + // let session_name = std::env::var("AWS_ROLE_SESSION_NAME") + // .unwrap_or_else(|_| Alphanumeric.sample_string(&mut rand::thread_rng(), 10)); + + // let query = rawdoc! { + // "Action": "AssumeRoleWithWebIdentity", + // "RoleSessionName": session_name, + // "RoleArn": role_arn, + // "WebIdentityToken": token, + // "Version": "2011-06-15", + // }; + + // let response = http_client + // .get("https://sts.amazonaws.com/") + // .headers(&[("Accept", "application/json")]) + // .query(query) + // .send::() + // .await + // .map_err(|_| Error::unknown_authentication_error(MECH_NAME))?; + + // let credential = response + // .get_document("AssumeRoleWithWebIdentityResponse") + // .and_then(|d| d.get_document("AssumeRoleWithWebIdentityResult")) + // .and_then(|d| d.get_document("Credentials")) + // .map_err(|_| Error::unknown_authentication_error(MECH_NAME))? + // .to_owned(); + + // Ok(crate::bson_compat::deserialize_from_document(credential)?) + // } - let role_name_uri = format!( - "http://{}/latest/meta-data/iam/security-credentials/", - AWS_EC2_IP - ); + // /// Obtains credentials from the ECS endpoint. + // async fn get_from_ecs(relative_uri: String, http_client: &HttpClient) -> Result { + // // Use the local IP address that AWS uses for ECS agents. + // let uri = format!("http://{}/{}", AWS_ECS_IP, relative_uri); - let role_name = http_client - .get(&role_name_uri) - .headers(&[("X-aws-ec2-metadata-token", &temporary_token[..])]) - .send_and_get_string() - .await - .map_err(|_| Error::unknown_authentication_error(MECH_NAME))?; - - let credential_uri = format!("{}/{}", role_name_uri, role_name); + // http_client + // .get(&uri) + // .send() + // .await + // .map_err(|_| Error::unknown_authentication_error(MECH_NAME)) + // } - http_client - .get(&credential_uri) - .headers(&[("X-aws-ec2-metadata-token", &temporary_token[..])]) - .send() - .await - .map_err(|_| Error::unknown_authentication_error(MECH_NAME)) - } + // /// Obtains temporary credentials for an EC2 instance to use for authentication. + // async fn get_from_ec2(http_client: &HttpClient) -> Result { + // let temporary_token = http_client + // .put(format!("http://{}/latest/api/token", AWS_EC2_IP)) + // .headers(&[("X-aws-ec2-metadata-token-ttl-seconds", "30")]) + // .send_and_get_string() + // .await + // .map_err(|_| Error::unknown_authentication_error(MECH_NAME))?; + + // let role_name_uri = format!( + // "http://{}/latest/meta-data/iam/security-credentials/", + // AWS_EC2_IP + // ); + + // let role_name = http_client + // .get(&role_name_uri) + // .headers(&[("X-aws-ec2-metadata-token", &temporary_token[..])]) + // .send_and_get_string() + // .await + // .map_err(|_| Error::unknown_authentication_error(MECH_NAME))?; + + // let credential_uri = format!("{}/{}", role_name_uri, role_name); + + // http_client + // .get(&credential_uri) + // .headers(&[("X-aws-ec2-metadata-token", &temporary_token[..])]) + // .send() + // .await + // .map_err(|_| Error::unknown_authentication_error(MECH_NAME)) + // } /// Computes the signed authorization header for the credentials to send to the server in a sasl /// payload. @@ -526,20 +525,20 @@ impl AwsCredential { Ok(auth_header) } - #[cfg(feature = "in-use-encryption")] - pub(crate) fn access_key(&self) -> &str { - &self.access_key_id - } + // #[cfg(feature = "in-use-encryption")] + // pub(crate) fn access_key(&self) -> &str { + // &self.access_key_id + // } - #[cfg(feature = "in-use-encryption")] - pub(crate) fn secret_key(&self) -> &str { - &self.secret_access_key - } + // #[cfg(feature = "in-use-encryption")] + // pub(crate) fn secret_key(&self) -> &str { + // &self.secret_access_key + // } - #[cfg(feature = "in-use-encryption")] - pub(crate) fn session_token(&self) -> Option<&str> { - self.session_token.as_deref() - } + // #[cfg(feature = "in-use-encryption")] + // pub(crate) fn session_token(&self) -> Option<&str> { + // self.session_token.as_deref() + // } // RUST-1529 note: commented out is_expired method since it is not used in the current // implementation diff --git a/src/client/csfle/state_machine.rs b/src/client/csfle/state_machine.rs index 300367a6f..e22598b29 100644 --- a/src/client/csfle/state_machine.rs +++ b/src/client/csfle/state_machine.rs @@ -18,7 +18,12 @@ use tokio::{ }; use crate::{ - client::{csfle::options::KmsProvidersTlsOptions, options::ServerAddress, WeakClient}, + client::{ + auth::aws::get_aws_credentials, + csfle::options::KmsProvidersTlsOptions, + options::ServerAddress, + WeakClient, + }, error::{Error, Result}, operation::{run_command::RunCommand, RawOutput}, options::ReadConcern, @@ -250,10 +255,7 @@ impl CryptExecutor { KmsProviderType::Aws => { #[cfg(feature = "aws-auth")] { - use crate::{ - client::auth::{aws::AwsCredential, Credential}, - runtime::HttpClient, - }; + use crate::client::auth::Credential; // Original implementation using the AWS SDK let aws_creds = From 678cdcbf588d5e61a08a72b4e25a03b0917593ae Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Sat, 26 Jul 2025 12:43:00 -0400 Subject: [PATCH 18/43] Move import behind aws-auth feature flag --- src/client/csfle/state_machine.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/client/csfle/state_machine.rs b/src/client/csfle/state_machine.rs index e22598b29..3eedbacd1 100644 --- a/src/client/csfle/state_machine.rs +++ b/src/client/csfle/state_machine.rs @@ -18,12 +18,7 @@ use tokio::{ }; use crate::{ - client::{ - auth::aws::get_aws_credentials, - csfle::options::KmsProvidersTlsOptions, - options::ServerAddress, - WeakClient, - }, + client::{csfle::options::KmsProvidersTlsOptions, options::ServerAddress, WeakClient}, error::{Error, Result}, operation::{run_command::RunCommand, RawOutput}, options::ReadConcern, @@ -255,7 +250,10 @@ impl CryptExecutor { KmsProviderType::Aws => { #[cfg(feature = "aws-auth")] { - use crate::client::auth::Credential; + use crate::client::auth::{ + aws::get_aws_credentials, + Credential, + }; // Original implementation using the AWS SDK let aws_creds = From 90d5156ced05e9c7cb5a500f26f4f237940d3b71 Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Sun, 27 Jul 2025 14:01:15 -0400 Subject: [PATCH 19/43] Add logs --- src/client/auth/aws.rs | 4 +++- src/test/auth/aws.rs | 1 + src/test/csfle/on_demand_aws.rs | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index 7e9823b69..b513c1b02 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -100,7 +100,9 @@ async fn authenticate_stream_inner( let server_first = ServerFirst::parse(server_first_response.auth_response_body(MECH_NAME)?)?; server_first.validate(&nonce)?; - let creds = get_aws_credentials(credential).await?; + let creds = get_aws_credentials(credential).await.map_err(|e| { + Error::authentication_error(MECH_NAME, &format!("failed to get creds: {e}")) + })?; let aws_credential = AwsCredential::from_sdk_creds( creds.access_key_id().to_string(), creds.secret_access_key().to_string(), diff --git a/src/test/auth/aws.rs b/src/test/auth/aws.rs index 4319dfe70..e2580aff9 100644 --- a/src/test/auth/aws.rs +++ b/src/test/auth/aws.rs @@ -11,6 +11,7 @@ use crate::{ async fn auth_aws() { let client = Client::for_test().await; let coll = client.database("aws").collection::("somecoll"); + let _ = tracing_subscriber::fmt::try_init(); coll.find_one(doc! {}).await.unwrap(); } diff --git a/src/test/csfle/on_demand_aws.rs b/src/test/csfle/on_demand_aws.rs index 4641fb6ac..b100bca8b 100644 --- a/src/test/csfle/on_demand_aws.rs +++ b/src/test/csfle/on_demand_aws.rs @@ -29,9 +29,13 @@ async fn try_create_data_key() -> Result<()> { #[tokio::test] async fn success() { + dbg!("Running on-demand AWS credentials test"); assert!(std::env::var("AWS_ACCESS_KEY_ID").is_ok()); + dbg!("AWS_ACCESS_KEY_ID is set"); assert!(std::env::var("AWS_SECRET_ACCESS_KEY").is_ok()); + dbg!("AWS_SECRET_ACCESS_KEY is set"); try_create_data_key().await.unwrap(); + dbg!("try_create_data_key succeeded"); } #[tokio::test] From eac9bcfd7bac9c65151b7d0121b61e1e0371ef07 Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Sun, 27 Jul 2025 23:53:59 -0400 Subject: [PATCH 20/43] Add logs --- src/action/csfle/create_data_key.rs | 1 + src/test/csfle/on_demand_aws.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/action/csfle/create_data_key.rs b/src/action/csfle/create_data_key.rs index 555fb4c65..1838ab3f0 100644 --- a/src/action/csfle/create_data_key.rs +++ b/src/action/csfle/create_data_key.rs @@ -13,6 +13,7 @@ impl ClientEncryption { #[deeplink] #[options_doc(create_data_keys)] pub fn create_data_key(&self, master_key: impl Into) -> CreateDataKey { + dbg!("create_data_key inside src/action/csfle/create_data_key.rs"); CreateDataKey { client_enc: self, master_key: master_key.into(), diff --git a/src/test/csfle/on_demand_aws.rs b/src/test/csfle/on_demand_aws.rs index b100bca8b..7f77a402b 100644 --- a/src/test/csfle/on_demand_aws.rs +++ b/src/test/csfle/on_demand_aws.rs @@ -17,6 +17,7 @@ async fn try_create_data_key() -> Result<()> { KV_NAMESPACE.clone(), [(KmsProvider::aws(), doc! {}, None)], )?; + dbg!("ClientEncryption::new worked"); ce.create_data_key( AwsMasterKey::builder() .region("us-east-1") From cb268998cd6642f83bf7494ff6d02a337e3f0fb2 Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Mon, 28 Jul 2025 16:30:15 -0400 Subject: [PATCH 21/43] Add default-https-client and rt-tokio to aws-config dependencies --- Cargo.lock | 201 +++++++++++++++++++++++++++++++++++++++-- Cargo.toml | 1 + src/client/auth/aws.rs | 4 +- 3 files changed, 194 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bd2f47f16..20e2247c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -174,6 +174,29 @@ dependencies = [ "zeroize", ] +[[package]] +name = "aws-lc-rs" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c953fe1ba023e6b7730c0d4b031d06f267f23a46167dcbd40316644b10a17ba" +dependencies = [ + "aws-lc-sys", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbfd150b5dbdb988bcc8fb1fe787eb6b7ee6180ca24da683b61ea5405f3d43ff" +dependencies = [ + "bindgen 0.69.5", + "cc", + "cmake", + "dunce", + "fs_extra", +] + [[package]] name = "aws-runtime" version = "1.5.9" @@ -274,6 +297,29 @@ dependencies = [ "tracing", ] +[[package]] +name = "aws-smithy-http-client" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f108f1ca850f3feef3009bdcc977be201bca9a91058864d9de0684e64514bee0" +dependencies = [ + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", + "h2", + "http 1.3.1", + "hyper 1.6.0", + "hyper-rustls", + "hyper-util", + "pin-project-lite", + "rustls", + "rustls-native-certs", + "rustls-pki-types", + "tokio", + "tower 0.5.2", + "tracing", +] + [[package]] name = "aws-smithy-json" version = "0.61.4" @@ -310,6 +356,7 @@ checksum = "660f70d9d8af6876b4c9aa8dcb0dbaf0f89b04ee9a4455bea1b4ba03b15f26f6" dependencies = [ "aws-smithy-async", "aws-smithy-http", + "aws-smithy-http-client", "aws-smithy-observability", "aws-smithy-runtime-api", "aws-smithy-types", @@ -431,6 +478,29 @@ version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3" +[[package]] +name = "bindgen" +version = "0.69.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" +dependencies = [ + "bitflags 2.9.1", + "cexpr", + "clang-sys", + "itertools 0.12.1", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash 1.1.0", + "shlex", + "syn 2.0.104", + "which", +] + [[package]] name = "bindgen" version = "0.71.1" @@ -440,13 +510,13 @@ dependencies = [ "bitflags 2.9.1", "cexpr", "clang-sys", - "itertools", + "itertools 0.13.0", "log", "prettyplease", "proc-macro2", "quote", "regex", - "rustc-hash", + "rustc-hash 2.1.1", "shlex", "syn 2.0.104", ] @@ -636,6 +706,15 @@ dependencies = [ "libloading", ] +[[package]] +name = "cmake" +version = "0.1.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0" +dependencies = [ + "cc", +] + [[package]] name = "const-oid" version = "0.9.6" @@ -678,6 +757,16 @@ dependencies = [ "libc", ] +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -899,6 +988,12 @@ dependencies = [ "syn 2.0.104", ] +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + [[package]] name = "dyn-clone" version = "1.0.19" @@ -994,6 +1089,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "function_name" version = "0.2.3" @@ -1391,6 +1492,7 @@ dependencies = [ "hyper 1.6.0", "hyper-util", "rustls", + "rustls-native-certs", "rustls-pki-types", "tokio", "tokio-rustls", @@ -1648,6 +1750,15 @@ dependencies = [ "serde", ] +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.13.0" @@ -1721,6 +1832,12 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + [[package]] name = "libc" version = "0.2.174" @@ -1745,7 +1862,7 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7518e6902e94f92e7c7271232684b60988b4bd813529b4ef9d97aead96956ae8" dependencies = [ - "bindgen", + "bindgen 0.71.1", "pkg-config", ] @@ -1765,6 +1882,12 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + [[package]] name = "linux-raw-sys" version = "0.9.4" @@ -2032,7 +2155,7 @@ dependencies = [ "openssl-probe", "openssl-sys", "schannel", - "security-framework", + "security-framework 2.11.1", "security-framework-sys", "tempfile", ] @@ -2378,7 +2501,7 @@ dependencies = [ "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash", + "rustc-hash 2.1.1", "rustls", "socket2 0.5.10", "thiserror 2.0.12", @@ -2398,7 +2521,7 @@ dependencies = [ "lru-slab", "rand 0.9.2", "ring", - "rustc-hash", + "rustc-hash 2.1.1", "rustls", "rustls-pki-types", "slab", @@ -2656,6 +2779,12 @@ version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + [[package]] name = "rustc-hash" version = "2.1.1" @@ -2681,6 +2810,19 @@ dependencies = [ "semver", ] +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags 2.9.1", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.52.0", +] + [[package]] name = "rustix" version = "1.0.8" @@ -2690,7 +2832,7 @@ dependencies = [ "bitflags 2.9.1", "errno", "libc", - "linux-raw-sys", + "linux-raw-sys 0.9.4", "windows-sys 0.60.2", ] @@ -2700,6 +2842,7 @@ version = "0.23.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2491382039b29b9b11ff08b76ff6c97cf287671dbb74f0be44bda389fffe9bd1" dependencies = [ + "aws-lc-rs", "log", "once_cell", "ring", @@ -2709,6 +2852,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "rustls-native-certs" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3" +dependencies = [ + "openssl-probe", + "rustls-pki-types", + "schannel", + "security-framework 3.2.0", +] + [[package]] name = "rustls-pki-types" version = "1.12.0" @@ -2725,6 +2880,7 @@ version = "0.103.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc" dependencies = [ + "aws-lc-rs", "ring", "rustls-pki-types", "untrusted", @@ -2808,7 +2964,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ "bitflags 2.9.1", - "core-foundation", + "core-foundation 0.9.4", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" +dependencies = [ + "bitflags 2.9.1", + "core-foundation 0.10.1", "core-foundation-sys", "libc", "security-framework-sys", @@ -3124,7 +3293,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ "bitflags 2.9.1", - "core-foundation", + "core-foundation 0.9.4", "system-configuration-sys", ] @@ -3159,7 +3328,7 @@ dependencies = [ "fastrand", "getrandom 0.3.3", "once_cell", - "rustix", + "rustix 1.0.8", "windows-sys 0.59.0", ] @@ -3748,6 +3917,18 @@ dependencies = [ "rustls-pki-types", ] +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix 0.38.44", +] + [[package]] name = "widestring" version = "1.2.0" diff --git a/Cargo.toml b/Cargo.toml index e734d1283..fe878faa9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -136,6 +136,7 @@ default-features = false version = "1" optional = true default-features = false +features = ["default-https-client", "rt-tokio"] [dependencies.aws-sdk-sts] version = "=1.73" diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index b513c1b02..5f86c5948 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -191,8 +191,8 @@ pub async fn get_aws_credentials(credential: &Credential) -> Result )) } else { // If credentials are not provided in the URI, use the AWS SDK to load - let creds = aws_config::load_defaults(BehaviorVersion::latest()) - .await + let config = aws_config::load_defaults(BehaviorVersion::latest()).await; + let creds = config .credentials_provider() .ok_or_else(|| { Error::authentication_error(MECH_NAME, "no credential provider configured") From 725d3738fd6d560e1f58647772246305babb6dae Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Mon, 28 Jul 2025 18:28:43 -0400 Subject: [PATCH 22/43] Comment out tests for credential caching --- src/client/auth/aws.rs | 66 ++++++------ src/test/auth/aws.rs | 222 +++++++++++++++++++++-------------------- 2 files changed, 146 insertions(+), 142 deletions(-) diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index 5f86c5948..73dcbbbf0 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -631,44 +631,44 @@ impl ServerFirst { } } -#[cfg(test)] -pub(crate) mod test_utils { - use super::{AwsCredential, CACHED_CREDENTIAL}; +// #[cfg(test)] +// pub(crate) mod test_utils { +// use super::{AwsCredential, CACHED_CREDENTIAL}; - pub(crate) async fn cached_credential() -> Option { - CACHED_CREDENTIAL.lock().await.clone() - } +// pub(crate) async fn cached_credential() -> Option { +// CACHED_CREDENTIAL.lock().await.clone() +// } - pub(crate) async fn clear_cached_credential() { - *CACHED_CREDENTIAL.lock().await = None; - } +// pub(crate) async fn clear_cached_credential() { +// *CACHED_CREDENTIAL.lock().await = None; +// } - pub(crate) async fn poison_cached_credential() { - CACHED_CREDENTIAL - .lock() - .await - .as_mut() - .unwrap() - .access_key_id = "bad".into(); - } +// pub(crate) async fn poison_cached_credential() { +// CACHED_CREDENTIAL +// .lock() +// .await +// .as_mut() +// .unwrap() +// .access_key_id = "bad".into(); +// } - pub(crate) async fn cached_access_key_id() -> String { - cached_credential().await.unwrap().access_key_id - } +// pub(crate) async fn cached_access_key_id() -> String { +// cached_credential().await.unwrap().access_key_id +// } - pub(crate) async fn cached_secret_access_key() -> String { - cached_credential().await.unwrap().secret_access_key - } +// pub(crate) async fn cached_secret_access_key() -> String { +// cached_credential().await.unwrap().secret_access_key +// } - pub(crate) async fn cached_session_token() -> Option { - cached_credential().await.unwrap().session_token - } +// pub(crate) async fn cached_session_token() -> Option { +// cached_credential().await.unwrap().session_token +// } - pub(crate) async fn cached_expiration() -> crate::bson::DateTime { - cached_credential().await.unwrap().expiration.unwrap() - } +// pub(crate) async fn cached_expiration() -> crate::bson::DateTime { +// cached_credential().await.unwrap().expiration.unwrap() +// } - pub(crate) async fn set_cached_expiration(expiration: crate::bson::DateTime) { - CACHED_CREDENTIAL.lock().await.as_mut().unwrap().expiration = Some(expiration); - } -} +// pub(crate) async fn set_cached_expiration(expiration: crate::bson::DateTime) { +// CACHED_CREDENTIAL.lock().await.as_mut().unwrap().expiration = Some(expiration); +// } +// } diff --git a/src/test/auth/aws.rs b/src/test/auth/aws.rs index e2580aff9..f701c5a74 100644 --- a/src/test/auth/aws.rs +++ b/src/test/auth/aws.rs @@ -1,9 +1,9 @@ -use std::env::{remove_var, set_var, var}; +// use std::env::{remove_var, set_var, var}; use crate::{ bson::{doc, Document}, - client::auth::aws::test_utils::*, - test::DEFAULT_URI, + // client::auth::aws::test_utils::*, + // test::DEFAULT_URI, Client, }; @@ -18,109 +18,113 @@ async fn auth_aws() { // The TestClient performs operations upon creation that trigger authentication, so the credential // caching tests use a regular client instead to avoid that noise. -async fn get_client() -> Client { - Client::with_uri_str(DEFAULT_URI.clone()).await.unwrap() -} - -#[tokio::test] -async fn credential_caching() { - // This test should only be run when authenticating using AWS endpoints. - if var("SKIP_CREDENTIAL_CACHING_TESTS").is_ok() { - return; - } - - clear_cached_credential().await; - - let client = get_client().await; - let coll = client.database("aws").collection::("somecoll"); - coll.find_one(doc! {}).await.unwrap(); - assert!(cached_credential().await.is_some()); - - let now = crate::bson::DateTime::now(); - set_cached_expiration(now).await; - - let client = get_client().await; - let coll = client.database("aws").collection::("somecoll"); - coll.find_one(doc! {}).await.unwrap(); - assert!(cached_credential().await.is_some()); - assert!(cached_expiration().await > now); - - poison_cached_credential().await; - - let client = get_client().await; - let coll = client.database("aws").collection::("somecoll"); - match coll.find_one(doc! {}).await { - Ok(_) => panic!( - "find one should have failed with authentication error due to poisoned cached \ - credential" - ), - Err(error) => assert!(error.is_auth_error()), - } - assert!(cached_credential().await.is_none()); - - coll.find_one(doc! {}).await.unwrap(); - assert!(cached_credential().await.is_some()); -} - -#[tokio::test] -async fn credential_caching_environment_vars() { - // This test should only be run when authenticating using AWS endpoints. - if var("SKIP_CREDENTIAL_CACHING_TESTS").is_ok() { - return; - } - - clear_cached_credential().await; - - let client = get_client().await; - let coll = client.database("aws").collection::("somecoll"); - coll.find_one(doc! {}).await.unwrap(); - assert!(cached_credential().await.is_some()); - - set_var("AWS_ACCESS_KEY_ID", cached_access_key_id().await); - set_var("AWS_SECRET_ACCESS_KEY", cached_secret_access_key().await); - if let Some(session_token) = cached_session_token().await { - set_var("AWS_SESSION_TOKEN", session_token); - } - clear_cached_credential().await; - - let client = get_client().await; - let coll = client.database("aws").collection::("somecoll"); - coll.find_one(doc! {}).await.unwrap(); - assert!(cached_credential().await.is_none()); - - set_var("AWS_ACCESS_KEY_ID", "bad"); - set_var("AWS_SECRET_ACCESS_KEY", "bad"); - set_var("AWS_SESSION_TOKEN", "bad"); - - let client = get_client().await; - let coll = client.database("aws").collection::("somecoll"); - match coll.find_one(doc! {}).await { - Ok(_) => panic!( - "find one should have failed with authentication error due to poisoned environment \ - variables" - ), - Err(error) => assert!(error.is_auth_error()), - } - - remove_var("AWS_ACCESS_KEY_ID"); - remove_var("AWS_SECRET_ACCESS_KEY"); - remove_var("AWS_SESSION_TOKEN"); - clear_cached_credential().await; - - let client = get_client().await; - let coll = client.database("aws").collection::("somecoll"); - coll.find_one(doc! {}).await.unwrap(); - assert!(cached_credential().await.is_some()); - - set_var("AWS_ACCESS_KEY_ID", "bad"); - set_var("AWS_SECRET_ACCESS_KEY", "bad"); - set_var("AWS_SESSION_TOKEN", "bad"); - - let client = get_client().await; - let coll = client.database("aws").collection::("somecoll"); - coll.find_one(doc! {}).await.unwrap(); - - remove_var("AWS_ACCESS_KEY_ID"); - remove_var("AWS_SECRET_ACCESS_KEY"); - remove_var("AWS_SESSION_TOKEN"); -} +// async fn get_client() -> Client { +// Client::with_uri_str(DEFAULT_URI.clone()).await.unwrap() +// } + +// #[tokio::test] +// async fn credential_caching() { +// // This test should only be run when authenticating using AWS endpoints. +// if var("SKIP_CREDENTIAL_CACHING_TESTS").is_ok() { +// return; +// } + +// clear_cached_credential().await; + +// let client = get_client().await; +// let coll = client.database("aws").collection::("somecoll"); +// coll.find_one(doc! {}).await.unwrap(); +// assert!(cached_credential().await.is_some()); + +// let now = crate::bson::DateTime::now(); +// set_cached_expiration(now).await; + +// let client = get_client().await; +// let coll = client.database("aws").collection::("somecoll"); +// coll.find_one(doc! {}).await.unwrap(); +// assert!(cached_credential().await.is_some()); +// assert!(cached_expiration().await > now); + +// poison_cached_credential().await; + +// let client = get_client().await; +// let coll = client.database("aws").collection::("somecoll"); +// match coll.find_one(doc! {}).await { +// Ok(_) => panic!( +// "find one should have failed with authentication error due to poisoned cached \ +// credential" +// ), +// Err(error) => assert!(error.is_auth_error()), +// } +// assert!(cached_credential().await.is_none()); + +// coll.find_one(doc! {}).await.unwrap(); +// assert!(cached_credential().await.is_some()); +// } + +// todo: tests for aws sdk caching +// TODO: find documentation for rust aws sdk credential caching +// can delete caching logic if the aws sdk handles it properly for our needs + +// #[tokio::test] +// async fn credential_caching_environment_vars() { +// // This test should only be run when authenticating using AWS endpoints. +// if var("SKIP_CREDENTIAL_CACHING_TESTS").is_ok() { +// return; +// } + +// clear_cached_credential().await; + +// let client = get_client().await; +// let coll = client.database("aws").collection::("somecoll"); +// coll.find_one(doc! {}).await.unwrap(); +// assert!(cached_credential().await.is_some()); + +// set_var("AWS_ACCESS_KEY_ID", cached_access_key_id().await); +// set_var("AWS_SECRET_ACCESS_KEY", cached_secret_access_key().await); +// if let Some(session_token) = cached_session_token().await { +// set_var("AWS_SESSION_TOKEN", session_token); +// } +// clear_cached_credential().await; + +// let client = get_client().await; +// let coll = client.database("aws").collection::("somecoll"); +// coll.find_one(doc! {}).await.unwrap(); +// assert!(cached_credential().await.is_none()); + +// set_var("AWS_ACCESS_KEY_ID", "bad"); +// set_var("AWS_SECRET_ACCESS_KEY", "bad"); +// set_var("AWS_SESSION_TOKEN", "bad"); + +// let client = get_client().await; +// let coll = client.database("aws").collection::("somecoll"); +// match coll.find_one(doc! {}).await { +// Ok(_) => panic!( +// "find one should have failed with authentication error due to poisoned environment \ +// variables" +// ), +// Err(error) => assert!(error.is_auth_error()), +// } + +// remove_var("AWS_ACCESS_KEY_ID"); +// remove_var("AWS_SECRET_ACCESS_KEY"); +// remove_var("AWS_SESSION_TOKEN"); +// clear_cached_credential().await; + +// let client = get_client().await; +// let coll = client.database("aws").collection::("somecoll"); +// coll.find_one(doc! {}).await.unwrap(); +// assert!(cached_credential().await.is_some()); + +// set_var("AWS_ACCESS_KEY_ID", "bad"); +// set_var("AWS_SECRET_ACCESS_KEY", "bad"); +// set_var("AWS_SESSION_TOKEN", "bad"); + +// let client = get_client().await; +// let coll = client.database("aws").collection::("somecoll"); +// coll.find_one(doc! {}).await.unwrap(); + +// remove_var("AWS_ACCESS_KEY_ID"); +// remove_var("AWS_SECRET_ACCESS_KEY"); +// remove_var("AWS_SESSION_TOKEN"); +// } From 46e171d662041d8543e661281915fe820d6119e2 Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Tue, 29 Jul 2025 13:52:00 -0400 Subject: [PATCH 23/43] Update Cargo.lock --- Cargo.lock | 286 ++++++++++++++++++++--------------------------------- 1 file changed, 106 insertions(+), 180 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6806d1435..2707107da 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" @@ -35,7 +35,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", - "getrandom 0.3.3", + "getrandom 0.3.2", "once_cell", "version_check", "zerocopy", @@ -111,7 +111,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -122,7 +122,7 @@ checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -484,7 +484,7 @@ version = "0.69.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "cexpr", "clang-sys", "itertools 0.12.1", @@ -497,7 +497,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.104", + "syn 2.0.101", "which", ] @@ -507,7 +507,7 @@ version = "0.71.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "cexpr", "clang-sys", "itertools 0.13.0", @@ -518,7 +518,7 @@ dependencies = [ "regex", "rustc-hash 2.1.1", "shlex", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -529,9 +529,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.1" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" +checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" [[package]] name = "bitvec" @@ -572,12 +572,12 @@ dependencies = [ "base64 0.22.1", "bitvec", "getrandom 0.2.16", - "getrandom 0.3.3", + "getrandom 0.3.2", "hex", - "indexmap 2.10.0", + "indexmap 2.9.0", "js-sys", "once_cell", - "rand 0.9.2", + "rand 0.9.1", "serde", "serde_bytes", "serde_json", @@ -588,18 +588,18 @@ dependencies = [ [[package]] name = "bson" version = "3.0.0" -source = "git+https://github.com/mongodb/bson-rust?branch=main#5622ad47769ac039d32701b493927a735a6467d2" +source = "git+https://github.com/mongodb/bson-rust?branch=main#266aa3039e603cad96a5dde377aaf8251be76c79" dependencies = [ "ahash", "base64 0.22.1", "bitvec", "getrandom 0.2.16", - "getrandom 0.3.3", + "getrandom 0.3.2", "hex", - "indexmap 2.10.0", + "indexmap 2.9.0", "js-sys", "once_cell", - "rand 0.9.2", + "rand 0.9.1", "serde", "serde_bytes", "serde_json", @@ -798,7 +798,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d4ddf7139e64dc916b11d434421031bcc5ba02e521a49a011652a0f68775188" dependencies = [ "anyhow", - "bitflags 2.9.1", + "bitflags 2.9.0", "bytes", "libgssapi", "windows", @@ -876,7 +876,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -887,7 +887,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -924,7 +924,7 @@ checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -935,7 +935,7 @@ checksum = "510c292c8cf384b1a340b816a9a6cf2599eb8f566a44949024af88418000c50b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -948,7 +948,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -985,7 +985,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -1024,7 +1024,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -1040,7 +1040,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.59.0", ] [[package]] @@ -1177,7 +1177,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -1235,9 +1235,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.3.3" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" dependencies = [ "cfg-if", "js-sys", @@ -1271,7 +1271,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.3.1", - "indexmap 2.10.0", + "indexmap 2.9.0", "slab", "tokio", "tokio-util", @@ -1286,9 +1286,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.15.4" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" +checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" [[package]] name = "heck" @@ -1347,7 +1347,7 @@ dependencies = [ "parking_lot", "rand 0.8.5", "resolv-conf", - "smallvec 1.15.1", + "smallvec 1.15.0", "thiserror 1.0.69", "tokio", "tracing", @@ -1477,7 +1477,7 @@ dependencies = [ "httparse", "itoa", "pin-project-lite", - "smallvec 1.15.1", + "smallvec 1.15.0", "tokio", "want", ] @@ -1497,7 +1497,7 @@ dependencies = [ "tokio", "tokio-rustls", "tower-service", - "webpki-roots 1.0.2", + "webpki-roots 1.0.0", ] [[package]] @@ -1603,7 +1603,7 @@ dependencies = [ "icu_normalizer_data", "icu_properties", "icu_provider", - "smallvec 1.15.1", + "smallvec 1.15.0", "zerovec", ] @@ -1665,7 +1665,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ "idna_adapter", - "smallvec 1.15.1", + "smallvec 1.15.0", "utf8_iter", ] @@ -1692,12 +1692,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.10.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" +checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" dependencies = [ "equivalent", - "hashbrown 0.15.4", + "hashbrown 0.15.3", "serde", ] @@ -1717,7 +1717,7 @@ version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "cfg-if", "libc", ] @@ -1780,7 +1780,7 @@ version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" dependencies = [ - "getrandom 0.3.3", + "getrandom 0.3.2", "libc", ] @@ -1850,7 +1850,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "834339e86b2561169d45d3b01741967fee3e5716c7d0b6e33cd4e3b34c9558cd" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "bytes", "lazy_static", "libgssapi-sys", @@ -1873,7 +1873,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" dependencies = [ "cfg-if", - "windows-targets 0.53.3", + "windows-targets 0.52.6", ] [[package]] @@ -1940,7 +1940,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -1954,7 +1954,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -1965,7 +1965,7 @@ checksum = "b02abfe41815b5bd98dbd4260173db2c116dda171dc0fe7838cb206333b83308" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -1976,7 +1976,7 @@ checksum = "73ea28ee64b88876bf45277ed9a5817c1817df061a74f2b988971a12570e5869" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -2140,7 +2140,7 @@ dependencies = [ "macro_magic", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -2166,7 +2166,7 @@ version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "cfg-if", "cfg_aliases", "libc", @@ -2253,7 +2253,7 @@ version = "0.10.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "cfg-if", "foreign-types", "libc", @@ -2270,7 +2270,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -2322,7 +2322,7 @@ dependencies = [ "cfg-if", "libc", "redox_syscall", - "smallvec 1.15.1", + "smallvec 1.15.0", "windows-targets 0.52.6", ] @@ -2378,7 +2378,7 @@ checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -2464,12 +2464,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.36" +version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff24dfcda44452b9816fff4cd4227e1bb73ff5a2f1bc1105aa92fb8565ce44d2" +checksum = "6837b9e10d61f45f987d50808f83d1ee3d206c66acf650c3e4ae2e1f6ddedf55" dependencies = [ "proc-macro2", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -2517,9 +2517,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49df843a9161c85bb8aae55f101bc0bac8bcafd637a620d9122fd7e0b2f7422e" dependencies = [ "bytes", - "getrandom 0.3.3", + "getrandom 0.3.2", "lru-slab", - "rand 0.9.2", + "rand 0.9.1", "ring", "rustc-hash 2.1.1", "rustls", @@ -2579,9 +2579,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.2" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", @@ -2622,7 +2622,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "getrandom 0.3.3", + "getrandom 0.3.2", ] [[package]] @@ -2647,11 +2647,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.17" +version = "0.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" +checksum = "7251471db004e509f4e75a62cca9435365b5ec7bcdff530d612ac7c87c44a792" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", ] [[package]] @@ -2671,7 +2671,7 @@ checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -2750,7 +2750,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 1.0.2", + "webpki-roots 1.0.0", ] [[package]] @@ -2816,7 +2816,7 @@ version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "errno", "libc", "linux-raw-sys 0.4.15", @@ -2829,18 +2829,18 @@ version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "errno", "libc", "linux-raw-sys 0.9.4", - "windows-sys 0.60.2", + "windows-sys 0.59.0", ] [[package]] name = "rustls" -version = "0.23.29" +version = "0.23.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2491382039b29b9b11ff08b76ff6c97cf287671dbb74f0be44bda389fffe9bd1" +checksum = "069a8df149a16b1a12dcc31497c3396a173844be3cac4bd40c9e7671fef96671" dependencies = [ "aws-lc-rs", "log", @@ -2963,7 +2963,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "core-foundation 0.9.4", "core-foundation-sys", "libc", @@ -2976,7 +2976,7 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "core-foundation 0.10.1", "core-foundation-sys", "libc", @@ -3036,7 +3036,7 @@ checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -3045,7 +3045,7 @@ version = "1.0.141" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3" dependencies = [ - "indexmap 2.10.0", + "indexmap 2.9.0", "itoa", "memchr", "ryu", @@ -3084,7 +3084,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.10.0", + "indexmap 2.9.0", "schemars 0.9.0", "schemars 1.0.4", "serde", @@ -3103,7 +3103,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -3175,9 +3175,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.15.1" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" [[package]] name = "snap" @@ -3257,9 +3257,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.104" +version = "2.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" +checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" dependencies = [ "proc-macro2", "quote", @@ -3283,7 +3283,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -3292,7 +3292,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "core-foundation 0.9.4", "system-configuration-sys", ] @@ -3326,7 +3326,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" dependencies = [ "fastrand", - "getrandom 0.3.3", + "getrandom 0.3.2", "once_cell", "rustix 1.0.8", "windows-sys 0.59.0", @@ -3358,7 +3358,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -3369,7 +3369,7 @@ checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -3474,7 +3474,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -3578,7 +3578,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "bytes", "futures-util", "http 1.3.1", @@ -3622,7 +3622,7 @@ checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -3654,7 +3654,7 @@ checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "nu-ansi-term", "sharded-slab", - "smallvec 1.15.1", + "smallvec 1.15.0", "thread_local", "tracing-core", "tracing-log", @@ -3683,7 +3683,7 @@ checksum = "3c36781cc0e46a83726d9879608e4cf6c2505237e263a8eb8c24502989cfdb28" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -3754,7 +3754,7 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" dependencies = [ - "getrandom 0.3.3", + "getrandom 0.3.2", "js-sys", "serde", "wasm-bindgen", @@ -3830,7 +3830,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", "wasm-bindgen-shared", ] @@ -3865,7 +3865,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3905,14 +3905,14 @@ version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" dependencies = [ - "webpki-roots 1.0.2", + "webpki-roots 1.0.0", ] [[package]] name = "webpki-roots" -version = "1.0.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8983c3ab33d6fb807cfcdad2491c4ea8cbc8ed839181c7dfd9c67c83e261b2" +checksum = "2853738d1cc4f2da3a225c18ec6c3721abb31961096e9dbf5ab35fa88b19cfdb" dependencies = [ "rustls-pki-types", ] @@ -4011,7 +4011,7 @@ checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -4022,7 +4022,7 @@ checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -4097,15 +4097,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-sys" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" -dependencies = [ - "windows-targets 0.53.3", -] - [[package]] name = "windows-targets" version = "0.48.5" @@ -4130,30 +4121,13 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", + "windows_i686_gnullvm", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] -[[package]] -name = "windows-targets" -version = "0.53.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" -dependencies = [ - "windows-link", - "windows_aarch64_gnullvm 0.53.0", - "windows_aarch64_msvc 0.53.0", - "windows_i686_gnu 0.53.0", - "windows_i686_gnullvm 0.53.0", - "windows_i686_msvc 0.53.0", - "windows_x86_64_gnu 0.53.0", - "windows_x86_64_gnullvm 0.53.0", - "windows_x86_64_msvc 0.53.0", -] - [[package]] name = "windows-threading" version = "0.1.0" @@ -4175,12 +4149,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" - [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -4193,12 +4161,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" - [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -4211,24 +4173,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" -[[package]] -name = "windows_i686_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" - [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" - [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -4241,12 +4191,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_i686_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" - [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -4259,12 +4203,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" - [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -4277,12 +4215,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" - [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -4295,12 +4227,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" - [[package]] name = "winreg" version = "0.50.0" @@ -4317,7 +4243,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", ] [[package]] @@ -4367,7 +4293,7 @@ checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", "synstructure", ] @@ -4388,7 +4314,7 @@ checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -4408,7 +4334,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", "synstructure", ] @@ -4448,7 +4374,7 @@ checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] From 0cd8dfa4ca33bb89a0d168561e2e3a77ac007fc2 Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Tue, 29 Jul 2025 14:58:49 -0400 Subject: [PATCH 24/43] Fix cargo.lock --- Cargo.lock | 286 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 180 insertions(+), 106 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2707107da..e50785c79 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 4 +version = 3 [[package]] name = "addr2line" @@ -35,7 +35,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", - "getrandom 0.3.2", + "getrandom 0.3.3", "once_cell", "version_check", "zerocopy", @@ -111,7 +111,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -122,7 +122,7 @@ checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -484,7 +484,7 @@ version = "0.69.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "cexpr", "clang-sys", "itertools 0.12.1", @@ -497,7 +497,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.101", + "syn 2.0.104", "which", ] @@ -507,7 +507,7 @@ version = "0.71.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "cexpr", "clang-sys", "itertools 0.13.0", @@ -518,7 +518,7 @@ dependencies = [ "regex", "rustc-hash 2.1.1", "shlex", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -529,9 +529,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" [[package]] name = "bitvec" @@ -572,12 +572,12 @@ dependencies = [ "base64 0.22.1", "bitvec", "getrandom 0.2.16", - "getrandom 0.3.2", + "getrandom 0.3.3", "hex", - "indexmap 2.9.0", + "indexmap 2.10.0", "js-sys", "once_cell", - "rand 0.9.1", + "rand 0.9.2", "serde", "serde_bytes", "serde_json", @@ -588,18 +588,18 @@ dependencies = [ [[package]] name = "bson" version = "3.0.0" -source = "git+https://github.com/mongodb/bson-rust?branch=main#266aa3039e603cad96a5dde377aaf8251be76c79" +source = "git+https://github.com/mongodb/bson-rust?branch=main#5622ad47769ac039d32701b493927a735a6467d2" dependencies = [ "ahash", "base64 0.22.1", "bitvec", "getrandom 0.2.16", - "getrandom 0.3.2", + "getrandom 0.3.3", "hex", - "indexmap 2.9.0", + "indexmap 2.10.0", "js-sys", "once_cell", - "rand 0.9.1", + "rand 0.9.2", "serde", "serde_bytes", "serde_json", @@ -798,7 +798,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d4ddf7139e64dc916b11d434421031bcc5ba02e521a49a011652a0f68775188" dependencies = [ "anyhow", - "bitflags 2.9.0", + "bitflags 2.9.1", "bytes", "libgssapi", "windows", @@ -876,7 +876,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -887,7 +887,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -924,7 +924,7 @@ checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -935,7 +935,7 @@ checksum = "510c292c8cf384b1a340b816a9a6cf2599eb8f566a44949024af88418000c50b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -948,7 +948,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -985,7 +985,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1024,7 +1024,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1040,7 +1040,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -1177,7 +1177,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1235,9 +1235,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ "cfg-if", "js-sys", @@ -1271,7 +1271,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.3.1", - "indexmap 2.9.0", + "indexmap 2.10.0", "slab", "tokio", "tokio-util", @@ -1286,9 +1286,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.15.3" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" +checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" [[package]] name = "heck" @@ -1347,7 +1347,7 @@ dependencies = [ "parking_lot", "rand 0.8.5", "resolv-conf", - "smallvec 1.15.0", + "smallvec 1.15.1", "thiserror 1.0.69", "tokio", "tracing", @@ -1477,7 +1477,7 @@ dependencies = [ "httparse", "itoa", "pin-project-lite", - "smallvec 1.15.0", + "smallvec 1.15.1", "tokio", "want", ] @@ -1497,7 +1497,7 @@ dependencies = [ "tokio", "tokio-rustls", "tower-service", - "webpki-roots 1.0.0", + "webpki-roots 1.0.2", ] [[package]] @@ -1603,7 +1603,7 @@ dependencies = [ "icu_normalizer_data", "icu_properties", "icu_provider", - "smallvec 1.15.0", + "smallvec 1.15.1", "zerovec", ] @@ -1665,7 +1665,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ "idna_adapter", - "smallvec 1.15.0", + "smallvec 1.15.1", "utf8_iter", ] @@ -1692,12 +1692,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" +checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" dependencies = [ "equivalent", - "hashbrown 0.15.3", + "hashbrown 0.15.4", "serde", ] @@ -1717,7 +1717,7 @@ version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "cfg-if", "libc", ] @@ -1780,7 +1780,7 @@ version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" dependencies = [ - "getrandom 0.3.2", + "getrandom 0.3.3", "libc", ] @@ -1850,7 +1850,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "834339e86b2561169d45d3b01741967fee3e5716c7d0b6e33cd4e3b34c9558cd" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "bytes", "lazy_static", "libgssapi-sys", @@ -1873,7 +1873,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.53.3", ] [[package]] @@ -1940,7 +1940,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1954,7 +1954,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1965,7 +1965,7 @@ checksum = "b02abfe41815b5bd98dbd4260173db2c116dda171dc0fe7838cb206333b83308" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1976,7 +1976,7 @@ checksum = "73ea28ee64b88876bf45277ed9a5817c1817df061a74f2b988971a12570e5869" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -2140,7 +2140,7 @@ dependencies = [ "macro_magic", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -2166,7 +2166,7 @@ version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "cfg-if", "cfg_aliases", "libc", @@ -2253,7 +2253,7 @@ version = "0.10.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "cfg-if", "foreign-types", "libc", @@ -2270,7 +2270,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -2322,7 +2322,7 @@ dependencies = [ "cfg-if", "libc", "redox_syscall", - "smallvec 1.15.0", + "smallvec 1.15.1", "windows-targets 0.52.6", ] @@ -2378,7 +2378,7 @@ checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -2464,12 +2464,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.34" +version = "0.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6837b9e10d61f45f987d50808f83d1ee3d206c66acf650c3e4ae2e1f6ddedf55" +checksum = "ff24dfcda44452b9816fff4cd4227e1bb73ff5a2f1bc1105aa92fb8565ce44d2" dependencies = [ "proc-macro2", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -2517,9 +2517,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49df843a9161c85bb8aae55f101bc0bac8bcafd637a620d9122fd7e0b2f7422e" dependencies = [ "bytes", - "getrandom 0.3.2", + "getrandom 0.3.3", "lru-slab", - "rand 0.9.1", + "rand 0.9.2", "ring", "rustc-hash 2.1.1", "rustls", @@ -2579,9 +2579,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", @@ -2622,7 +2622,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "getrandom 0.3.2", + "getrandom 0.3.3", ] [[package]] @@ -2647,11 +2647,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.16" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7251471db004e509f4e75a62cca9435365b5ec7bcdff530d612ac7c87c44a792" +checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", ] [[package]] @@ -2671,7 +2671,7 @@ checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -2750,7 +2750,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 1.0.0", + "webpki-roots 1.0.2", ] [[package]] @@ -2816,7 +2816,7 @@ version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "errno", "libc", "linux-raw-sys 0.4.15", @@ -2829,18 +2829,18 @@ version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "errno", "libc", "linux-raw-sys 0.9.4", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] name = "rustls" -version = "0.23.30" +version = "0.23.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069a8df149a16b1a12dcc31497c3396a173844be3cac4bd40c9e7671fef96671" +checksum = "c0ebcbd2f03de0fc1122ad9bb24b127a5a6cd51d72604a3f3c50ac459762b6cc" dependencies = [ "aws-lc-rs", "log", @@ -2963,7 +2963,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "core-foundation 0.9.4", "core-foundation-sys", "libc", @@ -2976,7 +2976,7 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "core-foundation 0.10.1", "core-foundation-sys", "libc", @@ -3036,7 +3036,7 @@ checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3045,7 +3045,7 @@ version = "1.0.141" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3" dependencies = [ - "indexmap 2.9.0", + "indexmap 2.10.0", "itoa", "memchr", "ryu", @@ -3084,7 +3084,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.9.0", + "indexmap 2.10.0", "schemars 0.9.0", "schemars 1.0.4", "serde", @@ -3103,7 +3103,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3175,9 +3175,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.15.0" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "snap" @@ -3257,9 +3257,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.101" +version = "2.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" +checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" dependencies = [ "proc-macro2", "quote", @@ -3283,7 +3283,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3292,7 +3292,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "core-foundation 0.9.4", "system-configuration-sys", ] @@ -3326,7 +3326,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" dependencies = [ "fastrand", - "getrandom 0.3.2", + "getrandom 0.3.3", "once_cell", "rustix 1.0.8", "windows-sys 0.59.0", @@ -3358,7 +3358,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3369,7 +3369,7 @@ checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3474,7 +3474,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3578,7 +3578,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "bytes", "futures-util", "http 1.3.1", @@ -3622,7 +3622,7 @@ checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3654,7 +3654,7 @@ checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "nu-ansi-term", "sharded-slab", - "smallvec 1.15.0", + "smallvec 1.15.1", "thread_local", "tracing-core", "tracing-log", @@ -3683,7 +3683,7 @@ checksum = "3c36781cc0e46a83726d9879608e4cf6c2505237e263a8eb8c24502989cfdb28" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3754,7 +3754,7 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" dependencies = [ - "getrandom 0.3.2", + "getrandom 0.3.3", "js-sys", "serde", "wasm-bindgen", @@ -3830,7 +3830,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "wasm-bindgen-shared", ] @@ -3865,7 +3865,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3905,14 +3905,14 @@ version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" dependencies = [ - "webpki-roots 1.0.0", + "webpki-roots 1.0.2", ] [[package]] name = "webpki-roots" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2853738d1cc4f2da3a225c18ec6c3721abb31961096e9dbf5ab35fa88b19cfdb" +checksum = "7e8983c3ab33d6fb807cfcdad2491c4ea8cbc8ed839181c7dfd9c67c83e261b2" dependencies = [ "rustls-pki-types", ] @@ -4011,7 +4011,7 @@ checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -4022,7 +4022,7 @@ checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -4097,6 +4097,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.3", +] + [[package]] name = "windows-targets" version = "0.48.5" @@ -4121,13 +4130,30 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", + "windows_i686_gnullvm 0.52.6", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] +[[package]] +name = "windows-targets" +version = "0.53.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", +] + [[package]] name = "windows-threading" version = "0.1.0" @@ -4149,6 +4175,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -4161,6 +4193,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -4173,12 +4211,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -4191,6 +4241,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -4203,6 +4259,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -4215,6 +4277,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -4227,6 +4295,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + [[package]] name = "winreg" version = "0.50.0" @@ -4243,7 +4317,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", ] [[package]] @@ -4293,7 +4367,7 @@ checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "synstructure", ] @@ -4314,7 +4388,7 @@ checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -4334,7 +4408,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "synstructure", ] @@ -4374,7 +4448,7 @@ checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] From a48293645709a4f3534d400ae99d5f40d2e4c096 Mon Sep 17 00:00:00 2001 From: Isabel Atkinson Date: Tue, 29 Jul 2025 13:24:17 -0600 Subject: [PATCH 25/43] revert unneeded changes in cargo.lock --- Cargo.lock | 332 ++++++++++++++++++++--------------------------------- 1 file changed, 124 insertions(+), 208 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e50785c79..033d108ef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" @@ -35,7 +35,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", - "getrandom 0.3.3", + "getrandom 0.3.2", "once_cell", "version_check", "zerocopy", @@ -111,7 +111,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -122,7 +122,7 @@ checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -484,7 +484,7 @@ version = "0.69.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "cexpr", "clang-sys", "itertools 0.12.1", @@ -497,7 +497,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.104", + "syn 2.0.101", "which", ] @@ -507,7 +507,7 @@ version = "0.71.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "cexpr", "clang-sys", "itertools 0.13.0", @@ -518,7 +518,7 @@ dependencies = [ "regex", "rustc-hash 2.1.1", "shlex", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -529,9 +529,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.1" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" +checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" [[package]] name = "bitvec" @@ -572,12 +572,12 @@ dependencies = [ "base64 0.22.1", "bitvec", "getrandom 0.2.16", - "getrandom 0.3.3", + "getrandom 0.3.2", "hex", - "indexmap 2.10.0", + "indexmap 2.9.0", "js-sys", "once_cell", - "rand 0.9.2", + "rand 0.9.1", "serde", "serde_bytes", "serde_json", @@ -588,18 +588,18 @@ dependencies = [ [[package]] name = "bson" version = "3.0.0" -source = "git+https://github.com/mongodb/bson-rust?branch=main#5622ad47769ac039d32701b493927a735a6467d2" +source = "git+https://github.com/mongodb/bson-rust?branch=main#266aa3039e603cad96a5dde377aaf8251be76c79" dependencies = [ "ahash", "base64 0.22.1", "bitvec", "getrandom 0.2.16", - "getrandom 0.3.3", + "getrandom 0.3.2", "hex", - "indexmap 2.10.0", + "indexmap 2.9.0", "js-sys", "once_cell", - "rand 0.9.2", + "rand 0.9.1", "serde", "serde_bytes", "serde_json", @@ -798,7 +798,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d4ddf7139e64dc916b11d434421031bcc5ba02e521a49a011652a0f68775188" dependencies = [ "anyhow", - "bitflags 2.9.1", + "bitflags 2.9.0", "bytes", "libgssapi", "windows", @@ -876,7 +876,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -887,7 +887,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -924,7 +924,7 @@ checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -935,7 +935,7 @@ checksum = "510c292c8cf384b1a340b816a9a6cf2599eb8f566a44949024af88418000c50b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -948,7 +948,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -985,7 +985,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -996,9 +996,9 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "dyn-clone" -version = "1.0.20" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" +checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" [[package]] name = "either" @@ -1024,7 +1024,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -1040,7 +1040,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.59.0", ] [[package]] @@ -1177,7 +1177,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -1235,9 +1235,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.3.3" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" dependencies = [ "cfg-if", "js-sys", @@ -1271,7 +1271,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.3.1", - "indexmap 2.10.0", + "indexmap 2.9.0", "slab", "tokio", "tokio-util", @@ -1286,9 +1286,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.15.4" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" +checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" [[package]] name = "heck" @@ -1347,7 +1347,7 @@ dependencies = [ "parking_lot", "rand 0.8.5", "resolv-conf", - "smallvec 1.15.1", + "smallvec 1.15.0", "thiserror 1.0.69", "tokio", "tracing", @@ -1455,7 +1455,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.10", + "socket2", "tokio", "tower-service", "tracing", @@ -1477,7 +1477,7 @@ dependencies = [ "httparse", "itoa", "pin-project-lite", - "smallvec 1.15.1", + "smallvec 1.15.0", "tokio", "want", ] @@ -1497,7 +1497,7 @@ dependencies = [ "tokio", "tokio-rustls", "tower-service", - "webpki-roots 1.0.2", + "webpki-roots 1.0.0", ] [[package]] @@ -1518,9 +1518,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.16" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" +checksum = "7f66d5bd4c6f02bf0542fad85d626775bab9258cf795a4256dcaf3161114d1df" dependencies = [ "base64 0.22.1", "bytes", @@ -1534,7 +1534,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2 0.6.0", + "socket2", "system-configuration", "tokio", "tower-service", @@ -1603,7 +1603,7 @@ dependencies = [ "icu_normalizer_data", "icu_properties", "icu_provider", - "smallvec 1.15.1", + "smallvec 1.15.0", "zerovec", ] @@ -1665,7 +1665,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ "idna_adapter", - "smallvec 1.15.1", + "smallvec 1.15.0", "utf8_iter", ] @@ -1692,12 +1692,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.10.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" +checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" dependencies = [ "equivalent", - "hashbrown 0.15.4", + "hashbrown 0.15.3", "serde", ] @@ -1713,11 +1713,11 @@ dependencies = [ [[package]] name = "io-uring" -version = "0.7.9" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" +checksum = "b86e202f00093dcba4275d4636b93ef9dd75d025ae560d2521b45ea28ab49013" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "cfg-if", "libc", ] @@ -1728,7 +1728,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.5.10", + "socket2", "widestring", "windows-sys 0.48.0", "winreg", @@ -1780,7 +1780,7 @@ version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" dependencies = [ - "getrandom 0.3.3", + "getrandom 0.3.2", "libc", ] @@ -1850,7 +1850,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "834339e86b2561169d45d3b01741967fee3e5716c7d0b6e33cd4e3b34c9558cd" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "bytes", "lazy_static", "libgssapi-sys", @@ -1873,7 +1873,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" dependencies = [ "cfg-if", - "windows-targets 0.53.3", + "windows-targets 0.52.6", ] [[package]] @@ -1940,7 +1940,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -1954,7 +1954,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -1965,7 +1965,7 @@ checksum = "b02abfe41815b5bd98dbd4260173db2c116dda171dc0fe7838cb206333b83308" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -1976,7 +1976,7 @@ checksum = "73ea28ee64b88876bf45277ed9a5817c1817df061a74f2b988971a12570e5869" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -2115,7 +2115,7 @@ dependencies = [ "sha1", "sha2", "snap", - "socket2 0.5.10", + "socket2", "stringprep", "strsim", "take_mut", @@ -2140,7 +2140,7 @@ dependencies = [ "macro_magic", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -2166,7 +2166,7 @@ version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "cfg-if", "cfg_aliases", "libc", @@ -2253,7 +2253,7 @@ version = "0.10.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "cfg-if", "foreign-types", "libc", @@ -2270,7 +2270,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -2322,7 +2322,7 @@ dependencies = [ "cfg-if", "libc", "redox_syscall", - "smallvec 1.15.1", + "smallvec 1.15.0", "windows-targets 0.52.6", ] @@ -2378,7 +2378,7 @@ checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -2464,12 +2464,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.36" +version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff24dfcda44452b9816fff4cd4227e1bb73ff5a2f1bc1105aa92fb8565ce44d2" +checksum = "6837b9e10d61f45f987d50808f83d1ee3d206c66acf650c3e4ae2e1f6ddedf55" dependencies = [ "proc-macro2", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -2503,7 +2503,7 @@ dependencies = [ "quinn-udp", "rustc-hash 2.1.1", "rustls", - "socket2 0.5.10", + "socket2", "thiserror 2.0.12", "tokio", "tracing", @@ -2517,9 +2517,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49df843a9161c85bb8aae55f101bc0bac8bcafd637a620d9122fd7e0b2f7422e" dependencies = [ "bytes", - "getrandom 0.3.3", + "getrandom 0.3.2", "lru-slab", - "rand 0.9.2", + "rand 0.9.1", "ring", "rustc-hash 2.1.1", "rustls", @@ -2540,7 +2540,7 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2 0.5.10", + "socket2", "tracing", "windows-sys 0.59.0", ] @@ -2579,9 +2579,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.2" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", @@ -2622,7 +2622,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "getrandom 0.3.3", + "getrandom 0.3.2", ] [[package]] @@ -2647,11 +2647,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.17" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" +checksum = "de3a5d9f0aba1dbcec1cc47f0ff94a4b778fe55bca98a6dfa92e4e094e57b1c4" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", ] [[package]] @@ -2671,7 +2671,7 @@ checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -2750,7 +2750,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 1.0.2", + "webpki-roots 1.0.0", ] [[package]] @@ -2775,9 +2775,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.26" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" +checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" [[package]] name = "rustc-hash" @@ -2816,7 +2816,7 @@ version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "errno", "libc", "linux-raw-sys 0.4.15", @@ -2829,18 +2829,18 @@ version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "errno", "libc", "linux-raw-sys 0.9.4", - "windows-sys 0.60.2", + "windows-sys 0.59.0", ] [[package]] name = "rustls" -version = "0.23.31" +version = "0.23.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ebcbd2f03de0fc1122ad9bb24b127a5a6cd51d72604a3f3c50ac459762b6cc" +checksum = "2491382039b29b9b11ff08b76ff6c97cf287671dbb74f0be44bda389fffe9bd1" dependencies = [ "aws-lc-rs", "log", @@ -2963,7 +2963,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "core-foundation 0.9.4", "core-foundation-sys", "libc", @@ -2976,7 +2976,7 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "core-foundation 0.10.1", "core-foundation-sys", "libc", @@ -3036,7 +3036,7 @@ checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -3045,7 +3045,7 @@ version = "1.0.141" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3" dependencies = [ - "indexmap 2.10.0", + "indexmap 2.9.0", "itoa", "memchr", "ryu", @@ -3084,7 +3084,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.10.0", + "indexmap 2.9.0", "schemars 0.9.0", "schemars 1.0.4", "serde", @@ -3103,7 +3103,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -3175,9 +3175,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.15.1" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" [[package]] name = "snap" @@ -3195,16 +3195,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "socket2" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" -dependencies = [ - "libc", - "windows-sys 0.59.0", -] - [[package]] name = "spki" version = "0.7.3" @@ -3257,9 +3247,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.104" +version = "2.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" +checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" dependencies = [ "proc-macro2", "quote", @@ -3283,7 +3273,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -3292,7 +3282,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "core-foundation 0.9.4", "system-configuration-sys", ] @@ -3326,7 +3316,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" dependencies = [ "fastrand", - "getrandom 0.3.3", + "getrandom 0.3.2", "once_cell", "rustix 1.0.8", "windows-sys 0.59.0", @@ -3358,7 +3348,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -3369,7 +3359,7 @@ checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -3448,9 +3438,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.47.0" +version = "1.46.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43864ed400b6043a4757a25c7a64a8efde741aed79a056a2fb348a406701bb35" +checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17" dependencies = [ "backtrace", "bytes", @@ -3461,9 +3451,9 @@ dependencies = [ "pin-project-lite", "signal-hook-registry", "slab", - "socket2 0.6.0", + "socket2", "tokio-macros", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -3474,7 +3464,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -3578,7 +3568,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", "bytes", "futures-util", "http 1.3.1", @@ -3622,7 +3612,7 @@ checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -3654,7 +3644,7 @@ checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "nu-ansi-term", "sharded-slab", - "smallvec 1.15.1", + "smallvec 1.15.0", "thread_local", "tracing-core", "tracing-log", @@ -3683,7 +3673,7 @@ checksum = "3c36781cc0e46a83726d9879608e4cf6c2505237e263a8eb8c24502989cfdb28" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -3754,7 +3744,7 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" dependencies = [ - "getrandom 0.3.3", + "getrandom 0.3.2", "js-sys", "serde", "wasm-bindgen", @@ -3830,7 +3820,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", "wasm-bindgen-shared", ] @@ -3865,7 +3855,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3905,14 +3895,14 @@ version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" dependencies = [ - "webpki-roots 1.0.2", + "webpki-roots 1.0.0", ] [[package]] name = "webpki-roots" -version = "1.0.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8983c3ab33d6fb807cfcdad2491c4ea8cbc8ed839181c7dfd9c67c83e261b2" +checksum = "2853738d1cc4f2da3a225c18ec6c3721abb31961096e9dbf5ab35fa88b19cfdb" dependencies = [ "rustls-pki-types", ] @@ -4011,7 +4001,7 @@ checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -4022,7 +4012,7 @@ checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -4097,15 +4087,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-sys" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" -dependencies = [ - "windows-targets 0.53.3", -] - [[package]] name = "windows-targets" version = "0.48.5" @@ -4130,30 +4111,13 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", + "windows_i686_gnullvm", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] -[[package]] -name = "windows-targets" -version = "0.53.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" -dependencies = [ - "windows-link", - "windows_aarch64_gnullvm 0.53.0", - "windows_aarch64_msvc 0.53.0", - "windows_i686_gnu 0.53.0", - "windows_i686_gnullvm 0.53.0", - "windows_i686_msvc 0.53.0", - "windows_x86_64_gnu 0.53.0", - "windows_x86_64_gnullvm 0.53.0", - "windows_x86_64_msvc 0.53.0", -] - [[package]] name = "windows-threading" version = "0.1.0" @@ -4175,12 +4139,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" - [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -4193,12 +4151,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" - [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -4211,24 +4163,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" -[[package]] -name = "windows_i686_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" - [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" - [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -4241,12 +4181,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_i686_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" - [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -4259,12 +4193,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" - [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -4277,12 +4205,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" - [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -4295,12 +4217,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" - [[package]] name = "winreg" version = "0.50.0" @@ -4317,7 +4233,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.0", ] [[package]] @@ -4367,7 +4283,7 @@ checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", "synstructure", ] @@ -4388,7 +4304,7 @@ checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] @@ -4408,7 +4324,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", "synstructure", ] @@ -4448,7 +4364,7 @@ checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.101", ] [[package]] From 24166446c4e4498d452e4306c0256e88f1344f8a Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Wed, 30 Jul 2025 09:56:22 -0400 Subject: [PATCH 26/43] Uncomment and add ignore tags, remove dbg logs --- src/action/csfle/create_data_key.rs | 1 - src/client/auth/aws.rs | 471 ++++++++++++++-------------- src/test/auth/aws.rs | 233 +++++++------- src/test/csfle/on_demand_aws.rs | 5 - 4 files changed, 353 insertions(+), 357 deletions(-) diff --git a/src/action/csfle/create_data_key.rs b/src/action/csfle/create_data_key.rs index 1838ab3f0..555fb4c65 100644 --- a/src/action/csfle/create_data_key.rs +++ b/src/action/csfle/create_data_key.rs @@ -13,7 +13,6 @@ impl ClientEncryption { #[deeplink] #[options_doc(create_data_keys)] pub fn create_data_key(&self, master_key: impl Into) -> CreateDataKey { - dbg!("create_data_key inside src/action/csfle/create_data_key.rs"); CreateDataKey { client_enc: self, master_key: master_key.into(), diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index 73dcbbbf0..6393aadbc 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -1,24 +1,15 @@ -#[cfg(feature = "aws-auth")] -use aws_config::BehaviorVersion; - -#[cfg(feature = "aws-auth")] -use aws_credential_types::{provider::ProvideCredentials, Credentials}; - -// Note from RUST-1529: commented Duration import since original implementation is commented out -// use std::time::Duration; -// use rand::distributions::{Alphanumeric, DistString}; -// use std::{fs::File, io::Read}; -// use crate::bson::rawdoc; +use std::{fs::File, io::Read, time::Duration}; use chrono::{offset::Utc, DateTime}; use hmac::Hmac; use once_cell::sync::Lazy; +use rand::distributions::{Alphanumeric, DistString}; use serde::Deserialize; use sha2::{Digest, Sha256}; use tokio::sync::Mutex; use crate::{ - bson::{doc, spec::BinarySubtype, Binary, Bson, Document}, + bson::{doc, rawdoc, spec::BinarySubtype, Binary, Bson, Document}, client::{ auth::{ self, @@ -37,8 +28,14 @@ use crate::{ #[cfg(not(feature = "bson-3"))] use crate::bson_compat::DocumentExt as _; -// const AWS_ECS_IP: &str = "169.254.170.2"; -// const AWS_EC2_IP: &str = "169.254.169.254"; +#[cfg(feature = "aws-auth")] +use aws_config::BehaviorVersion; + +#[cfg(feature = "aws-auth")] +use aws_credential_types::{provider::ProvideCredentials, Credentials}; + +const AWS_ECS_IP: &str = "169.254.170.2"; +const AWS_EC2_IP: &str = "169.254.169.254"; const AWS_LONG_DATE_FMT: &str = "%Y%m%dT%H%M%SZ"; const MECH_NAME: &str = "MONGODB-AWS"; @@ -175,7 +172,7 @@ async fn authenticate_stream_inner( } // Find credentials using MongoDB URI or AWS SDK -pub async fn get_aws_credentials(credential: &Credential) -> Result { +pub(crate) async fn get_aws_credentials(credential: &Credential) -> Result { if let (Some(access_key), Some(secret_key)) = (&credential.username, &credential.password) { // Look for credentials in the MongoDB URI Ok(Credentials::new( @@ -226,80 +223,82 @@ pub(crate) struct AwsCredential { expiration: Option, } -// fn non_empty(s: Option) -> Option { -// match s { -// None => None, -// Some(s) if s.is_empty() => None, -// Some(s) => Some(s), -// } -// } +#[allow(dead_code)] +fn non_empty(s: Option) -> Option { + match s { + None => None, + Some(s) if s.is_empty() => None, + Some(s) => Some(s), + } +} +#[allow(dead_code)] impl AwsCredential { - // /// Derives the credentials for an authentication attempt given the set of credentials the - // user /// passed in. - // pub(crate) async fn get(credential: &Credential, http_client: &HttpClient) -> Result { - // let access_key = credential - // .username - // .clone() - // .or_else(|| non_empty(std::env::var("AWS_ACCESS_KEY_ID").ok())); - // let secret_key = credential - // .password - // .clone() - // .or_else(|| non_empty(std::env::var("AWS_SECRET_ACCESS_KEY").ok())); - // let session_token = credential - // .mechanism_properties - // .as_ref() - // .and_then(|d| d.get_str("AWS_SESSION_TOKEN").ok()) - // .map(|s| s.to_string()) - // .or_else(|| non_empty(std::env::var("AWS_SESSION_TOKEN").ok())); - - // let found_access_key = access_key.is_some(); - // let found_secret_key = secret_key.is_some(); - - // // If we have an access key and secret key, we can continue with the credentials we've - // // found. - // if let (Some(access_key), Some(secret_key)) = (access_key, secret_key) { - // return Ok(Self { - // access_key_id: access_key, - // secret_access_key: secret_key, - // session_token, - // expiration: None, - // }); - // } + /// Derives the credentials for an authentication attempt given the set of credentials the user + /// passed in. + pub(crate) async fn get(credential: &Credential, http_client: &HttpClient) -> Result { + let access_key = credential + .username + .clone() + .or_else(|| non_empty(std::env::var("AWS_ACCESS_KEY_ID").ok())); + let secret_key = credential + .password + .clone() + .or_else(|| non_empty(std::env::var("AWS_SECRET_ACCESS_KEY").ok())); + let session_token = credential + .mechanism_properties + .as_ref() + .and_then(|d| d.get_str("AWS_SESSION_TOKEN").ok()) + .map(|s| s.to_string()) + .or_else(|| non_empty(std::env::var("AWS_SESSION_TOKEN").ok())); + + let found_access_key = access_key.is_some(); + let found_secret_key = secret_key.is_some(); + + // If we have an access key and secret key, we can continue with the credentials we've + // found. + if let (Some(access_key), Some(secret_key)) = (access_key, secret_key) { + return Ok(Self { + access_key_id: access_key, + secret_access_key: secret_key, + session_token, + expiration: None, + }); + } - // if found_access_key || found_secret_key { - // return Err(Error::authentication_error( - // MECH_NAME, - // "cannot specify only one of access key and secret key; either both or neither \ - // must be provided", - // )); - // } + if found_access_key || found_secret_key { + return Err(Error::authentication_error( + MECH_NAME, + "cannot specify only one of access key and secret key; either both or neither \ + must be provided", + )); + } - // if session_token.is_some() { - // return Err(Error::authentication_error( - // MECH_NAME, - // "cannot specify session token without both access key and secret key", - // )); - // } + if session_token.is_some() { + return Err(Error::authentication_error( + MECH_NAME, + "cannot specify session token without both access key and secret key", + )); + } - // if let (Ok(token_file), Ok(role_arn)) = ( - // std::env::var("AWS_WEB_IDENTITY_TOKEN_FILE"), - // std::env::var("AWS_ROLE_ARN"), - // ) { - // return Self::get_from_assume_role_with_web_identity_request( - // token_file, - // role_arn, - // http_client, - // ) - // .await; - // } + if let (Ok(token_file), Ok(role_arn)) = ( + std::env::var("AWS_WEB_IDENTITY_TOKEN_FILE"), + std::env::var("AWS_ROLE_ARN"), + ) { + return Self::get_from_assume_role_with_web_identity_request( + token_file, + role_arn, + http_client, + ) + .await; + } - // if let Ok(relative_uri) = std::env::var("AWS_CONTAINER_CREDENTIALS_RELATIVE_URI") { - // Self::get_from_ecs(relative_uri, http_client).await - // } else { - // Self::get_from_ec2(http_client).await - // } - // } + if let Ok(relative_uri) = std::env::var("AWS_CONTAINER_CREDENTIALS_RELATIVE_URI") { + Self::get_from_ecs(relative_uri, http_client).await + } else { + Self::get_from_ec2(http_client).await + } + } // Creates AwsCredential from keys. fn from_sdk_creds( @@ -316,93 +315,93 @@ impl AwsCredential { } } - // async fn get_from_assume_role_with_web_identity_request( - // token_file: String, - // role_arn: String, - // http_client: &HttpClient, - // ) -> Result { - // let mut file = File::open(&token_file).map_err(|_| { - // Error::authentication_error(MECH_NAME, "could not open identity token file") - // })?; - // let mut buffer = Vec::::new(); - // file.read_to_end(&mut buffer).map_err(|_| { - // Error::authentication_error(MECH_NAME, "could not read identity token file") - // })?; - // let token = std::str::from_utf8(&buffer).map_err(|_| { - // Error::authentication_error(MECH_NAME, "could not read identity token file") - // })?; - - // let session_name = std::env::var("AWS_ROLE_SESSION_NAME") - // .unwrap_or_else(|_| Alphanumeric.sample_string(&mut rand::thread_rng(), 10)); - - // let query = rawdoc! { - // "Action": "AssumeRoleWithWebIdentity", - // "RoleSessionName": session_name, - // "RoleArn": role_arn, - // "WebIdentityToken": token, - // "Version": "2011-06-15", - // }; - - // let response = http_client - // .get("https://sts.amazonaws.com/") - // .headers(&[("Accept", "application/json")]) - // .query(query) - // .send::() - // .await - // .map_err(|_| Error::unknown_authentication_error(MECH_NAME))?; - - // let credential = response - // .get_document("AssumeRoleWithWebIdentityResponse") - // .and_then(|d| d.get_document("AssumeRoleWithWebIdentityResult")) - // .and_then(|d| d.get_document("Credentials")) - // .map_err(|_| Error::unknown_authentication_error(MECH_NAME))? - // .to_owned(); - - // Ok(crate::bson_compat::deserialize_from_document(credential)?) - // } - - // /// Obtains credentials from the ECS endpoint. - // async fn get_from_ecs(relative_uri: String, http_client: &HttpClient) -> Result { - // // Use the local IP address that AWS uses for ECS agents. - // let uri = format!("http://{}/{}", AWS_ECS_IP, relative_uri); - - // http_client - // .get(&uri) - // .send() - // .await - // .map_err(|_| Error::unknown_authentication_error(MECH_NAME)) - // } - - // /// Obtains temporary credentials for an EC2 instance to use for authentication. - // async fn get_from_ec2(http_client: &HttpClient) -> Result { - // let temporary_token = http_client - // .put(format!("http://{}/latest/api/token", AWS_EC2_IP)) - // .headers(&[("X-aws-ec2-metadata-token-ttl-seconds", "30")]) - // .send_and_get_string() - // .await - // .map_err(|_| Error::unknown_authentication_error(MECH_NAME))?; - - // let role_name_uri = format!( - // "http://{}/latest/meta-data/iam/security-credentials/", - // AWS_EC2_IP - // ); - - // let role_name = http_client - // .get(&role_name_uri) - // .headers(&[("X-aws-ec2-metadata-token", &temporary_token[..])]) - // .send_and_get_string() - // .await - // .map_err(|_| Error::unknown_authentication_error(MECH_NAME))?; - - // let credential_uri = format!("{}/{}", role_name_uri, role_name); - - // http_client - // .get(&credential_uri) - // .headers(&[("X-aws-ec2-metadata-token", &temporary_token[..])]) - // .send() - // .await - // .map_err(|_| Error::unknown_authentication_error(MECH_NAME)) - // } + async fn get_from_assume_role_with_web_identity_request( + token_file: String, + role_arn: String, + http_client: &HttpClient, + ) -> Result { + let mut file = File::open(&token_file).map_err(|_| { + Error::authentication_error(MECH_NAME, "could not open identity token file") + })?; + let mut buffer = Vec::::new(); + file.read_to_end(&mut buffer).map_err(|_| { + Error::authentication_error(MECH_NAME, "could not read identity token file") + })?; + let token = std::str::from_utf8(&buffer).map_err(|_| { + Error::authentication_error(MECH_NAME, "could not read identity token file") + })?; + + let session_name = std::env::var("AWS_ROLE_SESSION_NAME") + .unwrap_or_else(|_| Alphanumeric.sample_string(&mut rand::thread_rng(), 10)); + + let query = rawdoc! { + "Action": "AssumeRoleWithWebIdentity", + "RoleSessionName": session_name, + "RoleArn": role_arn, + "WebIdentityToken": token, + "Version": "2011-06-15", + }; + + let response = http_client + .get("https://sts.amazonaws.com/") + .headers(&[("Accept", "application/json")]) + .query(query) + .send::() + .await + .map_err(|_| Error::unknown_authentication_error(MECH_NAME))?; + + let credential = response + .get_document("AssumeRoleWithWebIdentityResponse") + .and_then(|d| d.get_document("AssumeRoleWithWebIdentityResult")) + .and_then(|d| d.get_document("Credentials")) + .map_err(|_| Error::unknown_authentication_error(MECH_NAME))? + .to_owned(); + + Ok(crate::bson_compat::deserialize_from_document(credential)?) + } + + /// Obtains credentials from the ECS endpoint. + async fn get_from_ecs(relative_uri: String, http_client: &HttpClient) -> Result { + // Use the local IP address that AWS uses for ECS agents. + let uri = format!("http://{}/{}", AWS_ECS_IP, relative_uri); + + http_client + .get(&uri) + .send() + .await + .map_err(|_| Error::unknown_authentication_error(MECH_NAME)) + } + + /// Obtains temporary credentials for an EC2 instance to use for authentication. + async fn get_from_ec2(http_client: &HttpClient) -> Result { + let temporary_token = http_client + .put(format!("http://{}/latest/api/token", AWS_EC2_IP)) + .headers(&[("X-aws-ec2-metadata-token-ttl-seconds", "30")]) + .send_and_get_string() + .await + .map_err(|_| Error::unknown_authentication_error(MECH_NAME))?; + + let role_name_uri = format!( + "http://{}/latest/meta-data/iam/security-credentials/", + AWS_EC2_IP + ); + + let role_name = http_client + .get(&role_name_uri) + .headers(&[("X-aws-ec2-metadata-token", &temporary_token[..])]) + .send_and_get_string() + .await + .map_err(|_| Error::unknown_authentication_error(MECH_NAME))?; + + let credential_uri = format!("{}/{}", role_name_uri, role_name); + + http_client + .get(&credential_uri) + .headers(&[("X-aws-ec2-metadata-token", &temporary_token[..])]) + .send() + .await + .map_err(|_| Error::unknown_authentication_error(MECH_NAME)) + } /// Computes the signed authorization header for the credentials to send to the server in a sasl /// payload. @@ -527,32 +526,30 @@ impl AwsCredential { Ok(auth_header) } - // #[cfg(feature = "in-use-encryption")] - // pub(crate) fn access_key(&self) -> &str { - // &self.access_key_id - // } - - // #[cfg(feature = "in-use-encryption")] - // pub(crate) fn secret_key(&self) -> &str { - // &self.secret_access_key - // } - - // #[cfg(feature = "in-use-encryption")] - // pub(crate) fn session_token(&self) -> Option<&str> { - // self.session_token.as_deref() - // } - - // RUST-1529 note: commented out is_expired method since it is not used in the current - // implementation - // fn is_expired(&self) -> bool { - // match self.expiration { - // Some(expiration) => { - // expiration.saturating_duration_since(crate::bson::DateTime::now()) - // < Duration::from_secs(5 * 60) - // } - // None => true, - // } - // } + #[cfg(feature = "in-use-encryption")] + pub(crate) fn access_key(&self) -> &str { + &self.access_key_id + } + + #[cfg(feature = "in-use-encryption")] + pub(crate) fn secret_key(&self) -> &str { + &self.secret_access_key + } + + #[cfg(feature = "in-use-encryption")] + pub(crate) fn session_token(&self) -> Option<&str> { + self.session_token.as_deref() + } + + fn is_expired(&self) -> bool { + match self.expiration { + Some(expiration) => { + expiration.saturating_duration_since(crate::bson::DateTime::now()) + < Duration::from_secs(5 * 60) + } + None => true, + } + } } /// The response from the server to the `saslStart` command in a MONGODB-AWS authentication attempt. @@ -631,44 +628,44 @@ impl ServerFirst { } } -// #[cfg(test)] -// pub(crate) mod test_utils { -// use super::{AwsCredential, CACHED_CREDENTIAL}; - -// pub(crate) async fn cached_credential() -> Option { -// CACHED_CREDENTIAL.lock().await.clone() -// } - -// pub(crate) async fn clear_cached_credential() { -// *CACHED_CREDENTIAL.lock().await = None; -// } - -// pub(crate) async fn poison_cached_credential() { -// CACHED_CREDENTIAL -// .lock() -// .await -// .as_mut() -// .unwrap() -// .access_key_id = "bad".into(); -// } - -// pub(crate) async fn cached_access_key_id() -> String { -// cached_credential().await.unwrap().access_key_id -// } - -// pub(crate) async fn cached_secret_access_key() -> String { -// cached_credential().await.unwrap().secret_access_key -// } - -// pub(crate) async fn cached_session_token() -> Option { -// cached_credential().await.unwrap().session_token -// } - -// pub(crate) async fn cached_expiration() -> crate::bson::DateTime { -// cached_credential().await.unwrap().expiration.unwrap() -// } - -// pub(crate) async fn set_cached_expiration(expiration: crate::bson::DateTime) { -// CACHED_CREDENTIAL.lock().await.as_mut().unwrap().expiration = Some(expiration); -// } -// } +#[cfg(test)] +pub(crate) mod test_utils { + use super::{AwsCredential, CACHED_CREDENTIAL}; + + pub(crate) async fn cached_credential() -> Option { + CACHED_CREDENTIAL.lock().await.clone() + } + + pub(crate) async fn clear_cached_credential() { + *CACHED_CREDENTIAL.lock().await = None; + } + + pub(crate) async fn poison_cached_credential() { + CACHED_CREDENTIAL + .lock() + .await + .as_mut() + .unwrap() + .access_key_id = "bad".into(); + } + + pub(crate) async fn cached_access_key_id() -> String { + cached_credential().await.unwrap().access_key_id + } + + pub(crate) async fn cached_secret_access_key() -> String { + cached_credential().await.unwrap().secret_access_key + } + + pub(crate) async fn cached_session_token() -> Option { + cached_credential().await.unwrap().session_token + } + + pub(crate) async fn cached_expiration() -> crate::bson::DateTime { + cached_credential().await.unwrap().expiration.unwrap() + } + + pub(crate) async fn set_cached_expiration(expiration: crate::bson::DateTime) { + CACHED_CREDENTIAL.lock().await.as_mut().unwrap().expiration = Some(expiration); + } +} diff --git a/src/test/auth/aws.rs b/src/test/auth/aws.rs index f701c5a74..2a6b1218a 100644 --- a/src/test/auth/aws.rs +++ b/src/test/auth/aws.rs @@ -1,9 +1,9 @@ -// use std::env::{remove_var, set_var, var}; +use std::env::{remove_var, set_var, var}; use crate::{ bson::{doc, Document}, - // client::auth::aws::test_utils::*, - // test::DEFAULT_URI, + client::auth::aws::test_utils::*, + test::DEFAULT_URI, Client, }; @@ -11,120 +11,125 @@ use crate::{ async fn auth_aws() { let client = Client::for_test().await; let coll = client.database("aws").collection::("somecoll"); - let _ = tracing_subscriber::fmt::try_init(); coll.find_one(doc! {}).await.unwrap(); } // The TestClient performs operations upon creation that trigger authentication, so the credential // caching tests use a regular client instead to avoid that noise. -// async fn get_client() -> Client { -// Client::with_uri_str(DEFAULT_URI.clone()).await.unwrap() -// } - -// #[tokio::test] -// async fn credential_caching() { -// // This test should only be run when authenticating using AWS endpoints. -// if var("SKIP_CREDENTIAL_CACHING_TESTS").is_ok() { -// return; -// } - -// clear_cached_credential().await; - -// let client = get_client().await; -// let coll = client.database("aws").collection::("somecoll"); -// coll.find_one(doc! {}).await.unwrap(); -// assert!(cached_credential().await.is_some()); - -// let now = crate::bson::DateTime::now(); -// set_cached_expiration(now).await; - -// let client = get_client().await; -// let coll = client.database("aws").collection::("somecoll"); -// coll.find_one(doc! {}).await.unwrap(); -// assert!(cached_credential().await.is_some()); -// assert!(cached_expiration().await > now); - -// poison_cached_credential().await; - -// let client = get_client().await; -// let coll = client.database("aws").collection::("somecoll"); -// match coll.find_one(doc! {}).await { -// Ok(_) => panic!( -// "find one should have failed with authentication error due to poisoned cached \ -// credential" -// ), -// Err(error) => assert!(error.is_auth_error()), -// } -// assert!(cached_credential().await.is_none()); - -// coll.find_one(doc! {}).await.unwrap(); -// assert!(cached_credential().await.is_some()); -// } - -// todo: tests for aws sdk caching -// TODO: find documentation for rust aws sdk credential caching -// can delete caching logic if the aws sdk handles it properly for our needs - -// #[tokio::test] -// async fn credential_caching_environment_vars() { -// // This test should only be run when authenticating using AWS endpoints. -// if var("SKIP_CREDENTIAL_CACHING_TESTS").is_ok() { -// return; -// } - -// clear_cached_credential().await; - -// let client = get_client().await; -// let coll = client.database("aws").collection::("somecoll"); -// coll.find_one(doc! {}).await.unwrap(); -// assert!(cached_credential().await.is_some()); - -// set_var("AWS_ACCESS_KEY_ID", cached_access_key_id().await); -// set_var("AWS_SECRET_ACCESS_KEY", cached_secret_access_key().await); -// if let Some(session_token) = cached_session_token().await { -// set_var("AWS_SESSION_TOKEN", session_token); -// } -// clear_cached_credential().await; - -// let client = get_client().await; -// let coll = client.database("aws").collection::("somecoll"); -// coll.find_one(doc! {}).await.unwrap(); -// assert!(cached_credential().await.is_none()); - -// set_var("AWS_ACCESS_KEY_ID", "bad"); -// set_var("AWS_SECRET_ACCESS_KEY", "bad"); -// set_var("AWS_SESSION_TOKEN", "bad"); - -// let client = get_client().await; -// let coll = client.database("aws").collection::("somecoll"); -// match coll.find_one(doc! {}).await { -// Ok(_) => panic!( -// "find one should have failed with authentication error due to poisoned environment \ -// variables" -// ), -// Err(error) => assert!(error.is_auth_error()), -// } - -// remove_var("AWS_ACCESS_KEY_ID"); -// remove_var("AWS_SECRET_ACCESS_KEY"); -// remove_var("AWS_SESSION_TOKEN"); -// clear_cached_credential().await; - -// let client = get_client().await; -// let coll = client.database("aws").collection::("somecoll"); -// coll.find_one(doc! {}).await.unwrap(); -// assert!(cached_credential().await.is_some()); - -// set_var("AWS_ACCESS_KEY_ID", "bad"); -// set_var("AWS_SECRET_ACCESS_KEY", "bad"); -// set_var("AWS_SESSION_TOKEN", "bad"); - -// let client = get_client().await; -// let coll = client.database("aws").collection::("somecoll"); -// coll.find_one(doc! {}).await.unwrap(); - -// remove_var("AWS_ACCESS_KEY_ID"); -// remove_var("AWS_SECRET_ACCESS_KEY"); -// remove_var("AWS_SESSION_TOKEN"); -// } +async fn get_client() -> Client { + Client::with_uri_str(DEFAULT_URI.clone()).await.unwrap() +} + +// Ignored because the AWS SDK handles caching internally, making this manual caching test +// unnecessary. This test will be removed in a future PR as part of RUST-1529, +// depending on whether we fully switch to the SDK-based implementation, +// or gate it behind a feature flag and retain the original approach by default. +#[ignore] +#[tokio::test] +async fn credential_caching() { + // This test should only be run when authenticating using AWS endpoints. + if var("SKIP_CREDENTIAL_CACHING_TESTS").is_ok() { + return; + } + + clear_cached_credential().await; + + let client = get_client().await; + let coll = client.database("aws").collection::("somecoll"); + coll.find_one(doc! {}).await.unwrap(); + assert!(cached_credential().await.is_some()); + + let now = crate::bson::DateTime::now(); + set_cached_expiration(now).await; + + let client = get_client().await; + let coll = client.database("aws").collection::("somecoll"); + coll.find_one(doc! {}).await.unwrap(); + assert!(cached_credential().await.is_some()); + assert!(cached_expiration().await > now); + + poison_cached_credential().await; + + let client = get_client().await; + let coll = client.database("aws").collection::("somecoll"); + match coll.find_one(doc! {}).await { + Ok(_) => panic!( + "find one should have failed with authentication error due to poisoned cached \ + credential" + ), + Err(error) => assert!(error.is_auth_error()), + } + assert!(cached_credential().await.is_none()); + + coll.find_one(doc! {}).await.unwrap(); + assert!(cached_credential().await.is_some()); +} + +// Ignored because the AWS SDK handles caching internally, making this manual caching test +// unnecessary. This test will be removed in a future PR as part of RUST-1529, +// depending on whether we fully switch to the SDK-based implementation, +// or gate it behind a feature flag and retain the original approach by default. +#[ignore] +#[tokio::test] +async fn credential_caching_environment_vars() { + // This test should only be run when authenticating using AWS endpoints. + if var("SKIP_CREDENTIAL_CACHING_TESTS").is_ok() { + return; + } + + clear_cached_credential().await; + + let client = get_client().await; + let coll = client.database("aws").collection::("somecoll"); + coll.find_one(doc! {}).await.unwrap(); + assert!(cached_credential().await.is_some()); + + set_var("AWS_ACCESS_KEY_ID", cached_access_key_id().await); + set_var("AWS_SECRET_ACCESS_KEY", cached_secret_access_key().await); + if let Some(session_token) = cached_session_token().await { + set_var("AWS_SESSION_TOKEN", session_token); + } + clear_cached_credential().await; + + let client = get_client().await; + let coll = client.database("aws").collection::("somecoll"); + coll.find_one(doc! {}).await.unwrap(); + assert!(cached_credential().await.is_none()); + + set_var("AWS_ACCESS_KEY_ID", "bad"); + set_var("AWS_SECRET_ACCESS_KEY", "bad"); + set_var("AWS_SESSION_TOKEN", "bad"); + + let client = get_client().await; + let coll = client.database("aws").collection::("somecoll"); + match coll.find_one(doc! {}).await { + Ok(_) => panic!( + "find one should have failed with authentication error due to poisoned environment \ + variables" + ), + Err(error) => assert!(error.is_auth_error()), + } + + remove_var("AWS_ACCESS_KEY_ID"); + remove_var("AWS_SECRET_ACCESS_KEY"); + remove_var("AWS_SESSION_TOKEN"); + clear_cached_credential().await; + + let client = get_client().await; + let coll = client.database("aws").collection::("somecoll"); + coll.find_one(doc! {}).await.unwrap(); + assert!(cached_credential().await.is_some()); + + set_var("AWS_ACCESS_KEY_ID", "bad"); + set_var("AWS_SECRET_ACCESS_KEY", "bad"); + set_var("AWS_SESSION_TOKEN", "bad"); + + let client = get_client().await; + let coll = client.database("aws").collection::("somecoll"); + coll.find_one(doc! {}).await.unwrap(); + + remove_var("AWS_ACCESS_KEY_ID"); + remove_var("AWS_SECRET_ACCESS_KEY"); + remove_var("AWS_SESSION_TOKEN"); +} diff --git a/src/test/csfle/on_demand_aws.rs b/src/test/csfle/on_demand_aws.rs index 7f77a402b..4641fb6ac 100644 --- a/src/test/csfle/on_demand_aws.rs +++ b/src/test/csfle/on_demand_aws.rs @@ -17,7 +17,6 @@ async fn try_create_data_key() -> Result<()> { KV_NAMESPACE.clone(), [(KmsProvider::aws(), doc! {}, None)], )?; - dbg!("ClientEncryption::new worked"); ce.create_data_key( AwsMasterKey::builder() .region("us-east-1") @@ -30,13 +29,9 @@ async fn try_create_data_key() -> Result<()> { #[tokio::test] async fn success() { - dbg!("Running on-demand AWS credentials test"); assert!(std::env::var("AWS_ACCESS_KEY_ID").is_ok()); - dbg!("AWS_ACCESS_KEY_ID is set"); assert!(std::env::var("AWS_SECRET_ACCESS_KEY").is_ok()); - dbg!("AWS_SECRET_ACCESS_KEY is set"); try_create_data_key().await.unwrap(); - dbg!("try_create_data_key succeeded"); } #[tokio::test] From 6890532c1f44cca4c1aed9fab7400b8fdc124a8a Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Wed, 30 Jul 2025 10:06:29 -0400 Subject: [PATCH 27/43] Remove comment --- src/client/csfle/state_machine.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/client/csfle/state_machine.rs b/src/client/csfle/state_machine.rs index 3eedbacd1..b94c786c0 100644 --- a/src/client/csfle/state_machine.rs +++ b/src/client/csfle/state_machine.rs @@ -255,7 +255,6 @@ impl CryptExecutor { Credential, }; - // Original implementation using the AWS SDK let aws_creds = get_aws_credentials(&Credential::default()).await?; From f2a4a62ef19a84e4655be5a0e041d0d7ccd814ac Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Wed, 30 Jul 2025 10:24:43 -0400 Subject: [PATCH 28/43] Exclude aws-sdk-sts from Cargo.toml, add it manually during MSRV check --- .evergreen/compile-only.sh | 5 +++++ Cargo.lock | 1 - Cargo.toml | 17 ++++++----------- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.evergreen/compile-only.sh b/.evergreen/compile-only.sh index 3742566da..3f4b6ab9b 100755 --- a/.evergreen/compile-only.sh +++ b/.evergreen/compile-only.sh @@ -9,6 +9,11 @@ source ./.evergreen/env.sh if [ "$RUST_VERSION" != "" ]; then rustup toolchain install $RUST_VERSION TOOLCHAIN="+${RUST_VERSION}" + + # The MSRV resolver does not properly select an MSRV-compliant version + # for this transient dependency. + cargo add aws-sdk-sts@1.73 + CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS=fallback cargo +nightly -Zmsrv-policy generate-lockfile fi diff --git a/Cargo.lock b/Cargo.lock index 033d108ef..90853c825 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2059,7 +2059,6 @@ dependencies = [ "async-trait", "aws-config", "aws-credential-types", - "aws-sdk-sts", "aws-types", "backtrace", "base64 0.13.1", diff --git a/Cargo.toml b/Cargo.toml index fe878faa9..6572f9029 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,7 +41,7 @@ dns-resolver = ["dep:hickory-resolver", "dep:hickory-proto"] cert-key-password = ["dep:pem", "dep:pkcs8"] # Enable support for MONGODB-AWS authentication. -aws-auth = ["dep:reqwest", "aws-credential-types", "aws-types", "aws-config"] +aws-auth = ["dep:reqwest", "aws-config", "aws-types", "aws-credential-types"] # Enable support for on-demand Azure KMS credentials. azure-kms = ["dep:reqwest"] @@ -122,24 +122,19 @@ zstd = { version = "0.11.2", optional = true } macro_magic = "0.5.1" rustversion = "1.0.20" -[dependencies.aws-credential-types] -version = "1.2.4" +[dependencies.aws-config] +version = "1" optional = true default-features = false +features = ["default-https-client", "rt-tokio"] [dependencies.aws-types] version = "1.3.7" optional = true default-features = false -[dependencies.aws-config] -version = "1" -optional = true -default-features = false -features = ["default-https-client", "rt-tokio"] - -[dependencies.aws-sdk-sts] -version = "=1.73" +[dependencies.aws-credential-types] +version = "1.2.4" optional = true default-features = false From d41a5b7387a95ee6785708bd73aecf8ef46868eb Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Wed, 30 Jul 2025 10:32:46 -0400 Subject: [PATCH 29/43] Wip - compute authorization header --- Cargo.lock | 2 + Cargo.toml | 13 +- src/client/auth/aws.rs | 428 +++++++++++++++++++++++++++-------------- 3 files changed, 301 insertions(+), 142 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 20e2247c8..7d6c61397 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2060,6 +2060,7 @@ dependencies = [ "aws-config", "aws-credential-types", "aws-sdk-sts", + "aws-sigv4", "aws-types", "backtrace", "base64 0.13.1", @@ -2083,6 +2084,7 @@ dependencies = [ "hickory-resolver", "hmac", "home", + "http 1.3.1", "lambda_runtime", "log", "macro_magic", diff --git a/Cargo.toml b/Cargo.toml index fe878faa9..1cb78dd54 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,7 +41,7 @@ dns-resolver = ["dep:hickory-resolver", "dep:hickory-proto"] cert-key-password = ["dep:pem", "dep:pkcs8"] # Enable support for MONGODB-AWS authentication. -aws-auth = ["dep:reqwest", "aws-credential-types", "aws-types", "aws-config"] +aws-auth = ["dep:reqwest", "aws-credential-types", "aws-types", "aws-config", "aws-sigv4", "http"] # Enable support for on-demand Azure KMS credentials. azure-kms = ["dep:reqwest"] @@ -143,6 +143,17 @@ version = "=1.73" optional = true default-features = false +[dependencies.aws-sigv4] +version = "1.3.3" +optional = true +default-features = false +features = ["sign-http"] + +[dependencies.http] +version = "1.3" +optional = true +default-features = false + [dependencies.bson2] git = "https://github.com/mongodb/bson-rust" branch = "2.15.x" diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index 73dcbbbf0..7e7e77126 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -1,20 +1,28 @@ -#[cfg(feature = "aws-auth")] use aws_config::BehaviorVersion; - -#[cfg(feature = "aws-auth")] use aws_credential_types::{provider::ProvideCredentials, Credentials}; +use aws_sigv4::{ + http_request::{sign, SignableBody, SignableRequest, SigningSettings}, + sign::v4::SigningParams, +}; +use http::Request; + +// #[cfg(feature = "aws-auth")] +// use aws_types::credentials::{Credentials, ProvideCredentials, SharedCredentialsProvider}; + +// use http::{HeaderMap, Method, Request, Uri}; +// use http::header::{HeaderName, AUTHORIZATION}; -// Note from RUST-1529: commented Duration import since original implementation is commented out -// use std::time::Duration; +// Note from RUST-1529: commented Duration import since original implementation is commented +// out use std::time::Duration; // use rand::distributions::{Alphanumeric, DistString}; // use std::{fs::File, io::Read}; // use crate::bson::rawdoc; +// use hmac::Hmac; +// use sha2::{Digest, Sha256}; use chrono::{offset::Utc, DateTime}; -use hmac::Hmac; use once_cell::sync::Lazy; use serde::Deserialize; -use sha2::{Digest, Sha256}; use tokio::sync::Mutex; use crate::{ @@ -103,12 +111,12 @@ async fn authenticate_stream_inner( let creds = get_aws_credentials(credential).await.map_err(|e| { Error::authentication_error(MECH_NAME, &format!("failed to get creds: {e}")) })?; - let aws_credential = AwsCredential::from_sdk_creds( - creds.access_key_id().to_string(), - creds.secret_access_key().to_string(), - creds.session_token().map(|s| s.to_string()), - None, - ); + // let aws_credential = AwsCredential::from_sdk_creds( + // creds.access_key_id().to_string(), + // creds.secret_access_key().to_string(), + // creds.session_token().map(|s| s.to_string()), + // None, + // ); // Find credentials using original implementation without AWS SDK // let aws_credential = { @@ -130,20 +138,47 @@ async fn authenticate_stream_inner( // }; let date = Utc::now(); + // Generate authorization header using original implementation without AWS SDK + + // let authorization_header = aws_credential.compute_authorization_header( + // date, + // &server_first.sts_host, + // &server_first.server_nonce, + // )?; + + // let mut client_second_payload = doc! { + // "a": authorization_header, + // "d": date.format(AWS_LONG_DATE_FMT).to_string(), + // }; + + // if let Some(security_token) = aws_credential.session_token { + // client_second_payload.insert("t", security_token); + // } + + // attempt 1 + // let mut client_second_payload = doc! { + // "a": authorization_header, + // "d": date_header, + // }; + // if let Some(token) = token_header { + // client_second_payload.insert("t", token); + // } - let authorization_header = aws_credential.compute_authorization_header( + let sigv4_headers = compute_aws_sigv4_headers( + creds, date, &server_first.sts_host, &server_first.server_nonce, - )?; + ) + .await?; let mut client_second_payload = doc! { - "a": authorization_header, - "d": date.format(AWS_LONG_DATE_FMT).to_string(), + "a": sigv4_headers.authorization, + "d": sigv4_headers.date, }; - if let Some(security_token) = aws_credential.session_token { - client_second_payload.insert("t", security_token); + if let Some(token) = sigv4_headers.token { + client_second_payload.insert("t", token); } let client_second_payload_bytes = client_second_payload.encode_to_vec()?; @@ -206,6 +241,116 @@ pub async fn get_aws_credentials(credential: &Credential) -> Result } } +pub struct AwsSigV4Headers { + pub authorization: String, + pub date: String, + pub token: Option, +} + +pub async fn compute_aws_sigv4_headers( + creds: Credentials, + date: DateTime, + host: &str, + server_nonce: &[u8], +) -> Result { + let date_str = date.format("%Y%m%dT%H%M%SZ").to_string(); + + let region = if host == "sts.amazonaws.com" { + "us-east-1" + } else { + let parts: Vec<_> = host.split('.').collect(); + parts.get(1).copied().unwrap_or("us-east-1") + }; + + let url = format!("https://{}", host); + let service = "execute-api"; + let body_str = "Action=GetCallerIdentity&Version=2011-06-15"; + // let body_bytes = body_str.as_bytes(); + let nonce_b64 = base64::encode(server_nonce); + + // Create the HTTP request + let mut builder = Request::builder() + .method("POST") + .uri(&url) + .header("host", host) + .header("content-type", "application/x-www-form-urlencoded") + // .header("content-length", body_bytes.len()) + .header("x-amz-date", date_str.clone()) + .header("x-mongodb-gs2-cb-flag", "n") + .header("x-mongodb-server-nonce", nonce_b64.clone()); + + if let Some(token) = creds.session_token() { + builder = builder.header("x-amz-security-token", token); + } + + let mut request = builder.body(body_str.to_string()).map_err(|e| { + Error::authentication_error(MECH_NAME, &format!("Failed to build request: {e}")) + })?; + + let identity = creds.into(); + + // Set up signing parameters + let signing_settings = SigningSettings::default(); + let signing_params = SigningParams::builder() + .identity(&identity) + .region(®ion) + .name(&service) + .time(date.into()) + .settings(signing_settings) + .build() + .map_err(|e| { + Error::authentication_error(MECH_NAME, &format!("Failed to build signing params: {e}")) + })? + .into(); + + let signable_request = SignableRequest::new( + request.method().as_str(), + request.uri().to_string(), + request + .headers() + .iter() + .map(|(k, v)| (k.as_str(), std::str::from_utf8(v.as_bytes()).unwrap())), + SignableBody::Bytes(request.body().as_bytes()), + ) + .map_err(|e| { + Error::authentication_error(MECH_NAME, &format!("Failed to create SignableRequest: {e}")) + })?; + + // Sign the request + let (signing_instructions, _signature) = sign(signable_request, &signing_params) + .map_err(|e| Error::authentication_error(MECH_NAME, &format!("Signing failed: {e}")))? + .into_parts(); + + signing_instructions.apply_to_request_http1x(&mut request); + dbg!("ending computation part of compute_aws_sigv4_headers"); + + // Extract the Authorization header + let headers = request.headers(); + let authorization = headers + .get("authorization") + .ok_or_else(|| Error::authentication_error(MECH_NAME, "Missing authorization header"))? + .to_str() + .map_err(|e| Error::authentication_error(MECH_NAME, &format!("Invalid header value: {e}")))? + .to_string(); + dbg!("authorization header: {}", &authorization); + + let token = headers + .get("x-amz-security-token") + .map(|v| { + v.to_str().map(|s| s.to_string()).map_err(|e| { + Error::authentication_error(MECH_NAME, &format!("Invalid token header: {e}")) + }) + }) + .transpose()?; + dbg!("token header: {}", &token); + + Ok(AwsSigV4Headers { + authorization, + date: date_str, + token, + }) +} + /// Contains the credentials for MONGODB-AWS authentication. // RUST-1529 note: dead_code tag added to avoid unused warnings on expiration field #[allow(dead_code)] @@ -404,128 +549,129 @@ impl AwsCredential { // .map_err(|_| Error::unknown_authentication_error(MECH_NAME)) // } - /// Computes the signed authorization header for the credentials to send to the server in a sasl - /// payload. - fn compute_authorization_header( - &self, - date: DateTime, - host: &str, - server_nonce: &[u8], - ) -> Result { - let date_str = date.format(AWS_LONG_DATE_FMT).to_string(); - - // We need to include the security token header if the user provided a token. If not, we - // just use the empty string. - let token = self - .session_token - .as_ref() - .map(|s| format!("x-amz-security-token:{}\n", s)) - .unwrap_or_default(); - - // Similarly, we need to put "x-amz-security-token" into the list of signed headers if the - // user provided a token. If not, we just use the empty string. - let token_signed_header = if self.session_token.is_some() { - "x-amz-security-token;" - } else { - "" - }; - - // Generate the list of signed headers (either with or without the security token header). - #[rustfmt::skip] - let signed_headers = format!( - "\ - content-length;\ - content-type;\ - host;\ - x-amz-date;\ - {token_signed_header}\ - x-mongodb-gs2-cb-flag;\ - x-mongodb-server-nonce\ - ", - token_signed_header = token_signed_header, - ); - - let body = "Action=GetCallerIdentity&Version=2011-06-15"; - let hashed_body = hex::encode(Sha256::digest(body.as_bytes())); - - let nonce = base64::encode(server_nonce); - - #[rustfmt::skip] - let request = format!( - "\ - POST\n\ - /\n\n\ - content-length:43\n\ - content-type:application/x-www-form-urlencoded\n\ - host:{host}\n\ - x-amz-date:{date}\n\ - {token}\ - x-mongodb-gs2-cb-flag:n\n\ - x-mongodb-server-nonce:{nonce}\n\n\ - {signed_headers}\n\ - {hashed_body}\ - ", - host = host, - date = date_str, - token = token, - nonce = nonce, - signed_headers = signed_headers, - hashed_body = hashed_body, - ); - - let hashed_request = hex::encode(Sha256::digest(request.as_bytes())); - - let small_date = date.format("%Y%m%d").to_string(); - - let region = if host == "sts.amazonaws.com" { - "us-east-1" - } else { - let parts: Vec<_> = host.split('.').collect(); - parts.get(1).copied().unwrap_or("us-east-1") - }; - - #[rustfmt::skip] - let string_to_sign = format!( - "\ - AWS4-HMAC-SHA256\n\ - {full_date}\n\ - {small_date}/{region}/sts/aws4_request\n\ - {hashed_request}\ - ", - full_date = date_str, - small_date = small_date, - region = region, - hashed_request = hashed_request, - ); - - let first_hmac_key = format!("AWS4{}", self.secret_access_key); - let k_date = - auth::mac::>(first_hmac_key.as_ref(), small_date.as_ref(), MECH_NAME)?; - let k_region = auth::mac::>(k_date.as_ref(), region.as_ref(), MECH_NAME)?; - let k_service = auth::mac::>(k_region.as_ref(), b"sts", MECH_NAME)?; - let k_signing = auth::mac::>(k_service.as_ref(), b"aws4_request", MECH_NAME)?; - - let signature_bytes = - auth::mac::>(k_signing.as_ref(), string_to_sign.as_ref(), MECH_NAME)?; - let signature = hex::encode(signature_bytes); - - #[rustfmt::skip] - let auth_header = format!( - "\ - AWS4-HMAC-SHA256 \ - Credential={access_key}/{small_date}/{region}/sts/aws4_request, \ - SignedHeaders={signed_headers}, \ - Signature={signature}\ - ", - access_key = self.access_key_id, - small_date = small_date, - region = region, - signed_headers = signed_headers, - signature = signature - ); - - Ok(auth_header) - } + // Computes the signed authorization header for the credentials to send to the server in a sasl + // payload. + // fn compute_authorization_header( + // &self, + // date: DateTime, + // host: &str, + // server_nonce: &[u8], + // ) -> Result { + // let date_str = date.format(AWS_LONG_DATE_FMT).to_string(); + + // // We need to include the security token header if the user provided a token. If not, we + // // just use the empty string. + // let token = self + // .session_token + // .as_ref() + // .map(|s| format!("x-amz-security-token:{}\n", s)) + // .unwrap_or_default(); + + // // Similarly, we need to put "x-amz-security-token" into the list of signed headers if + // the // // user provided a token. If not, we just use the empty string. + // let token_signed_header = if self.session_token.is_some() { + // "x-amz-security-token;" + // } else { + // "" + // }; + + // // Generate the list of signed headers (either with or without the security token + // header). #[rustfmt::skip] + // let signed_headers = format!( + // "\ + // content-length;\ + // content-type;\ + // host;\ + // x-amz-date;\ + // {token_signed_header}\ + // x-mongodb-gs2-cb-flag;\ + // x-mongodb-server-nonce\ + // ", + // token_signed_header = token_signed_header, + // ); + + // let body = "Action=GetCallerIdentity&Version=2011-06-15"; + // let hashed_body = hex::encode(Sha256::digest(body.as_bytes())); + + // let nonce = base64::encode(server_nonce); + + // #[rustfmt::skip] + // let request = format!( + // "\ + // POST\n\ + // /\n\n\ + // content-length:43\n\ + // content-type:application/x-www-form-urlencoded\n\ + // host:{host}\n\ + // x-amz-date:{date}\n\ + // {token}\ + // x-mongodb-gs2-cb-flag:n\n\ + // x-mongodb-server-nonce:{nonce}\n\n\ + // {signed_headers}\n\ + // {hashed_body}\ + // ", + // host = host, + // date = date_str, + // token = token, + // nonce = nonce, + // signed_headers = signed_headers, + // hashed_body = hashed_body, + // ); + + // let hashed_request = hex::encode(Sha256::digest(request.as_bytes())); + + // let small_date = date.format("%Y%m%d").to_string(); + + // let region = if host == "sts.amazonaws.com" { + // "us-east-1" + // } else { + // let parts: Vec<_> = host.split('.').collect(); + // parts.get(1).copied().unwrap_or("us-east-1") + // }; + + // #[rustfmt::skip] + // let string_to_sign = format!( + // "\ + // AWS4-HMAC-SHA256\n\ + // {full_date}\n\ + // {small_date}/{region}/sts/aws4_request\n\ + // {hashed_request}\ + // ", + // full_date = date_str, + // small_date = small_date, + // region = region, + // hashed_request = hashed_request, + // ); + + // let first_hmac_key = format!("AWS4{}", self.secret_access_key); + // let k_date = + // auth::mac::>(first_hmac_key.as_ref(), small_date.as_ref(), MECH_NAME)?; + // let k_region = auth::mac::>(k_date.as_ref(), region.as_ref(), MECH_NAME)?; + // let k_service = auth::mac::>(k_region.as_ref(), b"sts", MECH_NAME)?; + // let k_signing = auth::mac::>(k_service.as_ref(), b"aws4_request", + // MECH_NAME)?; + + // let signature_bytes = + // auth::mac::>(k_signing.as_ref(), string_to_sign.as_ref(), MECH_NAME)?; + // let signature = hex::encode(signature_bytes); + + // #[rustfmt::skip] + // let auth_header = format!( + // "\ + // AWS4-HMAC-SHA256 \ + // Credential={access_key}/{small_date}/{region}/sts/aws4_request, \ + // SignedHeaders={signed_headers}, \ + // Signature={signature}\ + // ", + // access_key = self.access_key_id, + // small_date = small_date, + // region = region, + // signed_headers = signed_headers, + // signature = signature + // ); + + // Ok(auth_header) + // } // #[cfg(feature = "in-use-encryption")] // pub(crate) fn access_key(&self) -> &str { From f8418412a857ae606f3a4087d8a779f6984d5ee9 Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Wed, 30 Jul 2025 10:44:14 -0400 Subject: [PATCH 30/43] Uncomment original compute_authorization_header after adding #[allow(dead_code)] --- src/client/auth/aws.rs | 265 +++++++++++++++++++---------------------- 1 file changed, 124 insertions(+), 141 deletions(-) diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index bfe4ae191..b1ab2a1d2 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -1,9 +1,11 @@ use std::{fs::File, io::Read, time::Duration}; use chrono::{offset::Utc, DateTime}; +use hmac::Hmac; use once_cell::sync::Lazy; use rand::distributions::{Alphanumeric, DistString}; use serde::Deserialize; +use sha2::{Digest, Sha256}; use tokio::sync::Mutex; use crate::{ @@ -142,24 +144,6 @@ async fn authenticate_stream_inner( // &server_first.server_nonce, // )?; - // let mut client_second_payload = doc! { - // "a": authorization_header, - // "d": date.format(AWS_LONG_DATE_FMT).to_string(), - // }; - - // if let Some(security_token) = aws_credential.session_token { - // client_second_payload.insert("t", security_token); - // } - - // attempt 1 - // let mut client_second_payload = doc! { - // "a": authorization_header, - // "d": date_header, - // }; - // if let Some(token) = token_header { - // client_second_payload.insert("t", token); - // } - let sigv4_headers = compute_aws_sigv4_headers( creds, date, @@ -547,129 +531,128 @@ impl AwsCredential { .map_err(|_| Error::unknown_authentication_error(MECH_NAME)) } - // Computes the signed authorization header for the credentials to send to the server in a sasl - // payload. - // fn compute_authorization_header( - // &self, - // date: DateTime, - // host: &str, - // server_nonce: &[u8], - // ) -> Result { - // let date_str = date.format(AWS_LONG_DATE_FMT).to_string(); - - // // We need to include the security token header if the user provided a token. If not, we - // // just use the empty string. - // let token = self - // .session_token - // .as_ref() - // .map(|s| format!("x-amz-security-token:{}\n", s)) - // .unwrap_or_default(); - - // // Similarly, we need to put "x-amz-security-token" into the list of signed headers if - // the // // user provided a token. If not, we just use the empty string. - // let token_signed_header = if self.session_token.is_some() { - // "x-amz-security-token;" - // } else { - // "" - // }; - - // // Generate the list of signed headers (either with or without the security token - // header). #[rustfmt::skip] - // let signed_headers = format!( - // "\ - // content-length;\ - // content-type;\ - // host;\ - // x-amz-date;\ - // {token_signed_header}\ - // x-mongodb-gs2-cb-flag;\ - // x-mongodb-server-nonce\ - // ", - // token_signed_header = token_signed_header, - // ); - - // let body = "Action=GetCallerIdentity&Version=2011-06-15"; - // let hashed_body = hex::encode(Sha256::digest(body.as_bytes())); - - // let nonce = base64::encode(server_nonce); - - // #[rustfmt::skip] - // let request = format!( - // "\ - // POST\n\ - // /\n\n\ - // content-length:43\n\ - // content-type:application/x-www-form-urlencoded\n\ - // host:{host}\n\ - // x-amz-date:{date}\n\ - // {token}\ - // x-mongodb-gs2-cb-flag:n\n\ - // x-mongodb-server-nonce:{nonce}\n\n\ - // {signed_headers}\n\ - // {hashed_body}\ - // ", - // host = host, - // date = date_str, - // token = token, - // nonce = nonce, - // signed_headers = signed_headers, - // hashed_body = hashed_body, - // ); - - // let hashed_request = hex::encode(Sha256::digest(request.as_bytes())); - - // let small_date = date.format("%Y%m%d").to_string(); - - // let region = if host == "sts.amazonaws.com" { - // "us-east-1" - // } else { - // let parts: Vec<_> = host.split('.').collect(); - // parts.get(1).copied().unwrap_or("us-east-1") - // }; - - // #[rustfmt::skip] - // let string_to_sign = format!( - // "\ - // AWS4-HMAC-SHA256\n\ - // {full_date}\n\ - // {small_date}/{region}/sts/aws4_request\n\ - // {hashed_request}\ - // ", - // full_date = date_str, - // small_date = small_date, - // region = region, - // hashed_request = hashed_request, - // ); - - // let first_hmac_key = format!("AWS4{}", self.secret_access_key); - // let k_date = - // auth::mac::>(first_hmac_key.as_ref(), small_date.as_ref(), MECH_NAME)?; - // let k_region = auth::mac::>(k_date.as_ref(), region.as_ref(), MECH_NAME)?; - // let k_service = auth::mac::>(k_region.as_ref(), b"sts", MECH_NAME)?; - // let k_signing = auth::mac::>(k_service.as_ref(), b"aws4_request", - // MECH_NAME)?; - - // let signature_bytes = - // auth::mac::>(k_signing.as_ref(), string_to_sign.as_ref(), MECH_NAME)?; - // let signature = hex::encode(signature_bytes); - - // #[rustfmt::skip] - // let auth_header = format!( - // "\ - // AWS4-HMAC-SHA256 \ - // Credential={access_key}/{small_date}/{region}/sts/aws4_request, \ - // SignedHeaders={signed_headers}, \ - // Signature={signature}\ - // ", - // access_key = self.access_key_id, - // small_date = small_date, - // region = region, - // signed_headers = signed_headers, - // signature = signature - // ); - - // Ok(auth_header) - // } + /// Computes the signed authorization header for the credentials to send to the server in a sasl + /// payload. + fn compute_authorization_header( + &self, + date: DateTime, + host: &str, + server_nonce: &[u8], + ) -> Result { + let date_str = date.format(AWS_LONG_DATE_FMT).to_string(); + + // We need to include the security token header if the user provided a token. If not, we + // just use the empty string. + let token = self + .session_token + .as_ref() + .map(|s| format!("x-amz-security-token:{}\n", s)) + .unwrap_or_default(); + + // Similarly, we need to put "x-amz-security-token" into the list of signed headers if the + // user provided a token. If not, we just use the empty string. + let token_signed_header = if self.session_token.is_some() { + "x-amz-security-token;" + } else { + "" + }; + + // Generate the list of signed headers (either with or without the security token header). + #[rustfmt::skip] + let signed_headers = format!( + "\ + content-length;\ + content-type;\ + host;\ + x-amz-date;\ + {token_signed_header}\ + x-mongodb-gs2-cb-flag;\ + x-mongodb-server-nonce\ + ", + token_signed_header = token_signed_header, + ); + + let body = "Action=GetCallerIdentity&Version=2011-06-15"; + let hashed_body = hex::encode(Sha256::digest(body.as_bytes())); + + let nonce = base64::encode(server_nonce); + + #[rustfmt::skip] + let request = format!( + "\ + POST\n\ + /\n\n\ + content-length:43\n\ + content-type:application/x-www-form-urlencoded\n\ + host:{host}\n\ + x-amz-date:{date}\n\ + {token}\ + x-mongodb-gs2-cb-flag:n\n\ + x-mongodb-server-nonce:{nonce}\n\n\ + {signed_headers}\n\ + {hashed_body}\ + ", + host = host, + date = date_str, + token = token, + nonce = nonce, + signed_headers = signed_headers, + hashed_body = hashed_body, + ); + + let hashed_request = hex::encode(Sha256::digest(request.as_bytes())); + + let small_date = date.format("%Y%m%d").to_string(); + + let region = if host == "sts.amazonaws.com" { + "us-east-1" + } else { + let parts: Vec<_> = host.split('.').collect(); + parts.get(1).copied().unwrap_or("us-east-1") + }; + + #[rustfmt::skip] + let string_to_sign = format!( + "\ + AWS4-HMAC-SHA256\n\ + {full_date}\n\ + {small_date}/{region}/sts/aws4_request\n\ + {hashed_request}\ + ", + full_date = date_str, + small_date = small_date, + region = region, + hashed_request = hashed_request, + ); + + let first_hmac_key = format!("AWS4{}", self.secret_access_key); + let k_date = + auth::mac::>(first_hmac_key.as_ref(), small_date.as_ref(), MECH_NAME)?; + let k_region = auth::mac::>(k_date.as_ref(), region.as_ref(), MECH_NAME)?; + let k_service = auth::mac::>(k_region.as_ref(), b"sts", MECH_NAME)?; + let k_signing = auth::mac::>(k_service.as_ref(), b"aws4_request", MECH_NAME)?; + + let signature_bytes = + auth::mac::>(k_signing.as_ref(), string_to_sign.as_ref(), MECH_NAME)?; + let signature = hex::encode(signature_bytes); + + #[rustfmt::skip] + let auth_header = format!( + "\ + AWS4-HMAC-SHA256 \ + Credential={access_key}/{small_date}/{region}/sts/aws4_request, \ + SignedHeaders={signed_headers}, \ + Signature={signature}\ + ", + access_key = self.access_key_id, + small_date = small_date, + region = region, + signed_headers = signed_headers, + signature = signature + ); + + Ok(auth_header) + } #[cfg(feature = "in-use-encryption")] pub(crate) fn access_key(&self) -> &str { From c64a61019d20a6013083fbcb4b05d78f74941ca2 Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Wed, 30 Jul 2025 10:58:36 -0400 Subject: [PATCH 31/43] Move aws sdk credential getting logic after original commented impl --- src/client/auth/aws.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index 6393aadbc..64f62371d 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -97,16 +97,6 @@ async fn authenticate_stream_inner( let server_first = ServerFirst::parse(server_first_response.auth_response_body(MECH_NAME)?)?; server_first.validate(&nonce)?; - let creds = get_aws_credentials(credential).await.map_err(|e| { - Error::authentication_error(MECH_NAME, &format!("failed to get creds: {e}")) - })?; - let aws_credential = AwsCredential::from_sdk_creds( - creds.access_key_id().to_string(), - creds.secret_access_key().to_string(), - creds.session_token().map(|s| s.to_string()), - None, - ); - // Find credentials using original implementation without AWS SDK // let aws_credential = { // // Limit scope of this variable to avoid holding onto the lock for the duration of @@ -126,6 +116,16 @@ async fn authenticate_stream_inner( // } // }; + let creds = get_aws_credentials(credential).await.map_err(|e| { + Error::authentication_error(MECH_NAME, &format!("failed to get creds: {e}")) + })?; + let aws_credential = AwsCredential::from_sdk_creds( + creds.access_key_id().to_string(), + creds.secret_access_key().to_string(), + creds.session_token().map(|s| s.to_string()), + None, + ); + let date = Utc::now(); let authorization_header = aws_credential.compute_authorization_header( From e5549b249106a7c95dff41af3b1f4d2a8561dd19 Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Wed, 30 Jul 2025 11:42:58 -0400 Subject: [PATCH 32/43] Change service to sts and add content-length header for request --- src/client/auth/aws.rs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index 8c327d94e..6bd78ace5 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -136,14 +136,25 @@ async fn authenticate_stream_inner( ); let date = Utc::now(); - // Generate authorization header using original implementation without AWS SDK + // Generate authorization header using original implementation without AWS SDK // let authorization_header = aws_credential.compute_authorization_header( // date, // &server_first.sts_host, // &server_first.server_nonce, // )?; + // dbg!("authorization header: {}", &authorization_header); + + // let mut client_second_payload = doc! { + // "a": authorization_header, + // "d": date.format(AWS_LONG_DATE_FMT).to_string(), + // }; + + // if let Some(security_token) = aws_credential.session_token { + // client_second_payload.insert("t", security_token); + // } + let sigv4_headers = compute_aws_sigv4_headers( creds, date, @@ -243,9 +254,9 @@ pub async fn compute_aws_sigv4_headers( }; let url = format!("https://{}", host); - let service = "execute-api"; + let service = "sts"; let body_str = "Action=GetCallerIdentity&Version=2011-06-15"; - // let body_bytes = body_str.as_bytes(); + let body_bytes = body_str.as_bytes(); let nonce_b64 = base64::encode(server_nonce); // Create the HTTP request @@ -254,7 +265,7 @@ pub async fn compute_aws_sigv4_headers( .uri(&url) .header("host", host) .header("content-type", "application/x-www-form-urlencoded") - // .header("content-length", body_bytes.len()) + .header("content-length", body_bytes.len()) .header("x-amz-date", date_str.clone()) .header("x-mongodb-gs2-cb-flag", "n") .header("x-mongodb-server-nonce", nonce_b64.clone()); From 12b9c334a54c05b5abd31ef113e88e0279e9e814 Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Wed, 30 Jul 2025 12:11:44 -0400 Subject: [PATCH 33/43] Remove from_sdk_creds and dereferences --- src/client/auth/aws.rs | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index 6bd78ace5..080fb19ba 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -128,12 +128,6 @@ async fn authenticate_stream_inner( let creds = get_aws_credentials(credential).await.map_err(|e| { Error::authentication_error(MECH_NAME, &format!("failed to get creds: {e}")) })?; - let aws_credential = AwsCredential::from_sdk_creds( - creds.access_key_id().to_string(), - creds.secret_access_key().to_string(), - creds.session_token().map(|s| s.to_string()), - None, - ); let date = Utc::now(); @@ -284,8 +278,8 @@ pub async fn compute_aws_sigv4_headers( let signing_settings = SigningSettings::default(); let signing_params = SigningParams::builder() .identity(&identity) - .region(®ion) - .name(&service) + .region(region) + .name(service) .time(date.into()) .settings(signing_settings) .build() @@ -439,21 +433,6 @@ impl AwsCredential { } } - // Creates AwsCredential from keys. - fn from_sdk_creds( - access_key_id: String, - secret_access_key: String, - session_token: Option, - expiration: Option, - ) -> Self { - Self { - access_key_id, - secret_access_key, - session_token, - expiration, - } - } - async fn get_from_assume_role_with_web_identity_request( token_file: String, role_arn: String, From 9a7d14c3cc3e5a600482c1d9c2615b4fa5fdc7ad Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Wed, 30 Jul 2025 14:10:38 -0400 Subject: [PATCH 34/43] Clean up sigv4 function --- src/client/auth/aws.rs | 49 +++++++++++++++--------------------------- 1 file changed, 17 insertions(+), 32 deletions(-) diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index 080fb19ba..57442a497 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -138,8 +138,6 @@ async fn authenticate_stream_inner( // &server_first.server_nonce, // )?; - // dbg!("authorization header: {}", &authorization_header); - // let mut client_second_payload = doc! { // "a": authorization_header, // "d": date.format(AWS_LONG_DATE_FMT).to_string(), @@ -149,7 +147,7 @@ async fn authenticate_stream_inner( // client_second_payload.insert("t", security_token); // } - let sigv4_headers = compute_aws_sigv4_headers( + let client_second_payload = compute_aws_sigv4_payload( creds, date, &server_first.sts_host, @@ -157,15 +155,6 @@ async fn authenticate_stream_inner( ) .await?; - let mut client_second_payload = doc! { - "a": sigv4_headers.authorization, - "d": sigv4_headers.date, - }; - - if let Some(token) = sigv4_headers.token { - client_second_payload.insert("t", token); - } - let client_second_payload_bytes = client_second_payload.encode_to_vec()?; let sasl_continue = SaslContinue::new( @@ -226,18 +215,12 @@ pub(crate) async fn get_aws_credentials(credential: &Credential) -> Result, -} - -pub async fn compute_aws_sigv4_headers( +pub async fn compute_aws_sigv4_payload( creds: Credentials, date: DateTime, host: &str, server_nonce: &[u8], -) -> Result { +) -> Result { let date_str = date.format("%Y%m%dT%H%M%SZ").to_string(); let region = if host == "sts.amazonaws.com" { @@ -260,9 +243,9 @@ pub async fn compute_aws_sigv4_headers( .header("host", host) .header("content-type", "application/x-www-form-urlencoded") .header("content-length", body_bytes.len()) - .header("x-amz-date", date_str.clone()) + .header("x-amz-date", &date_str) .header("x-mongodb-gs2-cb-flag", "n") - .header("x-mongodb-server-nonce", nonce_b64.clone()); + .header("x-mongodb-server-nonce", &nonce_b64); if let Some(token) = creds.session_token() { builder = builder.header("x-amz-security-token", token); @@ -307,19 +290,17 @@ pub async fn compute_aws_sigv4_headers( .into_parts(); signing_instructions.apply_to_request_http1x(&mut request); - dbg!("ending computation part of compute_aws_sigv4_headers"); // Extract the Authorization header let headers = request.headers(); - let authorization = headers + let authorization_header = headers .get("authorization") .ok_or_else(|| Error::authentication_error(MECH_NAME, "Missing authorization header"))? .to_str() .map_err(|e| Error::authentication_error(MECH_NAME, &format!("Invalid header value: {e}")))? .to_string(); - dbg!("authorization header: {}", &authorization); - let token = headers + let token_header = headers .get("x-amz-security-token") .map(|v| { v.to_str().map(|s| s.to_string()).map_err(|e| { @@ -327,13 +308,17 @@ pub async fn compute_aws_sigv4_headers( }) }) .transpose()?; - dbg!("token header: {}", &token); - Ok(AwsSigV4Headers { - authorization, - date: date_str, - token, - }) + let mut payload = doc! { + "a": authorization_header, + "d": date_str, + }; + + if let Some(token) = token_header { + payload.insert("t", token); + } + + Ok(payload) } /// Contains the credentials for MONGODB-AWS authentication. From c1b3f82c0ae5fd45f91f5e72bc4039696c95cff1 Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Wed, 30 Jul 2025 14:24:59 -0400 Subject: [PATCH 35/43] Clean up unwrap, refactor --- src/client/auth/aws.rs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index 57442a497..d95fd0d4d 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -221,8 +221,6 @@ pub async fn compute_aws_sigv4_payload( host: &str, server_nonce: &[u8], ) -> Result { - let date_str = date.format("%Y%m%dT%H%M%SZ").to_string(); - let region = if host == "sts.amazonaws.com" { "us-east-1" } else { @@ -231,7 +229,7 @@ pub async fn compute_aws_sigv4_payload( }; let url = format!("https://{}", host); - let service = "sts"; + let date_str = date.format("%Y%m%dT%H%M%SZ").to_string(); let body_str = "Action=GetCallerIdentity&Version=2011-06-15"; let body_bytes = body_str.as_bytes(); let nonce_b64 = base64::encode(server_nonce); @@ -255,6 +253,7 @@ pub async fn compute_aws_sigv4_payload( Error::authentication_error(MECH_NAME, &format!("Failed to build request: {e}")) })?; + let service = "sts"; let identity = creds.into(); // Set up signing parameters @@ -274,24 +273,24 @@ pub async fn compute_aws_sigv4_payload( let signable_request = SignableRequest::new( request.method().as_str(), request.uri().to_string(), - request - .headers() - .iter() - .map(|(k, v)| (k.as_str(), std::str::from_utf8(v.as_bytes()).unwrap())), + request.headers().iter().map(|(k, v)| { + ( + k.as_str(), + std::str::from_utf8(v.as_bytes()).expect("Header value should be valid UTF-8"), + ) + }), SignableBody::Bytes(request.body().as_bytes()), ) .map_err(|e| { Error::authentication_error(MECH_NAME, &format!("Failed to create SignableRequest: {e}")) })?; - // Sign the request let (signing_instructions, _signature) = sign(signable_request, &signing_params) .map_err(|e| Error::authentication_error(MECH_NAME, &format!("Signing failed: {e}")))? .into_parts(); signing_instructions.apply_to_request_http1x(&mut request); - // Extract the Authorization header let headers = request.headers(); let authorization_header = headers .get("authorization") From 2d71fc4028280e12824528b374682da4ffea73f1 Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Fri, 1 Aug 2025 15:23:19 -0400 Subject: [PATCH 36/43] Fix merge - update Document::encode_to_vec to to_writer --- src/client/auth/aws.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index 7f318eda3..56cb75345 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -153,7 +153,8 @@ async fn authenticate_stream_inner( ) .await?; - let client_second_payload_bytes = client_second_payload.encode_to_vec()?; + let mut client_second_payload_bytes = vec![]; + client_second_payload.to_writer(&mut client_second_payload_bytes)?; let sasl_continue = SaslContinue::new( source.into(), From 2bffc014179569b659a41827a6f89c61cb186658 Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Thu, 7 Aug 2025 14:46:25 -0400 Subject: [PATCH 37/43] Fix error propagation, remove string conversions --- src/client/auth/aws.rs | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index 56cb75345..5fe3dc1b5 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -272,12 +272,19 @@ pub async fn compute_aws_sigv4_payload( let signable_request = SignableRequest::new( request.method().as_str(), request.uri().to_string(), - request.headers().iter().map(|(k, v)| { - ( - k.as_str(), - std::str::from_utf8(v.as_bytes()).expect("Header value should be valid UTF-8"), - ) - }), + request + .headers() + .iter() + .map(|(k, v)| { + let value = std::str::from_utf8(v.as_bytes()).map_err(|_| { + Error::authentication_error( + MECH_NAME, + "Failed to convert header value to valid UTF-8", + ) + })?; + Ok((k.as_str(), value)) + }) + .filter_map(Result::ok), SignableBody::Bytes(request.body().as_bytes()), ) .map_err(|e| { @@ -287,7 +294,6 @@ pub async fn compute_aws_sigv4_payload( let (signing_instructions, _signature) = sign(signable_request, &signing_params) .map_err(|e| Error::authentication_error(MECH_NAME, &format!("Signing failed: {e}")))? .into_parts(); - signing_instructions.apply_to_request_http1x(&mut request); let headers = request.headers(); @@ -295,13 +301,14 @@ pub async fn compute_aws_sigv4_payload( .get("authorization") .ok_or_else(|| Error::authentication_error(MECH_NAME, "Missing authorization header"))? .to_str() - .map_err(|e| Error::authentication_error(MECH_NAME, &format!("Invalid header value: {e}")))? - .to_string(); + .map_err(|e| { + Error::authentication_error(MECH_NAME, &format!("Invalid header value: {e}")) + })?; let token_header = headers .get("x-amz-security-token") .map(|v| { - v.to_str().map(|s| s.to_string()).map_err(|e| { + v.to_str().map_err(|e| { Error::authentication_error(MECH_NAME, &format!("Invalid token header: {e}")) }) }) From 9c96dde03f51b6ab0d6ed23695cd37578b7656a8 Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Thu, 7 Aug 2025 22:45:08 -0400 Subject: [PATCH 38/43] Update headers error propagation --- src/client/auth/aws.rs | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index 5fe3dc1b5..9b086d9f6 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -268,23 +268,24 @@ pub async fn compute_aws_sigv4_payload( Error::authentication_error(MECH_NAME, &format!("Failed to build signing params: {e}")) })? .into(); + let headers: Result> = request + .headers() + .iter() + .map(|(k, v)| { + let v = v.to_str().map_err(|_| { + Error::authentication_error( + MECH_NAME, + "Failed to convert header value to valid UTF-8", + ) + })?; + Ok((k.as_str(), v)) + }) + .collect(); let signable_request = SignableRequest::new( request.method().as_str(), request.uri().to_string(), - request - .headers() - .iter() - .map(|(k, v)| { - let value = std::str::from_utf8(v.as_bytes()).map_err(|_| { - Error::authentication_error( - MECH_NAME, - "Failed to convert header value to valid UTF-8", - ) - })?; - Ok((k.as_str(), value)) - }) - .filter_map(Result::ok), + headers?.into_iter(), SignableBody::Bytes(request.body().as_bytes()), ) .map_err(|e| { From dde6a5c151bc01a5d07d332a93c263288364167b Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Fri, 8 Aug 2025 00:56:32 -0400 Subject: [PATCH 39/43] Upload cargo.lock --- Cargo.lock | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 10e44afab..fe45acbd0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -139,9 +139,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "aws-config" -version = "1.8.3" +version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0baa720ebadea158c5bda642ac444a2af0cdf7bb66b46d1e4533de5d1f449d0" +checksum = "02a18fd934af6ae7ca52410d4548b98eb895aab0f1ea417d168d85db1434a141" dependencies = [ "aws-credential-types", "aws-runtime", @@ -223,9 +223,9 @@ dependencies = [ [[package]] name = "aws-sdk-sts" -version = "1.80.0" +version = "1.73.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06e3ed2a9b828ae7763ddaed41d51724d2661a50c45f845b08967e52f4939cfc" +checksum = "f1e9c3c24e36183e2f698235ed38dcfbbdff1d09b9232dc866c4be3011e0b47e" dependencies = [ "aws-credential-types", "aws-runtime", @@ -279,9 +279,9 @@ dependencies = [ [[package]] name = "aws-smithy-http" -version = "0.62.3" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c4dacf2d38996cf729f55e7a762b30918229917eca115de45dfa8dfb97796c9" +checksum = "43c82ba4cab184ea61f6edaafc1072aad3c2a17dcf4c0fce19ac5694b90d8b5f" dependencies = [ "aws-smithy-runtime-api", "aws-smithy-types", @@ -350,9 +350,9 @@ dependencies = [ [[package]] name = "aws-smithy-runtime" -version = "1.8.6" +version = "1.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e107ce0783019dbff59b3a244aa0c114e4a8c9d93498af9162608cd5474e796" +checksum = "660f70d9d8af6876b4c9aa8dcb0dbaf0f89b04ee9a4455bea1b4ba03b15f26f6" dependencies = [ "aws-smithy-async", "aws-smithy-http", @@ -374,9 +374,9 @@ dependencies = [ [[package]] name = "aws-smithy-runtime-api" -version = "1.8.7" +version = "1.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75d52251ed4b9776a3e8487b2a01ac915f73b2da3af8fc1e77e0fce697a550d4" +checksum = "937a49ecf061895fca4a6dd8e864208ed9be7546c0527d04bc07d502ec5fba1c" dependencies = [ "aws-smithy-async", "aws-smithy-types", @@ -642,9 +642,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.31" +version = "1.2.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3a42d84bb6b69d3a8b3eaacf0d88f179e1929695e1ad012b6cf64d9caaa5fd2" +checksum = "deec109607ca693028562ed836a5f1c4b8bd77755c4e132fc5ce11b0b6211ae7" dependencies = [ "jobserver", "libc", @@ -2648,9 +2648,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.17" +version = "0.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" +checksum = "7251471db004e509f4e75a62cca9435365b5ec7bcdff530d612ac7c87c44a792" dependencies = [ "bitflags 2.9.0", ] @@ -3042,9 +3042,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.142" +version = "1.0.141" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7" +checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3" dependencies = [ "indexmap 2.9.0", "itoa", @@ -3146,9 +3146,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.6" +version = "1.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" +checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" dependencies = [ "libc", ] @@ -3449,9 +3449,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.47.1" +version = "1.47.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" +checksum = "43864ed400b6043a4757a25c7a64a8efde741aed79a056a2fb348a406701bb35" dependencies = [ "backtrace", "bytes", @@ -3522,9 +3522,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.16" +version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" +checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" dependencies = [ "bytes", "futures-core", @@ -4358,9 +4358,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.3" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdbb9122ea75b11bf96e7492afb723e8a7fbe12c67417aa95e7e3d18144d37cd" +checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" dependencies = [ "yoke", "zerofrom", From 92d0cd3ae675480760c9cd7b87e58f23dc828605 Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Fri, 8 Aug 2025 01:58:03 -0400 Subject: [PATCH 40/43] Update formatting --- src/client/auth/aws.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index 09c8225a8..2e0f93bd9 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -227,7 +227,7 @@ pub async fn compute_aws_sigv4_payload( parts.get(1).copied().unwrap_or("us-east-1") }; - let url = format!("https://{}", host); + let url = format!("https://{host}"); let date_str = date.format("%Y%m%dT%H%M%SZ").to_string(); let body_str = "Action=GetCallerIdentity&Version=2011-06-15"; let body_bytes = body_str.as_bytes(); From 7018a691e60e8504068ce19a17485d6179ec36b1 Mon Sep 17 00:00:00 2001 From: Jamie Tsai Date: Fri, 8 Aug 2025 13:10:29 -0400 Subject: [PATCH 41/43] Remove async --- src/client/auth/aws.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/client/auth/aws.rs b/src/client/auth/aws.rs index 2e0f93bd9..022c2781f 100644 --- a/src/client/auth/aws.rs +++ b/src/client/auth/aws.rs @@ -150,8 +150,7 @@ async fn authenticate_stream_inner( date, &server_first.sts_host, &server_first.server_nonce, - ) - .await?; + )?; let mut client_second_payload_bytes = vec![]; client_second_payload.to_writer(&mut client_second_payload_bytes)?; @@ -214,7 +213,7 @@ pub(crate) async fn get_aws_credentials(credential: &Credential) -> Result, host: &str, From 923cee45a3ddd19ca83d71c723945146a2bd2e35 Mon Sep 17 00:00:00 2001 From: Isabel Atkinson Date: Tue, 12 Aug 2025 12:25:51 -0600 Subject: [PATCH 42/43] lockfile --- Cargo.lock | 100 ++++++++++++++++++++++++++--------------------------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fe45acbd0..026eabcf1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -139,9 +139,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "aws-config" -version = "1.6.3" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02a18fd934af6ae7ca52410d4548b98eb895aab0f1ea417d168d85db1434a141" +checksum = "c0baa720ebadea158c5bda642ac444a2af0cdf7bb66b46d1e4533de5d1f449d0" dependencies = [ "aws-credential-types", "aws-runtime", @@ -164,9 +164,9 @@ dependencies = [ [[package]] name = "aws-credential-types" -version = "1.2.4" +version = "1.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b68c2194a190e1efc999612792e25b1ab3abfefe4306494efaaabc25933c0cbe" +checksum = "1541072f81945fa1251f8795ef6c92c4282d74d59f88498ae7d4bf00f0ebdad9" dependencies = [ "aws-smithy-async", "aws-smithy-runtime-api", @@ -199,9 +199,9 @@ dependencies = [ [[package]] name = "aws-runtime" -version = "1.5.9" +version = "1.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2090e664216c78e766b6bac10fe74d2f451c02441d43484cd76ac9a295075f7" +checksum = "c034a1bc1d70e16e7f4e4caf7e9f7693e4c9c24cd91cf17c2a0b21abaebc7c8b" dependencies = [ "aws-credential-types", "aws-sigv4", @@ -223,9 +223,9 @@ dependencies = [ [[package]] name = "aws-sdk-sts" -version = "1.73.0" +version = "1.81.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1e9c3c24e36183e2f698235ed38dcfbbdff1d09b9232dc866c4be3011e0b47e" +checksum = "c92ea8a7602321c83615c82b408820ad54280fb026e92de0eeea937342fafa24" dependencies = [ "aws-credential-types", "aws-runtime", @@ -246,9 +246,9 @@ dependencies = [ [[package]] name = "aws-sigv4" -version = "1.3.3" +version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfb9021f581b71870a17eac25b52335b82211cdc092e02b6876b2bcefa61666" +checksum = "084c34162187d39e3740cb635acd73c4e3a551a36146ad6fe8883c929c9f876c" dependencies = [ "aws-credential-types", "aws-smithy-http", @@ -279,9 +279,9 @@ dependencies = [ [[package]] name = "aws-smithy-http" -version = "0.62.2" +version = "0.62.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43c82ba4cab184ea61f6edaafc1072aad3c2a17dcf4c0fce19ac5694b90d8b5f" +checksum = "7c4dacf2d38996cf729f55e7a762b30918229917eca115de45dfa8dfb97796c9" dependencies = [ "aws-smithy-runtime-api", "aws-smithy-types", @@ -350,9 +350,9 @@ dependencies = [ [[package]] name = "aws-smithy-runtime" -version = "1.8.5" +version = "1.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "660f70d9d8af6876b4c9aa8dcb0dbaf0f89b04ee9a4455bea1b4ba03b15f26f6" +checksum = "9e107ce0783019dbff59b3a244aa0c114e4a8c9d93498af9162608cd5474e796" dependencies = [ "aws-smithy-async", "aws-smithy-http", @@ -374,9 +374,9 @@ dependencies = [ [[package]] name = "aws-smithy-runtime-api" -version = "1.8.5" +version = "1.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "937a49ecf061895fca4a6dd8e864208ed9be7546c0527d04bc07d502ec5fba1c" +checksum = "75d52251ed4b9776a3e8487b2a01ac915f73b2da3af8fc1e77e0fce697a550d4" dependencies = [ "aws-smithy-async", "aws-smithy-types", @@ -588,7 +588,7 @@ dependencies = [ [[package]] name = "bson" version = "3.0.0" -source = "git+https://github.com/mongodb/bson-rust?branch=main#5622ad47769ac039d32701b493927a735a6467d2" +source = "git+https://github.com/mongodb/bson-rust?branch=main#062c499dfc6f7960d332972b1b1bab1912833f30" dependencies = [ "ahash", "base64 0.22.1", @@ -642,9 +642,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.30" +version = "1.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deec109607ca693028562ed836a5f1c4b8bd77755c4e132fc5ce11b0b6211ae7" +checksum = "2352e5597e9c544d5e6d9c95190d5d27738ade584fa8db0a16e130e5c2b5296e" dependencies = [ "jobserver", "libc", @@ -929,9 +929,9 @@ dependencies = [ [[package]] name = "derive-where" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "510c292c8cf384b1a340b816a9a6cf2599eb8f566a44949024af88418000c50b" +checksum = "ef941ded77d15ca19b40374869ac6000af1c9f2a4c0f3d4c70926287e6364a8f" dependencies = [ "proc-macro2", "quote", @@ -1040,7 +1040,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -1261,9 +1261,9 @@ checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "h2" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17da50a276f1e01e0ba6c029e47b7100754904ee8a278f886546e98575380785" +checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" dependencies = [ "atomic-waker", "bytes", @@ -1534,7 +1534,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2 0.6.0", + "socket2 0.5.10", "system-configuration", "tokio", "tower-service", @@ -1840,9 +1840,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.174" +version = "0.2.175" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" +checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" [[package]] name = "libgssapi" @@ -1873,7 +1873,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.48.5", ] [[package]] @@ -2484,9 +2484,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.95" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +checksum = "beef09f85ae72cea1ef96ba6870c51e6382ebfa4f0e85b643459331f3daa5be0" dependencies = [ "unicode-ident", ] @@ -2543,7 +2543,7 @@ dependencies = [ "once_cell", "socket2 0.5.10", "tracing", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -2648,9 +2648,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.16" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7251471db004e509f4e75a62cca9435365b5ec7bcdff530d612ac7c87c44a792" +checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" dependencies = [ "bitflags 2.9.0", ] @@ -2821,7 +2821,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -2834,7 +2834,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.9.4", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -2889,9 +2889,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" @@ -3042,9 +3042,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.141" +version = "1.0.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3" +checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7" dependencies = [ "indexmap 2.9.0", "itoa", @@ -3146,9 +3146,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.5" +version = "1.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" +checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" dependencies = [ "libc", ] @@ -3161,9 +3161,9 @@ checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "slab" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "smallvec" @@ -3330,7 +3330,7 @@ dependencies = [ "getrandom 0.3.2", "once_cell", "rustix 1.0.8", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -3449,9 +3449,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.47.0" +version = "1.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43864ed400b6043a4757a25c7a64a8efde741aed79a056a2fb348a406701bb35" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" dependencies = [ "backtrace", "bytes", @@ -3522,9 +3522,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.15" +version = "0.7.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" +checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" dependencies = [ "bytes", "futures-core", @@ -4358,9 +4358,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" +checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" dependencies = [ "yoke", "zerofrom", From 2fbd690319a10daed4deab2b9e502d2a70edf7b5 Mon Sep 17 00:00:00 2001 From: Isabel Atkinson Date: Tue, 12 Aug 2025 12:26:40 -0600 Subject: [PATCH 43/43] patchable --- .evergreen/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index b7a292421..c7a03538c 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -223,7 +223,7 @@ buildvariants: - name: aws-auth display_name: "AWS Authentication" - # patchable: false + patchable: false run_on: - ubuntu2004-small expansions: