From 66ea8287a02966217219fa59eabeaab20cf9c408 Mon Sep 17 00:00:00 2001 From: Johanna Larsson Date: Sat, 26 Sep 2026 18:23:36 +0100 Subject: [PATCH] refactor: drop aws crates for s3 We were just using them for S3 support. This PR switches us over to the s3 crate which works the same way, with some minor differences. The main implication of this change is that we're no longer doing all the AWS stuff, like checking aws profile in home directory, or automatic discovery of metadata. This change is covered by our brand new s3 test suite, but I also did the old school `just test-full` with minio. --- Cargo.lock | 1093 ++++++++--------------- Cargo.toml | 4 +- crates/tranquil-config/src/lib.rs | 1 + crates/tranquil-pds/Cargo.toml | 4 +- crates/tranquil-pds/tests/common/mod.rs | 53 +- crates/tranquil-storage/Cargo.toml | 6 +- crates/tranquil-storage/src/lib.rs | 153 ++-- example.toml | 1 + 8 files changed, 475 insertions(+), 840 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8b7d246..eef2604 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -444,419 +444,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" -[[package]] -name = "aws-config" -version = "1.8.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11493b0bad143270fb8ad284a096dd529ba91924c5409adeac856cc1bf047dbc" -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.5.0", - "sha1 0.10.6", - "time", - "tokio", - "tracing", - "url", - "zeroize", -] - -[[package]] -name = "aws-credential-types" -version = "1.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f20799b373a1be121fe3005fba0c2090af9411573878f224df44b42727fcaf7" -dependencies = [ - "aws-smithy-async", - "aws-smithy-runtime-api", - "aws-smithy-types", - "zeroize", -] - -[[package]] -name = "aws-runtime" -version = "1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc0651c57e384202e47153c1260b84a9936e19803d747615edf199dc3b98d17" -dependencies = [ - "aws-credential-types", - "aws-sigv4", - "aws-smithy-async", - "aws-smithy-eventstream", - "aws-smithy-http", - "aws-smithy-runtime", - "aws-smithy-runtime-api", - "aws-smithy-types", - "aws-types", - "bytes", - "bytes-utils", - "fastrand", - "http 0.2.12", - "http 1.5.0", - "http-body 0.4.6", - "http-body 1.1.0", - "percent-encoding", - "pin-project-lite", - "tracing", - "uuid", -] - -[[package]] -name = "aws-sdk-s3" -version = "1.129.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d4e8410fadbc0ee453145dd77a4958227b18b05bf67c2795d0a8b8596c9aa0f" -dependencies = [ - "aws-credential-types", - "aws-runtime", - "aws-sigv4", - "aws-smithy-async", - "aws-smithy-checksums", - "aws-smithy-eventstream", - "aws-smithy-http", - "aws-smithy-json", - "aws-smithy-observability", - "aws-smithy-runtime", - "aws-smithy-runtime-api", - "aws-smithy-types", - "aws-smithy-xml", - "aws-types", - "bytes", - "fastrand", - "hex", - "hmac 0.12.1", - "http 0.2.12", - "http 1.5.0", - "http-body 1.1.0", - "lru", - "percent-encoding", - "regex-lite", - "sha2 0.10.9", - "tracing", - "url", -] - -[[package]] -name = "aws-sdk-sso" -version = "1.97.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aadc669e184501caaa6beafb28c6267fc1baef0810fb58f9b205485ca3f2567" -dependencies = [ - "aws-credential-types", - "aws-runtime", - "aws-smithy-async", - "aws-smithy-http", - "aws-smithy-json", - "aws-smithy-observability", - "aws-smithy-runtime", - "aws-smithy-runtime-api", - "aws-smithy-types", - "aws-types", - "bytes", - "fastrand", - "http 0.2.12", - "http 1.5.0", - "regex-lite", - "tracing", -] - -[[package]] -name = "aws-sdk-ssooidc" -version = "1.99.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1342a7db8f358d3de0aed2007a0b54e875458e39848d54cc1d46700b2bfcb0a8" -dependencies = [ - "aws-credential-types", - "aws-runtime", - "aws-smithy-async", - "aws-smithy-http", - "aws-smithy-json", - "aws-smithy-observability", - "aws-smithy-runtime", - "aws-smithy-runtime-api", - "aws-smithy-types", - "aws-types", - "bytes", - "fastrand", - "http 0.2.12", - "http 1.5.0", - "regex-lite", - "tracing", -] - -[[package]] -name = "aws-sdk-sts" -version = "1.101.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab41ad64e4051ecabeea802d6a17845a91e83287e1dd249e6963ea1ba78c428a" -dependencies = [ - "aws-credential-types", - "aws-runtime", - "aws-smithy-async", - "aws-smithy-http", - "aws-smithy-json", - "aws-smithy-observability", - "aws-smithy-query", - "aws-smithy-runtime", - "aws-smithy-runtime-api", - "aws-smithy-types", - "aws-smithy-xml", - "aws-types", - "fastrand", - "http 0.2.12", - "http 1.5.0", - "regex-lite", - "tracing", -] - -[[package]] -name = "aws-sigv4" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0b660013a6683ab23797778e21f1f854744fdf05f68204b4cca4c8c04b5d1f4" -dependencies = [ - "aws-credential-types", - "aws-smithy-eventstream", - "aws-smithy-http", - "aws-smithy-runtime-api", - "aws-smithy-types", - "bytes", - "crypto-bigint 0.5.5", - "form_urlencoded", - "hex", - "hmac 0.12.1", - "http 0.2.12", - "http 1.5.0", - "p256 0.11.1", - "percent-encoding", - "ring", - "sha2 0.10.9", - "subtle", - "time", - "tracing", - "zeroize", -] - -[[package]] -name = "aws-smithy-async" -version = "1.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffcaf626bdda484571968400c326a244598634dc75fd451325a54ad1a59acfc" -dependencies = [ - "futures-util", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "aws-smithy-checksums" -version = "0.64.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9e8e65f4f81fcccdeb6c3eca2af17ac21d421a1786a26a394aecf421d616d3a" -dependencies = [ - "aws-smithy-http", - "aws-smithy-types", - "bytes", - "crc-fast", - "hex", - "http 1.5.0", - "http-body 1.1.0", - "http-body-util", - "md-5 0.11.0", - "pin-project-lite", - "sha1 0.11.0", - "sha2 0.11.0", - "tracing", -] - -[[package]] -name = "aws-smithy-eventstream" -version = "0.60.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faf09d74e5e32f76b8762da505a3cd59303e367a664ca67295387baa8c1d7548" -dependencies = [ - "aws-smithy-types", - "bytes", - "crc32fast", -] - -[[package]] -name = "aws-smithy-http" -version = "0.63.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba1ab2dc1c2c3749ead27180d333c42f11be8b0e934058fb4b2258ee8dbe5231" -dependencies = [ - "aws-smithy-eventstream", - "aws-smithy-runtime-api", - "aws-smithy-types", - "bytes", - "bytes-utils", - "futures-core", - "futures-util", - "http 1.5.0", - "http-body 1.1.0", - "http-body-util", - "percent-encoding", - "pin-project-lite", - "pin-utils", - "tracing", -] - -[[package]] -name = "aws-smithy-http-client" -version = "1.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a2f165a7feee6f263028b899d0a181987f4fa7179a6411a32a439fba7c5f769" -dependencies = [ - "aws-smithy-async", - "aws-smithy-runtime-api", - "aws-smithy-types", - "h2", - "http 1.5.0", - "hyper", - "hyper-rustls", - "hyper-util", - "pin-project-lite", - "rustls", - "rustls-native-certs", - "rustls-pki-types", - "tokio", - "tokio-rustls", - "tower", - "tracing", -] - -[[package]] -name = "aws-smithy-json" -version = "0.62.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9648b0bb82a2eedd844052c6ad2a1a822d1f8e3adee5fbf668366717e428856a" -dependencies = [ - "aws-smithy-types", -] - -[[package]] -name = "aws-smithy-observability" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06c2315d173edbf1920da8ba3a7189695827002e4c0fc961973ab1c54abca9c" -dependencies = [ - "aws-smithy-runtime-api", -] - -[[package]] -name = "aws-smithy-query" -version = "0.60.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a56d79744fb3edb5d722ef79d86081e121d3b9422cb209eb03aea6aa4f21ebd" -dependencies = [ - "aws-smithy-types", - "urlencoding", -] - -[[package]] -name = "aws-smithy-runtime" -version = "1.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "028999056d2d2fd58a697232f9eec4a643cf73a71cf327690a7edad1d2af2110" -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.5.0", - "http-body 0.4.6", - "http-body 1.1.0", - "http-body-util", - "pin-project-lite", - "pin-utils", - "tokio", - "tracing", -] - -[[package]] -name = "aws-smithy-runtime-api" -version = "1.11.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876ab3c9c29791ba4ba02b780a3049e21ec63dabda09268b175272c3733a79e6" -dependencies = [ - "aws-smithy-async", - "aws-smithy-types", - "bytes", - "http 0.2.12", - "http 1.5.0", - "pin-project-lite", - "tokio", - "tracing", - "zeroize", -] - -[[package]] -name = "aws-smithy-types" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69bb407740a197147da48238ecc94498493c9e85445732360cec180296ca45f1" -dependencies = [ - "base64-simd", - "bytes", - "bytes-utils", - "futures-core", - "http 0.2.12", - "http 1.5.0", - "http-body 0.4.6", - "http-body 1.1.0", - "http-body-util", - "itoa", - "num-integer", - "pin-project-lite", - "pin-utils", - "ryu", - "serde", - "time", - "tokio", - "tokio-util", -] - -[[package]] -name = "aws-smithy-xml" -version = "0.60.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce02add1aa3677d022f8adf81dcbe3046a95f17a1b1e8979c145cd21d3d22b3" -dependencies = [ - "xmlparser", -] - -[[package]] -name = "aws-types" -version = "1.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47c8323699dd9b3c8d5b3c13051ae9cdef58fd179957c882f8374dd8725962d9" -dependencies = [ - "aws-credential-types", - "aws-smithy-async", - "aws-smithy-runtime-api", - "aws-smithy-types", - "rustc_version", - "tracing", -] - [[package]] name = "axum" version = "0.8.8" @@ -869,8 +456,8 @@ dependencies = [ "bytes", "form_urlencoded", "futures-util", - "http 1.5.0", - "http-body 1.1.0", + "http", + "http-body", "http-body-util", "hyper", "hyper-util", @@ -902,8 +489,8 @@ checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" dependencies = [ "bytes", "futures-core", - "http 1.5.0", - "http-body 1.1.0", + "http", + "http-body", "http-body-util", "mime", "pin-project-lite", @@ -956,12 +543,6 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" -[[package]] -name = "base16ct" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" - [[package]] name = "base16ct" version = "0.2.0" @@ -1167,7 +748,7 @@ dependencies = [ "futures-util", "hex", "home", - "http 1.5.0", + "http", "http-body-util", "hyper", "hyper-named-pipe", @@ -1349,16 +930,6 @@ dependencies = [ "serde", ] -[[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 = "bytestring" version = "1.5.1" @@ -1399,6 +970,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a0dd1ca384932ff3641c8718a02769f1698e7563dc6974ffd03346116310423" dependencies = [ "find-msvc-tools", + "jobserver", + "libc", "shlex", ] @@ -1411,6 +984,12 @@ dependencies = [ "slab", ] +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + [[package]] name = "cfb" version = "0.7.3" @@ -1888,18 +1467,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" -[[package]] -name = "crypto-bigint" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" -dependencies = [ - "generic-array", - "rand_core 0.6.4", - "subtle", - "zeroize", -] - [[package]] name = "crypto-bigint" version = "0.5.5" @@ -2116,16 +1683,6 @@ dependencies = [ "thiserror 2.0.18", ] -[[package]] -name = "der" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" -dependencies = [ - "const-oid 0.9.6", - "zeroize", -] - [[package]] name = "der" version = "0.7.10" @@ -2307,30 +1864,18 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" -[[package]] -name = "ecdsa" -version = "0.14.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" -dependencies = [ - "der 0.6.1", - "elliptic-curve 0.12.3", - "rfc6979 0.3.1", - "signature 1.6.4", -] - [[package]] name = "ecdsa" version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ - "der 0.7.10", + "der", "digest 0.10.7", - "elliptic-curve 0.13.8", - "rfc6979 0.4.0", - "signature 2.2.0", - "spki 0.7.3", + "elliptic-curve", + "rfc6979", + "signature", + "spki", ] [[package]] @@ -2339,8 +1884,8 @@ version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ - "pkcs8 0.10.2", - "signature 2.2.0", + "pkcs8", + "signature", ] [[package]] @@ -2367,43 +1912,23 @@ dependencies = [ "serde", ] -[[package]] -name = "elliptic-curve" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" -dependencies = [ - "base16ct 0.1.1", - "crypto-bigint 0.4.9", - "der 0.6.1", - "digest 0.10.7", - "ff 0.12.1", - "generic-array", - "group 0.12.1", - "pkcs8 0.9.0", - "rand_core 0.6.4", - "sec1 0.3.0", - "subtle", - "zeroize", -] - [[package]] name = "elliptic-curve" version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ - "base16ct 0.2.0", - "crypto-bigint 0.5.5", + "base16ct", + "crypto-bigint", "digest 0.10.7", - "ff 0.13.1", + "ff", "generic-array", - "group 0.13.0", + "group", "hkdf", "pem-rfc7468", - "pkcs8 0.10.2", + "pkcs8", "rand_core 0.6.4", - "sec1 0.7.3", + "sec1", "subtle", "zeroize", ] @@ -2553,16 +2078,6 @@ dependencies = [ "web-time", ] -[[package]] -name = "ff" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" -dependencies = [ - "rand_core 0.6.4", - "subtle", -] - [[package]] name = "ff" version = "0.13.1" @@ -2965,14 +2480,13 @@ dependencies = [ ] [[package]] -name = "group" -version = "0.12.1" +name = "graviola" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +checksum = "4387e0458389da24c6fe732531e65595c7c4a32b027f98f4789e512e28224465" dependencies = [ - "ff 0.12.1", - "rand_core 0.6.4", - "subtle", + "cfg-if", + "getrandom 0.3.4", ] [[package]] @@ -2981,7 +2495,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ - "ff 0.13.1", + "ff", "rand_core 0.6.4", "subtle", ] @@ -2997,7 +2511,7 @@ dependencies = [ "fnv", "futures-core", "futures-sink", - "http 1.5.0", + "http", "indexmap 2.14.2", "slab", "tokio", @@ -3014,7 +2528,7 @@ dependencies = [ "bytes", "fastrand", "futures-util", - "http 1.5.0", + "http", "pin-project-lite", "tokio", ] @@ -3296,17 +2810,6 @@ dependencies = [ "rand_core 0.9.5", ] -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - [[package]] name = "http" version = "1.5.0" @@ -3317,17 +2820,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - [[package]] name = "http-body" version = "1.1.0" @@ -3335,7 +2827,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" dependencies = [ "bytes", - "http 1.5.0", + "http", ] [[package]] @@ -3346,8 +2838,8 @@ checksum = "23169fe34a5fbcdd3f3862e78fb9b6fccd5f02a6dc6f732547005d45631ce71c" dependencies = [ "bytes", "futures-core", - "http 1.5.0", - "http-body 1.1.0", + "http", + "http-body", "pin-project-lite", ] @@ -3389,8 +2881,8 @@ dependencies = [ "futures-channel", "futures-core", "h2", - "http 1.5.0", - "http-body 1.1.0", + "http", + "http-body", "httparse", "httpdate", "itoa", @@ -3417,20 +2909,18 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.7" +version = "0.27.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" +checksum = "dfa8e654703247911e29c23fbeaa261834bd9bb74efba2f9acddc37bfb127f53" dependencies = [ - "http 1.5.0", + "http", "hyper", "hyper-util", "rustls", - "rustls-native-certs", - "rustls-pki-types", "tokio", "tokio-rustls", "tower-service", - "webpki-roots 1.0.6", + "webpki-roots 1.0.9", ] [[package]] @@ -3456,8 +2946,8 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.5.0", - "http-body 1.1.0", + "http", + "http-body", "hyper", "ipnet", "libc", @@ -3811,7 +3301,7 @@ dependencies = [ "ed25519-dalek", "getrandom 0.2.17", "getrandom 0.3.4", - "http 1.5.0", + "http", "ipld-core", "k256", "langtag", @@ -3819,7 +3309,7 @@ dependencies = [ "multibase", "multihash", "ouroboros", - "p256 0.13.2", + "p256", "postcard", "rand 0.9.2", "regex", @@ -3830,7 +3320,7 @@ dependencies = [ "serde_html_form", "serde_ipld_dagcbor", "serde_json", - "signature 2.2.0", + "signature", "smol_str", "thiserror 2.0.18", "tokio", @@ -3895,7 +3385,7 @@ dependencies = [ "miette", "multihash", "n0-future", - "p256 0.13.2", + "p256", "serde", "serde_bytes", "serde_ipld_dagcbor", @@ -3960,6 +3450,60 @@ dependencies = [ "jiff-tzdb", ] +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys 0.3.1", + "log", + "thiserror 1.0.69", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +dependencies = [ + "jni-sys 0.4.1", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.117", +] + +[[package]] +name = "jobserver" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" +dependencies = [ + "getrandom 0.4.2", + "libc", +] + [[package]] name = "js-sys" version = "0.3.91" @@ -3981,7 +3525,7 @@ dependencies = [ "getrandom 0.2.17", "hmac 0.12.1", "js-sys", - "p256 0.13.2", + "p256", "p384", "pem", "rand 0.8.5", @@ -3989,7 +3533,7 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.9", - "signature 2.2.0", + "signature", "simple_asn1", ] @@ -4000,11 +3544,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" dependencies = [ "cfg-if", - "ecdsa 0.16.9", - "elliptic-curve 0.13.8", + "ecdsa", + "elliptic-curve", "once_cell", "sha2 0.10.9", - "signature 2.2.0", + "signature", ] [[package]] @@ -4061,7 +3605,7 @@ dependencies = [ "tokio-rustls", "tracing", "url", - "webpki-roots 1.0.6", + "webpki-roots 1.0.9", ] [[package]] @@ -4397,15 +3941,6 @@ dependencies = [ "tracing-subscriber", ] -[[package]] -name = "lru" -version = "0.16.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f66e8d5d03f609abc3a39e6f08e4164ebf1447a732906d39eb9b99b7919ef39" -dependencies = [ - "hashbrown 0.16.1", -] - [[package]] name = "lru-cache" version = "0.1.2" @@ -4498,6 +4033,12 @@ dependencies = [ "digest 0.11.3", ] +[[package]] +name = "md5" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebb8d8732c6a6df3d8f032a82911cfc747e00efb95cc46e8d0acd5b5b88570c" + [[package]] name = "memchr" version = "2.8.3" @@ -4986,25 +4527,14 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a80800c0488c3a21695ea981a54918fbb37abf04f4d0720c453632255e2ff0e" -[[package]] -name = "p256" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" -dependencies = [ - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.9", -] - [[package]] name = "p256" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" dependencies = [ - "ecdsa 0.16.9", - "elliptic-curve 0.13.8", + "ecdsa", + "elliptic-curve", "primeorder", "sha2 0.10.9", ] @@ -5015,8 +4545,8 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe42f1670a52a47d448f14b6a5c61dd78fce51856e68edaa38f7ae3a46b8d6b6" dependencies = [ - "ecdsa 0.16.9", - "elliptic-curve 0.13.8", + "ecdsa", + "elliptic-curve", "primeorder", "sha2 0.10.9", ] @@ -5238,31 +4768,15 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - [[package]] name = "pkcs1" version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" dependencies = [ - "der 0.7.10", - "pkcs8 0.10.2", - "spki 0.7.3", -] - -[[package]] -name = "pkcs8" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" -dependencies = [ - "der 0.6.1", - "spki 0.6.0", + "der", + "pkcs8", + "spki", ] [[package]] @@ -5271,8 +4785,8 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der 0.7.10", - "spki 0.7.3", + "der", + "spki", ] [[package]] @@ -5411,7 +4925,7 @@ version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" dependencies = [ - "elliptic-curve 0.13.8", + "elliptic-curve", ] [[package]] @@ -5723,6 +5237,16 @@ dependencies = [ "memchr", ] +[[package]] +name = "quick-xml" +version = "0.40.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2474bd2e5029e7ccb6abb2ba48cf2383a333851dedf495901544281590c7da7f" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "quick-xml" version = "0.42.0" @@ -5849,9 +5373,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.10.0" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc266eb313df6c5c09c1c7b1fbe2510961e5bcd3add930c1e31f7ed9da0feff8" +checksum = "65c9fb96cbc91e3478eaae79a69fcd3f1ae4ad052e471fe6732fff548984b4af" dependencies = [ "chacha20", "getrandom 0.4.2", @@ -6100,8 +5624,8 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http 1.5.0", - "http-body 1.1.0", + "http", + "http-body", "http-body-util", "hyper", "hyper-rustls", @@ -6130,7 +5654,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "webpki-roots 1.0.6", + "webpki-roots 1.0.9", ] [[package]] @@ -6152,23 +5676,49 @@ dependencies = [ "web-sys", ] +[[package]] +name = "reqx" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b65998c8e91cf2fe922572745b100ba812d6ec2fc004c9080fcfe5703e34521" +dependencies = [ + "brotli", + "bytes", + "flate2", + "futures-core", + "futures-util", + "http", + "http-body-util", + "httpdate", + "hyper", + "hyper-rustls", + "hyper-util", + "md5", + "rand 0.10.3", + "rustls", + "rustls-native-certs", + "serde", + "serde_json", + "serde_urlencoded", + "sha2 0.11.0", + "thiserror 2.0.18", + "tokio", + "tokio-util", + "tower-service", + "tracing", + "ureq", + "url", + "webpki-root-certs", + "webpki-roots 1.0.9", + "zstd", +] + [[package]] name = "resolv-conf" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e061d1b48cb8d38042de4ae0a7a6401009d6143dc80d2e2d6f31f0bdd6470c7" -[[package]] -name = "rfc6979" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" -dependencies = [ - "crypto-bigint 0.4.9", - "hmac 0.12.1", - "zeroize", -] - [[package]] name = "rfc6979" version = "0.4.0" @@ -6205,10 +5755,10 @@ dependencies = [ "num-integer", "num-traits", "pkcs1", - "pkcs8 0.10.2", + "pkcs8", "rand_core 0.6.4", - "signature 2.2.0", - "spki 0.7.3", + "signature", + "spki", "subtle", "zeroize", ] @@ -6315,6 +5865,33 @@ dependencies = [ "zeroize", ] +[[package]] +name = "rustls-platform-verifier" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d99feebc72bae7ab76ba994bb5e121b8d83d910ca40b36e0921f53becc41784" +dependencies = [ + "core-foundation 0.10.1", + "core-foundation-sys", + "jni", + "log", + "once_cell", + "rustls", + "rustls-native-certs", + "rustls-platform-verifier-android", + "rustls-webpki", + "security-framework", + "security-framework-sys", + "webpki-root-certs", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls-platform-verifier-android" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" + [[package]] name = "rustls-webpki" version = "0.103.10" @@ -6350,6 +5927,31 @@ version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" +[[package]] +name = "s3" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40ce58958ac8d7b05b9f146337b88231db2ca95ab7637cf44f318c2e9e4855ff" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "futures-io", + "futures-util", + "graviola", + "hex", + "http", + "http-body-util", + "httpdate", + "md-5 0.11.0", + "quick-xml 0.40.1", + "reqx", + "serde", + "time", + "tokio", + "url", +] + [[package]] name = "s3s" version = "0.17.0" @@ -6369,8 +5971,8 @@ dependencies = [ "futures", "hex-simd", "hmac 0.13.0", - "http 1.5.0", - "http-body 1.1.0", + "http", + "http-body", "http-body-util", "hyper", "itoa", @@ -6518,6 +6120,15 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + [[package]] name = "schannel" version = "0.1.29" @@ -6563,30 +6174,16 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "sec1" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" -dependencies = [ - "base16ct 0.1.1", - "der 0.6.1", - "generic-array", - "pkcs8 0.9.0", - "subtle", - "zeroize", -] - [[package]] name = "sec1" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ - "base16ct 0.2.0", - "der 0.7.10", + "base16ct", + "der", "generic-array", - "pkcs8 0.10.2", + "pkcs8", "subtle", "zeroize", ] @@ -6943,16 +6540,6 @@ dependencies = [ "libc", ] -[[package]] -name = "signature" -version = "1.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" -dependencies = [ - "digest 0.10.7", - "rand_core 0.6.4", -] - [[package]] name = "signature" version = "2.2.0" @@ -7074,16 +6661,6 @@ dependencies = [ "lock_api", ] -[[package]] -name = "spki" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" -dependencies = [ - "base64ct", - "der 0.6.1", -] - [[package]] name = "spki" version = "0.7.3" @@ -7091,7 +6668,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", - "der 0.7.10", + "der", ] [[package]] @@ -7867,8 +7444,8 @@ dependencies = [ "base64 0.22.1", "bytes", "h2", - "http 1.5.0", - "http-body 1.1.0", + "http", + "http-body", "http-body-util", "hyper", "hyper-timeout", @@ -7942,8 +7519,8 @@ dependencies = [ "bytes", "futures-core", "futures-util", - "http 1.5.0", - "http-body 1.1.0", + "http", + "http-body", "http-body-util", "http-range-header", "httpdate", @@ -8082,7 +7659,7 @@ dependencies = [ "ed25519-dalek", "futures", "hex", - "http 1.5.0", + "http", "image", "infer", "ipld-core", @@ -8196,7 +7773,7 @@ dependencies = [ "base64 0.22.1", "hkdf", "hmac 0.12.1", - "p256 0.13.2", + "p256", "rand 0.8.5", "serde", "sha2 0.10.9", @@ -8279,7 +7856,7 @@ dependencies = [ "base64 0.22.1", "chrono", "ed25519-dalek", - "p256 0.13.2", + "p256", "p384", "rand 0.8.5", "reqwest", @@ -8305,7 +7882,7 @@ dependencies = [ "chrono", "cid", "hmac 0.12.1", - "http 1.5.0", + "http", "jacquard-common", "jacquard-repo", "k256", @@ -8337,9 +7914,6 @@ dependencies = [ "aes-gcm", "anyhow", "async-trait", - "aws-config", - "aws-sdk-s3", - "aws-smithy-http-client", "axum", "backon", "base32", @@ -8358,7 +7932,7 @@ dependencies = [ "hickory-resolver", "hkdf", "hmac 0.12.1", - "http 1.5.0", + "http", "image", "ipld-core", "iroh-car", @@ -8370,12 +7944,13 @@ dependencies = [ "metrics-exporter-prometheus", "multibase", "multihash", - "p256 0.13.2", + "p256", "parking_lot", "rand 0.8.5", "redis", "regex", "reqwest", + "s3", "serde", "serde_bytes", "serde_ipld_dagcbor", @@ -8494,7 +8069,7 @@ dependencies = [ "h3", "h3-quinn", "hex", - "http 1.5.0", + "http", "hyper", "hyper-util", "quinn", @@ -8544,12 +8119,10 @@ name = "tranquil-storage" version = "0.6.7" dependencies = [ "async-trait", - "aws-config", - "aws-sdk-s3", - "aws-smithy-http-client", "bytes", "futures", "hyper-util", + "s3", "s3s", "s3s-fs", "sha2 0.10.9", @@ -8675,7 +8248,7 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http 1.5.0", + "http", "httparse", "log", "rand 0.8.5", @@ -8692,7 +8265,7 @@ checksum = "8628dcc84e5a09eb3d8423d6cb682965dea9133204e8fb3efee74c2a0c259442" dependencies = [ "bytes", "data-encoding", - "http 1.5.0", + "http", "httparse", "log", "rand 0.9.2", @@ -8817,8 +8390,10 @@ dependencies = [ "percent-encoding", "rustls", "rustls-pki-types", + "rustls-platform-verifier", "ureq-proto", "utf8-zero", + "webpki-roots 1.0.9", ] [[package]] @@ -8828,7 +8403,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e994ba84b0bd1b1b0cf92878b7ef898a5c1760108fe7b6010327e274917a808c" dependencies = [ "base64 0.22.1", - "http 1.5.0", + "http", "httparse", "log", ] @@ -8904,7 +8479,7 @@ checksum = "2ef6dac1e96601b4fb3acccccff2139741fcb757cb9a36089bf5be91cfb285ce" dependencies = [ "getrandom 0.4.2", "js-sys", - "rand 0.10.0", + "rand 0.10.3", "serde_core", "sha1_smol", "wasm-bindgen", @@ -8955,6 +8530,16 @@ dependencies = [ "libc", ] +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "want" version = "0.3.1" @@ -9188,20 +8773,29 @@ dependencies = [ "url", ] +[[package]] +name = "webpki-root-certs" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b96554aa2acc8ccdb7e1c9a58a7a68dd5d13bccc69cd124cb09406db612a1c9b" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "webpki-roots" version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" dependencies = [ - "webpki-roots 1.0.6", + "webpki-roots 1.0.9", ] [[package]] name = "webpki-roots" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cfaf3c063993ff62e73cb4311efde4db1efb31ab78a3e5c457939ad5cc0bed" +checksum = "7dcd9d09a39985f5344844e66b0c530a33843579125f23e21e9f0f220850f22a" dependencies = [ "rustls-pki-types", ] @@ -9256,6 +8850,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -9332,6 +8935,15 @@ dependencies = [ "windows-link", ] +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -9377,6 +8989,21 @@ dependencies = [ "windows-link", ] +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + [[package]] name = "windows-targets" version = "0.48.5" @@ -9425,6 +9052,12 @@ dependencies = [ "windows_x86_64_msvc 0.53.1", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -9443,6 +9076,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -9461,6 +9100,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -9491,6 +9136,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -9509,6 +9160,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -9527,6 +9184,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -9545,6 +9208,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -9601,7 +9270,7 @@ dependencies = [ "base64 0.22.1", "deadpool", "futures", - "http 1.5.0", + "http", "http-body-util", "hyper", "hyper-util", @@ -9765,12 +9434,6 @@ dependencies = [ "rustix 1.1.4", ] -[[package]] -name = "xmlparser" -version = "0.13.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4" - [[package]] name = "xxhash-rust" version = "0.8.18" @@ -9964,6 +9627,34 @@ version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" +[[package]] +name = "zstd" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "7.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d80649ab6db9d9f6f9c80a40becd948eda4714a0a5ac8c4d157a32231c7882" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.1.0+zstd.1.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ef0a8027ec3ee71300ab3bcbcd0393f434aa72b91ca6d635a39941deae8eea0" +dependencies = [ + "cc", + "pkg-config", +] + [[package]] name = "zune-core" version = "0.5.1" diff --git a/Cargo.toml b/Cargo.toml index 8a68e68..a39a309 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -63,9 +63,6 @@ backon = "1" bincode = { version = "2", features = ["serde"] } anyhow = "1.0" async-trait = "0.1" -aws-config = { version = "1.8", default-features = false, features = ["rt-tokio", "credentials-process", "sso"] } -aws-sdk-s3 = { version = "1.118", default-features = false, features = ["sigv4a", "rt-tokio"] } -aws-smithy-http-client = { version = "1.1", features = ["rustls-ring"] } axum = { version = "0.8", features = ["ws", "macros"] } base32 = "0.5" base64 = "0.22" @@ -116,6 +113,7 @@ regex = "1" rsa = "0.9" rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12", "logging"] } rustls-pemfile = "2" +s3 = { version = "0.1.36", features = ["multipart"] } s3s = "0.17" s3s-fs = "0.17" secrecy = { version = "0.10", features = ["serde"] } diff --git a/crates/tranquil-config/src/lib.rs b/crates/tranquil-config/src/lib.rs index c72ce3d..cc19c4a 100644 --- a/crates/tranquil-config/src/lib.rs +++ b/crates/tranquil-config/src/lib.rs @@ -755,6 +755,7 @@ impl fmt::Display for RepoBackend { #[config(layer_attr(serde(deny_unknown_fields)))] pub struct StorageConfig { /// Storage backend: `filesystem` or `s3`. + /// If you set `s3` you must also provide `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`. #[config(env = "BLOB_STORAGE_BACKEND", default = "filesystem")] pub backend: String, diff --git a/crates/tranquil-pds/Cargo.toml b/crates/tranquil-pds/Cargo.toml index 5d5fc78..7fa2301 100644 --- a/crates/tranquil-pds/Cargo.toml +++ b/crates/tranquil-pds/Cargo.toml @@ -100,7 +100,5 @@ tracing-subscriber = { workspace = true, features = ["env-filter"] } wiremock = { workspace = true } hex = { workspace = true } tokio-tungstenite = { workspace = true } -aws-config = { workspace = true } -aws-sdk-s3 = { workspace = true } -aws-smithy-http-client = { workspace = true } +s3 = { workspace = true } redis = { workspace = true } diff --git a/crates/tranquil-pds/tests/common/mod.rs b/crates/tranquil-pds/tests/common/mod.rs index 74d8dca..ebd6eb4 100644 --- a/crates/tranquil-pds/tests/common/mod.rs +++ b/crates/tranquil-pds/tests/common/mod.rs @@ -1,9 +1,3 @@ -#[cfg(all(not(feature = "external-infra"), feature = "s3"))] -use aws_config::BehaviorVersion; -#[cfg(all(not(feature = "external-infra"), feature = "s3"))] -use aws_sdk_s3::Client as S3Client; -#[cfg(all(not(feature = "external-infra"), feature = "s3"))] -use aws_sdk_s3::config::Credentials; use chrono::Utc; use reqwest::{Client, StatusCode, header}; use serde_json::{Value, json}; @@ -59,7 +53,7 @@ pub struct ServerInstance { #[cfg(all(not(feature = "external-infra"), feature = "s3"))] use testcontainers::GenericImage; #[cfg(all(not(feature = "external-infra"), feature = "s3"))] -use testcontainers::core::ContainerPort; +use testcontainers::core::{ContainerPort, WaitFor}; #[cfg(not(feature = "external-infra"))] use testcontainers::{ContainerAsync, ImageExt, runners::AsyncRunner}; #[cfg(not(feature = "external-infra"))] @@ -243,6 +237,7 @@ async fn setup_with_testcontainers() -> String { #[cfg(all(not(feature = "external-infra"), feature = "s3"))] async fn setup_with_testcontainers() -> String { let s3_container = GenericImage::new("cgr.dev/chainguard/minio", "latest") + .with_wait_for(WaitFor::message_on_stderr("API: http")) .with_exposed_port(ContainerPort::Tcp(9000)) .with_env_var("MINIO_ROOT_USER", "minioadmin") .with_env_var("MINIO_ROOT_PASSWORD", "minioadmin") @@ -268,35 +263,25 @@ async fn setup_with_testcontainers() -> String { std::env::set_var("SKIP_IMPORT_VERIFICATION", "true"); std::env::set_var("PLC_DIRECTORY_URL", &plc_url); } - let sdk_config = aws_config::defaults(BehaviorVersion::latest()) + let s3_client = s3::Client::builder(&s3_endpoint) + .unwrap() .region("us-east-1") - .http_client( - aws_smithy_http_client::Builder::new() - .tls_provider(aws_smithy_http_client::tls::Provider::Rustls( - aws_smithy_http_client::tls::rustls_provider::CryptoMode::Ring, - )) - .build_https(), - ) - .endpoint_url(&s3_endpoint) - .credentials_provider(Credentials::new( - "minioadmin", - "minioadmin", - None, - None, - "test", - )) - .load() - .await; - let s3_config = aws_sdk_s3::config::Builder::from(&sdk_config) - .force_path_style(true) - .build(); - let s3_client = S3Client::from_conf(s3_config); - let _ = s3_client.create_bucket().bucket("test-bucket").send().await; - let _ = s3_client - .create_bucket() - .bucket("test-backups") + .addressing_style(s3::AddressingStyle::Path) + .auth(s3::Auth::from_env().unwrap()) + .build() + .unwrap(); + s3_client + .buckets() + .create("test-bucket") .send() - .await; + .await + .unwrap(); + s3_client + .buckets() + .create("test-backups") + .send() + .await + .unwrap(); register_mock_appview().await; S3_CONTAINER.set(s3_container).ok(); let container = Postgres::default() diff --git a/crates/tranquil-storage/Cargo.toml b/crates/tranquil-storage/Cargo.toml index 8b38858..a057ce3 100644 --- a/crates/tranquil-storage/Cargo.toml +++ b/crates/tranquil-storage/Cargo.toml @@ -5,18 +5,16 @@ edition.workspace = true license.workspace = true [features] -s3 = ["dep:aws-config", "dep:aws-sdk-s3", "dep:aws-smithy-http-client"] +s3 = ["dep:s3"] [dependencies] tranquil-config = { workspace = true } tranquil-infra = { workspace = true } async-trait = { workspace = true } -aws-config = { workspace = true, optional = true } -aws-sdk-s3 = { workspace = true, optional = true } -aws-smithy-http-client = { workspace = true, optional = true } bytes = { workspace = true } futures = { workspace = true } +s3 = { workspace = true, optional = true } sha2 = { workspace = true } tokio = { workspace = true } tracing = { workspace = true } diff --git a/crates/tranquil-storage/src/lib.rs b/crates/tranquil-storage/src/lib.rs index 1940381..671fc7f 100644 --- a/crates/tranquil-storage/src/lib.rs +++ b/crates/tranquil-storage/src/lib.rs @@ -102,12 +102,8 @@ fn map_io_not_found(key: &str) -> impl FnOnce(std::io::Error) -> StorageError + #[cfg(feature = "s3")] mod s3 { use super::*; - use aws_config::BehaviorVersion; - use aws_sdk_s3::Client; - use aws_sdk_s3::config::Region; - use aws_sdk_s3::primitives::ByteStream; - use aws_sdk_s3::types::CompletedMultipartUpload; - use aws_sdk_s3::types::CompletedPart; + use ::s3::types::CompletedPart; + use ::s3::{AddressingStyle, Auth, Client}; const MIN_PART_SIZE: usize = 5 * 1024 * 1024; @@ -120,7 +116,7 @@ mod s3 { impl S3BlobStorage { pub async fn new(bucket: &str, endpoint: Option<&str>, path: &str) -> Self { Self { - client: create_s3_client(endpoint).await, + client: create_s3_client(endpoint), bucket: bucket.to_string(), path: path .trim_start_matches("/") @@ -138,28 +134,26 @@ mod s3 { } } - async fn create_s3_client(endpoint: Option<&str>) -> Client { - let http_client = aws_smithy_http_client::Builder::new() - .tls_provider(aws_smithy_http_client::tls::Provider::Rustls( - aws_smithy_http_client::tls::rustls_provider::CryptoMode::Ring, - )) - .build_https(); - - let config = aws_config::defaults(BehaviorVersion::latest()) - .http_client(http_client) - .load() - .await; - - let region = config - .region() - .cloned() - .unwrap_or_else(|| Region::from_static("us-east-1")); - let builder = aws_sdk_s3::config::Builder::from(&config).region(region); - let builder = match endpoint { - Some(endpoint) => builder.endpoint_url(endpoint).force_path_style(true), - None => builder, + fn create_s3_client(endpoint: Option<&str>) -> Client { + let region = std::env::var("AWS_REGION").unwrap_or_else(|_| "us-east-1".to_string()); + let (url, style) = match endpoint { + Some(endpoint) => (endpoint.to_string(), AddressingStyle::Path), + None => ( + format!("https://s3.{region}.amazonaws.com"), + AddressingStyle::Auto, + ), }; - Client::from_conf(builder.build()) + let auth = + Auth::from_env().expect("AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY must be set"); + Client::builder(url) + .expect("storage.s3_endpoint (S3_ENDPOINT) must be a valid URL") + .region(region) + .addressing_style(style) + .auth(auth) + .base_retry_delay(std::time::Duration::from_secs(1)) + .max_retry_delay(std::time::Duration::from_secs(20)) + .build() + .expect("failed to build S3 client") } #[async_trait] @@ -171,10 +165,9 @@ mod s3 { async fn put_bytes(&self, key: &str, data: Bytes) -> Result<(), StorageError> { let path = self.resolve_path(key); self.client - .put_object() - .bucket(&self.bucket) - .key(&path) - .body(ByteStream::from(data)) + .objects() + .put(&self.bucket, path) + .body_bytes(data) .send() .await .map_err(|e| StorageError::Backend(e.to_string()))?; @@ -190,46 +183,39 @@ mod s3 { let path = self.resolve_path(key); let resp = self .client - .get_object() - .bucket(&self.bucket) - .key(&path) + .objects() + .get(&self.bucket, &path) .send() .await .map_err(|e| StorageError::Backend(e.to_string()))?; - resp.body - .collect() + resp.bytes() .await - .map(|agg| agg.into_bytes()) .map_err(|e| StorageError::Backend(e.to_string())) } async fn get_head(&self, key: &str, size: usize) -> Result { let path = self.resolve_path(key); - let range = format!("bytes=0-{}", size.saturating_sub(1)); let resp = self .client - .get_object() - .bucket(&self.bucket) - .key(&path) - .range(range) + .objects() + .get(&self.bucket, &path) + .range_bytes(0, size.saturating_sub(1) as u64) + .map_err(|e| StorageError::Backend(e.to_string()))? .send() .await .map_err(|e| StorageError::Backend(e.to_string()))?; - resp.body - .collect() + resp.bytes() .await - .map(|agg| agg.into_bytes()) .map_err(|e| StorageError::Backend(e.to_string())) } async fn delete(&self, key: &str) -> Result<(), StorageError> { let path = self.resolve_path(key); self.client - .delete_object() - .bucket(&self.bucket) - .key(&path) + .objects() + .delete(&self.bucket, &path) .send() .await .map_err(|e| StorageError::Backend(e.to_string()))?; @@ -245,27 +231,22 @@ mod s3 { use futures::StreamExt; let path = self.resolve_path(key); - let create_resp = self + let upload_id = self .client - .create_multipart_upload() - .bucket(&self.bucket) - .key(&path) + .objects() + .create_multipart_upload(&self.bucket, &path) .send() .await .map_err(|e| { StorageError::Backend(format!("Failed to create multipart upload: {}", e)) - })?; - - let upload_id = create_resp - .upload_id() - .ok_or_else(|| StorageError::Backend("No upload ID returned".to_string()))? - .to_string(); + })? + .upload_id; let upload_part = |client: &Client, bucket: &str, key: &str, upload_id: &str, - part_num: i32, + part_num: u32, data: Vec| -> std::pin::Pin< Box> + Send>, @@ -276,36 +257,28 @@ mod s3 { let upload_id = upload_id.to_string(); Box::pin(async move { let resp = client - .upload_part() - .bucket(&bucket) - .key(&path) - .upload_id(&upload_id) - .part_number(part_num) - .body(ByteStream::from(data)) + .objects() + .upload_part(&bucket, &path, &upload_id, part_num) + .body_bytes(data) .send() .await .map_err(|e| { StorageError::Backend(format!("Failed to upload part: {}", e)) })?; - let etag = resp - .e_tag() - .ok_or_else(|| { - StorageError::Backend("No ETag returned for part".to_string()) - })? - .to_string(); + let etag = resp.etag.ok_or_else(|| { + StorageError::Backend("No ETag returned for part".to_string()) + })?; - Ok(CompletedPart::builder() - .part_number(part_num) - .e_tag(etag) - .build()) + CompletedPart::new(part_num, etag) + .map_err(|e| StorageError::Backend(e.to_string())) }) }; struct UploadState { hasher: Sha256, total_size: u64, - part_number: i32, + part_number: u32, completed_parts: Vec, buffer: Vec, } @@ -321,10 +294,8 @@ mod s3 { let abort_upload = || async { let _ = self .client - .abort_multipart_upload() - .bucket(&self.bucket) - .key(path) - .upload_id(&upload_id) + .objects() + .abort_multipart_upload(&self.bucket, path, &upload_id) .send() .await; }; @@ -378,17 +349,12 @@ mod s3 { return Err(StorageError::Other("Empty upload".to_string())); } - let completed_upload = CompletedMultipartUpload::builder() - .set_parts(Some(state.completed_parts)) - .build(); - let path = self.resolve_path(key); self.client - .complete_multipart_upload() - .bucket(&self.bucket) - .key(&path) - .upload_id(&upload_id) - .multipart_upload(completed_upload) + .objects() + .complete_multipart_upload(&self.bucket, &path, &upload_id) + .parts(state.completed_parts) + .map_err(|e| StorageError::Backend(e.to_string()))? .send() .await .map_err(|e| { @@ -411,14 +377,11 @@ mod s3 { async fn copy(&self, src_key: &str, dst_key: &str) -> Result<(), StorageError> { let src_path = self.resolve_path(src_key); - let copy_source = format!("{}/{}", self.bucket, &src_path); let dst_path = self.resolve_path(dst_key); self.client - .copy_object() - .bucket(&self.bucket) - .copy_source(copy_source) - .key(&dst_path) + .objects() + .copy(&self.bucket, &src_path, &self.bucket, &dst_path) .send() .await .map_err(|e| StorageError::Backend(format!("Failed to copy object: {}", e)))?; diff --git a/example.toml b/example.toml index 804617e..30f03c8 100644 --- a/example.toml +++ b/example.toml @@ -241,6 +241,7 @@ [storage] # Storage backend: `filesystem` or `s3`. +# If you set `s3` you must also provide `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`. # # Can also be specified via environment variable `BLOB_STORAGE_BACKEND`. #