diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14ac6f2..71fb035 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@1.67.1 + - uses: dtolnay/rust-toolchain@1.69.0 with: { components: rustfmt } - run: cargo fmt --all -- --check @@ -26,7 +26,7 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@1.67.1 + - uses: dtolnay/rust-toolchain@1.69.0 with: { components: clippy } - name: Cache Dependencies @@ -41,7 +41,7 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@1.67.1 + - uses: dtolnay/rust-toolchain@1.69.0 - name: Cache Dependencies uses: Swatinem/rust-cache@v2 diff --git a/Cargo.lock b/Cargo.lock index 1e038b7..79aa1c7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,19 +4,19 @@ version = 3 [[package]] name = "actix-codec" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a7559404a7f3573127aab53c08ce37a6c6a315c374a31070f3c91cd1b4a7fe" +checksum = "617a8268e3537fe1d8c9ead925fca49ef6400927ee7bc26750e90ecee14ce4b8" dependencies = [ - "bitflags", + "bitflags 1.3.2", "bytes", "futures-core", "futures-sink", - "log", "memchr", "pin-project-lite", "tokio", "tokio-util", + "tracing", ] [[package]] @@ -30,7 +30,7 @@ dependencies = [ "actix-utils", "actix-web", "askama_escape", - "bitflags", + "bitflags 1.3.2", "bytes", "derive_more", "futures-core", @@ -54,8 +54,8 @@ dependencies = [ "actix-tls", "actix-utils", "ahash 0.8.3", - "base64 0.21.0", - "bitflags", + "base64", + "bitflags 1.3.2", "brotli", "bytes", "bytestring", @@ -89,7 +89,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "465a6172cf69b960917811022d8f29bc0b7fa1398bc4f78b3c466673db1213b6" dependencies = [ "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -212,7 +212,7 @@ dependencies = [ "serde_urlencoded", "smallvec", "socket2", - "time", + "time 0.3.22", "url", ] @@ -225,14 +225,14 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "addr2line" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" dependencies = [ "gimli", ] @@ -275,6 +275,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "aho-corasick" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +dependencies = [ + "memchr", +] + [[package]] name = "alloc-no-stdlib" version = "2.0.4" @@ -290,6 +299,27 @@ dependencies = [ "alloc-no-stdlib", ] +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anstyle" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" + [[package]] name = "askama_escape" version = "0.10.3" @@ -298,10 +328,11 @@ checksum = "619743e34b5ba4e9703bba34deac3427c72507c7159f5fd030aea8cac0cfe341" [[package]] name = "assert_cmd" -version = "2.0.8" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9834fcc22e0874394a010230586367d4a3e9f11b560f469262678547e1d2575e" +checksum = "86d6b683edf8d1119fe420a94f8a7e389239666aa72e65495d91c00462510151" dependencies = [ + "anstyle", "bstr", "doc-comment", "predicates", @@ -312,10 +343,11 @@ dependencies = [ [[package]] name = "assert_fs" -version = "1.0.10" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d94b2a3f3786ff2996a98afbd6b4e5b7e890d685ccf67577f508ee2342c71cc9" +checksum = "f070617a68e5c2ed5d06ee8dd620ee18fb72b99f6c094bed34cf8ab07c875b48" dependencies = [ + "anstyle", "doc-comment", "globwalk", "predicates", @@ -343,7 +375,7 @@ dependencies = [ "actix-tls", "actix-utils", "ahash 0.7.6", - "base64 0.21.0", + "base64", "bytes", "cfg-if", "cookie", @@ -355,6 +387,7 @@ dependencies = [ "itoa", "log", "mime", + "openssl", "percent-encoding", "pin-project-lite", "rand", @@ -366,9 +399,9 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.67" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" dependencies = [ "addr2line", "cc", @@ -381,15 +414,9 @@ dependencies = [ [[package]] name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.0" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" [[package]] name = "bit-set" @@ -412,6 +439,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" + [[package]] name = "block-buffer" version = "0.10.4" @@ -444,9 +477,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.3.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffdb39cb703212f3c11973452c2861b972f757b021158f3516ba10f2fa8b2c1" +checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5" dependencies = [ "memchr", "once_cell", @@ -456,9 +489,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" [[package]] name = "byteorder" @@ -496,6 +529,21 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chrono" +version = "0.4.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "time 0.1.45", + "wasm-bindgen", + "winapi", +] + [[package]] name = "convert_case" version = "0.4.0" @@ -509,7 +557,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" dependencies = [ "percent-encoding", - "time", + "time 0.3.22", "version_check", ] @@ -525,15 +573,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c" dependencies = [ "libc", ] @@ -564,12 +612,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "907076dfda823b0b36d2a1bb5f90c96660a5bbcd7729e10727f07858f22c4edc" dependencies = [ "cfg-if", - "hashbrown", + "hashbrown 0.12.3", "lock_api", "once_cell", "parking_lot_core", ] +[[package]] +name = "data-encoding" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" + [[package]] name = "debugid" version = "0.8.0" @@ -590,7 +644,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn", + "syn 1.0.109", ] [[package]] @@ -601,9 +655,9 @@ checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" [[package]] name = "digest" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", "crypto-common", @@ -638,21 +692,32 @@ dependencies = [ "assert_cmd", "assert_fs", "awc", - "base64 0.21.0", + "base64", "bytes", + "chrono", + "data-encoding", "docopt", "env_logger", "futures", "futures-core", + "hex", + "http", "log", + "md-5", + "openssl", "proptest", "rand", + "ring", "sentry", "sentry-actix", "serde", "serde_json", "serial_test", + "sha2", + "sha256", "sodiumoxide", + "tokio", + "tokio-util", "toml", "url", "uuid", @@ -695,15 +760,21 @@ dependencies = [ "termcolor", ] +[[package]] +name = "equivalent" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1" + [[package]] name = "errno" -version = "0.2.8" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" dependencies = [ "errno-dragonfly", "libc", - "winapi", + "windows-sys", ] [[package]] @@ -739,9 +810,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.25" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" +checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" dependencies = [ "crc32fast", "miniz_oxide", @@ -770,18 +841,18 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] [[package]] name = "futures" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e2792b0ff0340399d58445b88fd9770e3489eff258a4cbc1523418f12abf84" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", @@ -794,9 +865,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -804,15 +875,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-executor" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ "futures-core", "futures-task", @@ -821,38 +892,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-macro" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.23", ] [[package]] name = "futures-sink" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-util" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-channel", "futures-core", @@ -868,9 +939,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -878,20 +949,20 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] name = "gimli" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" [[package]] name = "globset" @@ -899,7 +970,7 @@ version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" dependencies = [ - "aho-corasick", + "aho-corasick 0.7.20", "bstr", "fnv", "log", @@ -912,16 +983,16 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93e3af942408868f6934a7b85134a3230832b9977cf66125df2f9edcfce4ddcc" dependencies = [ - "bitflags", + "bitflags 1.3.2", "ignore", "walkdir", ] [[package]] name = "h2" -version = "0.3.16" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be7b54589b581f624f566bf5d8eb2bab1db736c51528720b6bd36b96b55924d" +checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" dependencies = [ "bytes", "fnv", @@ -929,7 +1000,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.3", "slab", "tokio", "tokio-util", @@ -941,15 +1012,15 @@ name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash 0.7.6", +] [[package]] -name = "hermit-abi" -version = "0.2.6" +name = "hashbrown" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" [[package]] name = "hermit-abi" @@ -1022,9 +1093,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.24" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e011372fa0b68db8350aa7a248930ecc7839bf46d8485577d69f117a75f164c" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -1057,11 +1128,34 @@ dependencies = [ "tokio-native-tls", ] +[[package]] +name = "iana-time-zone" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -1086,12 +1180,22 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", ] [[package]] @@ -1105,30 +1209,30 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "1.0.6" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfa919a82ea574332e2de6e74b4c36e74d41982b335080fa59d4ef31be20fdf3" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ + "hermit-abi", "libc", - "windows-sys 0.45.0", + "windows-sys", ] [[package]] name = "ipnet" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" +checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "is-terminal" -version = "0.4.4" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b6b32576413a8e69b90e952e4a026476040d81017b80445deda5f2d3921857" +checksum = "24fddda5af7e54bf7da53067d6e802dbcc381d0a8eef629df528e3ebf68755cb" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", - "rustix", - "windows-sys 0.45.0", + "hermit-abi", + "rustix 0.38.2", + "windows-sys", ] [[package]] @@ -1142,9 +1246,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" [[package]] name = "jobserver" @@ -1157,9 +1261,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.61" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ "wasm-bindgen", ] @@ -1178,15 +1282,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.139" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libm" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" +checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" [[package]] name = "libsodium-sys" @@ -1202,9 +1306,15 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.1.4" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" + +[[package]] +name = "linux-raw-sys" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" [[package]] name = "local-channel" @@ -1226,9 +1336,9 @@ checksum = "e34f76eb3611940e0e7d53a9aaa4e6a3151f69541a282fd0dad5571420c53ff1" [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ "autocfg", "scopeguard", @@ -1236,12 +1346,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" [[package]] name = "match_cfg" @@ -1249,6 +1356,15 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" +[[package]] +name = "md-5" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" +dependencies = [ + "digest", +] + [[package]] name = "memchr" version = "2.5.0" @@ -1257,9 +1373,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "mime" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" @@ -1273,23 +1389,23 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", "log", - "wasi", - "windows-sys 0.45.0", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys", ] [[package]] @@ -1322,36 +1438,36 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi", "libc", ] [[package]] name = "object" -version = "0.30.3" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "openssl" -version = "0.10.45" +version = "0.10.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b102428fd03bc5edf97f62620f7298614c45cedf287c271e7ed450bbaf83f2e1" +checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if", "foreign-types", "libc", @@ -1362,13 +1478,13 @@ dependencies = [ [[package]] name = "openssl-macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.23", ] [[package]] @@ -1379,11 +1495,10 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.80" +version = "0.9.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23bbbf7854cd45b83958ebe919f0e8e516793727652e27fda10a8384cfc790b7" +checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6" dependencies = [ - "autocfg", "cc", "libc", "pkg-config", @@ -1392,9 +1507,9 @@ dependencies = [ [[package]] name = "os_info" -version = "3.6.0" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c424bc68d15e0778838ac013b5b3449544d8133633d8016319e7e05a820b8c0" +checksum = "006e42d5b888366f1880eda20371fedde764ed2213dc8496f49622fa0c99cd5e" dependencies = [ "log", "serde", @@ -1413,34 +1528,34 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.7" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-sys 0.45.0", + "windows-targets", ] [[package]] name = "paste" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "b4b27ab7be369122c218afc2079489cdcb4b517c0a3fc386ff11e1fedfcc2b35" [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" [[package]] name = "pin-utils" @@ -1450,9 +1565,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "ppv-lite86" @@ -1462,10 +1577,11 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "predicates" -version = "2.1.5" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" +checksum = "09963355b9f467184c04017ced4a2ba2d75cbcb4e7462690d388233253d4b1a9" dependencies = [ + "anstyle", "difflib", "itertools", "predicates-core", @@ -1473,15 +1589,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f883590242d3c6fc5bf50299011695fa6590c2c70eac95ee1bdb9a733ad1a2" +checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" [[package]] name = "predicates-tree" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54ff541861505aabf6ea722d2131ee980b8276e10a1297b94e896dd8b621850d" +checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" dependencies = [ "predicates-core", "termtree", @@ -1489,29 +1605,28 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.51" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" +checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" dependencies = [ "unicode-ident", ] [[package]] name = "proptest" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29f1b898011ce9595050a68e60f90bad083ff2987a695a42357134c8381fba70" +checksum = "4e35c06b98bf36aba164cc17cb25f7e232f5c4aeea73baa14b8a9f0d92dbfa65" dependencies = [ "bit-set", - "bitflags", + "bitflags 1.3.2", "byteorder", "lazy_static", "num-traits", - "quick-error 2.0.1", "rand", "rand_chacha", "rand_xorshift", - "regex-syntax", + "regex-syntax 0.6.29", "rusty-fork", "tempfile", "unarray", @@ -1523,17 +1638,11 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" -[[package]] -name = "quick-error" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" - [[package]] name = "quote" -version = "1.0.23" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" dependencies = [ "proc-macro2", ] @@ -1579,22 +1688,22 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.16" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] name = "regex" -version = "1.7.1" +version = "1.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" dependencies = [ - "aho-corasick", + "aho-corasick 1.0.2", "memchr", - "regex-syntax", + "regex-syntax 0.7.2", ] [[package]] @@ -1605,17 +1714,23 @@ checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" +checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" [[package]] name = "reqwest" -version = "0.11.14" +version = "0.11.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21eed90ec8570952d53b772ecf8f206aa1ec9a3d76b2521c56c42973f2d91ee9" +checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" dependencies = [ - "base64 0.21.0", + "base64", "bytes", "encoding_rs", "futures-core", @@ -1646,11 +1761,26 @@ dependencies = [ "winreg", ] +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin", + "untrusted", + "web-sys", + "winapi", +] + [[package]] name = "rustc-demangle" -version = "0.1.21" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustc_version" @@ -1663,16 +1793,29 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.9" +version = "0.37.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd5c6ff11fecd55b40746d1995a02f2eb375bf8c00d192d521ee09f42bef37bc" +checksum = "8818fa822adcc98b18fedbb3632a6a33213c070556b5aa7c4c8cc21cff565c4c" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", - "linux-raw-sys", - "windows-sys 0.45.0", + "linux-raw-sys 0.3.8", + "windows-sys", +] + +[[package]] +name = "rustix" +version = "0.38.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aabcb0461ebd01d6b79945797c27f8529082226cb630a9865a71870ff63532a4" +dependencies = [ + "bitflags 2.3.3", + "errno", + "libc", + "linux-raw-sys 0.4.3", + "windows-sys", ] [[package]] @@ -1682,16 +1825,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" dependencies = [ "fnv", - "quick-error 1.2.3", + "quick-error", "tempfile", "wait-timeout", ] [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" [[package]] name = "same-file" @@ -1704,11 +1847,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.42.0", + "windows-sys", ] [[package]] @@ -1719,11 +1862,11 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "security-framework" -version = "2.8.2" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" +checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -1732,9 +1875,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" +checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" dependencies = [ "core-foundation-sys", "libc", @@ -1742,15 +1885,15 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" +checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" [[package]] name = "sentry" -version = "0.30.0" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5ce6d3512e2617c209ec1e86b0ca2fea06454cd34653c91092bf0f3ec41f8e3" +checksum = "01b0ad16faa5d12372f914ed40d00bda21a6d1bdcc99264c5e5e1c9495cf3654" dependencies = [ "httpdate", "native-tls", @@ -1760,15 +1903,16 @@ dependencies = [ "sentry-core", "sentry-debug-images", "sentry-panic", + "sentry-tracing", "tokio", "ureq", ] [[package]] name = "sentry-actix" -version = "0.30.0" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c210068218470670c03fbe59f53944061f9b1fcdb7748f9326248ab1ddf56238" +checksum = "e9f81ee4dfb8e109fd99f0eb036fec548e66fd1db17a0224304c4a31ab0749ef" dependencies = [ "actix-web", "futures-util", @@ -1777,9 +1921,9 @@ dependencies = [ [[package]] name = "sentry-backtrace" -version = "0.30.0" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7fe408d4d1f8de188a9309916e02e129cbe51ca19e55badea5a64899399b1a" +checksum = "11f2ee8f147bb5f22ac59b5c35754a759b9a6f6722402e2a14750b2a63fc59bd" dependencies = [ "backtrace", "once_cell", @@ -1789,9 +1933,9 @@ dependencies = [ [[package]] name = "sentry-contexts" -version = "0.30.0" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5695096a059a89973ec541062d331ff4c9aeef9c2951416c894f0fff76340e7d" +checksum = "dcd133362c745151eeba0ac61e3ba8350f034e9fe7509877d08059fe1d7720c6" dependencies = [ "hostname", "libc", @@ -1803,9 +1947,9 @@ dependencies = [ [[package]] name = "sentry-core" -version = "0.30.0" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b22828bfd118a7b660cf7a155002a494755c0424cebb7061e4743ecde9c7dbc" +checksum = "7163491708804a74446642ff2c80b3acd668d4b9e9f497f85621f3d250fd012b" dependencies = [ "once_cell", "rand", @@ -1816,9 +1960,9 @@ dependencies = [ [[package]] name = "sentry-debug-images" -version = "0.30.0" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a9164d44a2929b1b7670afd7e87552514b70d3ae672ca52884639373d912a3d" +checksum = "6a5003d7ff08aa3b2b76994080b183e8cfa06c083e280737c9cee02ca1c70f5e" dependencies = [ "findshlibs", "once_cell", @@ -1827,19 +1971,31 @@ dependencies = [ [[package]] name = "sentry-panic" -version = "0.30.0" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4ced2a7a8c14899d58eec402d946f69d5ed26a3fc363a7e8b1e5cb88473a01" +checksum = "c4dfe8371c9b2e126a8b64f6fefa54cef716ff2a50e63b5558a48b899265bccd" dependencies = [ "sentry-backtrace", "sentry-core", ] +[[package]] +name = "sentry-tracing" +version = "0.31.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aca8b88978677a27ee1a91beafe4052306c474c06f582321fde72d2e2cc2f7f" +dependencies = [ + "sentry-backtrace", + "sentry-core", + "tracing-core", + "tracing-subscriber", +] + [[package]] name = "sentry-types" -version = "0.30.0" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360ee3270f7a4a1eee6c667f7d38360b995431598a73b740dfe420da548d9cc9" +checksum = "9e7a88e0c1922d19b3efee12a8215f6a8a806e442e665ada71cc222cab72985f" dependencies = [ "debugid", "getrandom", @@ -1847,36 +2003,36 @@ dependencies = [ "serde", "serde_json", "thiserror", - "time", + "time 0.3.22", "url", "uuid", ] [[package]] name = "serde" -version = "1.0.154" +version = "1.0.166" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cdd151213925e7f1ab45a9bbfb129316bd00799784b174b7cc7bcd16961c49e" +checksum = "d01b7404f9d441d3ad40e6a636a7782c377d2abdbe4fa2440e2edcc2f4f10db8" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.154" +version = "1.0.166" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fc80d722935453bcafdc2c9a73cd6fac4dc1938f0346035d84bf99fa9e33217" +checksum = "5dd83d6dde2b6b2d466e14d9d1acce8816dedee94f735eac6395808b3483c6d6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.23", ] [[package]] name = "serde_json" -version = "1.0.94" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea" +checksum = "46266871c240a00b8f503b877622fe33430b3c7d963bdc0f2adc511e54a1eae3" dependencies = [ "itoa", "ryu", @@ -1885,9 +2041,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0efd8caf556a6cebd3b285caf480045fcc1ac04f6bd786b09a6f11af30c4fcf4" +checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" dependencies = [ "serde", ] @@ -1906,9 +2062,9 @@ dependencies = [ [[package]] name = "serial_test" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "538c30747ae860d6fb88330addbbd3e0ddbe46d662d032855596d8a8ca260611" +checksum = "0e56dd856803e253c8f298af3f4d7eb0ae5e23a737252cd90bb4f3b435033b2d" dependencies = [ "dashmap", "futures", @@ -1920,13 +2076,13 @@ dependencies = [ [[package]] name = "serial_test_derive" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "079a83df15f85d89a68d64ae1238f142f172b1fa915d0d76b26a7cba1b659a69" +checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.23", ] [[package]] @@ -1940,6 +2096,27 @@ dependencies = [ "digest", ] +[[package]] +name = "sha2" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha256" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08a975c1bc0941703000eaf232c4d8ce188d8d5408d6344b6b2c8c6262772828" +dependencies = [ + "hex", + "sha2", +] + [[package]] name = "signal-hook-registry" version = "1.4.1" @@ -1992,6 +2169,12 @@ dependencies = [ "serde", ] +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + [[package]] name = "strsim" version = "0.10.0" @@ -2009,17 +2192,29 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59fb7d6d8281a51045d62b8eb3a7d1ce347b76f312af50cd3dc0af39c87c1737" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "tempfile" -version = "3.4.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95" +checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" dependencies = [ + "autocfg", "cfg-if", "fastrand", "redox_syscall", - "rustix", - "windows-sys 0.42.0", + "rustix 0.37.22", + "windows-sys", ] [[package]] @@ -2033,28 +2228,28 @@ dependencies = [ [[package]] name = "termtree" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059e91184749cb66be6dc994f67f182b6d897cb3df74a5bf66b5e709295fd8" +checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.39" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5ab016db510546d856297882807df8da66a16fb8c4101cb8b30054b0d5b2d9c" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.39" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5420d42e90af0c38c3290abcca25b9b3bdf379fc9f55c528f53a269d9c9a267e" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.23", ] [[package]] @@ -2069,9 +2264,20 @@ dependencies = [ [[package]] name = "time" -version = "0.3.20" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" +dependencies = [ + "libc", + "wasi 0.10.0+wasi-snapshot-preview1", + "winapi", +] + +[[package]] +name = "time" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" +checksum = "ea9e1b3cf1243ae005d9e74085d4d542f3125458f3a81af210d901dcd7411efd" dependencies = [ "itoa", "serde", @@ -2081,15 +2287,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" +checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" dependencies = [ "time-core", ] @@ -2111,21 +2317,33 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.26.0" +version = "1.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" +checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" dependencies = [ "autocfg", + "backtrace", "bytes", "libc", - "memchr", "mio", "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", - "windows-sys 0.45.0", + "tokio-macros", + "windows-sys", +] + +[[package]] +name = "tokio-macros" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.23", ] [[package]] @@ -2152,23 +2370,27 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ "bytes", "futures-core", + "futures-io", "futures-sink", + "futures-util", + "hashbrown 0.12.3", "pin-project-lite", + "slab", "tokio", "tracing", ] [[package]] name = "toml" -version = "0.7.2" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7afcae9e3f0fe2c370fd4657108972cbb2fa9db1b9f84849cefd80741b01cb6" +checksum = "1ebafdf5ad1220cb59e7d17cf4d2c72015297b75b19a10472f99b89225089240" dependencies = [ "serde", "serde_spanned", @@ -2178,20 +2400,20 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.4" +version = "0.19.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a1eb0622d28f4b9c90adc4ea4b2b46b47663fde9ac5fafcb14a1369d5508825" +checksum = "266f016b7f039eec8a1a80dfe6156b633d208b9fccca5e4db1d6775b0c4e34a7" dependencies = [ - "indexmap", + "indexmap 2.0.0", "serde", "serde_spanned", "toml_datetime", @@ -2218,11 +2440,21 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ "once_cell", + "valuable", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" +dependencies = [ + "tracing-core", ] [[package]] @@ -2263,15 +2495,15 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.11" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524b68aca1d05e03fdf03fcdce2c6c94b6daf6d16861ddaa7e4f2b6638a9052c" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" [[package]] name = "unicode-normalization" @@ -2282,13 +2514,19 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + [[package]] name = "ureq" -version = "2.6.2" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "338b31dd1314f68f3aabf3ed57ab922df95ffcd902476ca7ba3c4ce7b908c46d" +checksum = "0b11c96ac7ee530603dcdf68ed1557050f374ce55a5a07193ebf8cbc9f8927e9" dependencies = [ - "base64 0.13.1", + "base64", "log", "native-tls", "once_cell", @@ -2297,9 +2535,9 @@ dependencies = [ [[package]] name = "url" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" dependencies = [ "form_urlencoded", "idna", @@ -2309,14 +2547,20 @@ dependencies = [ [[package]] name = "uuid" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1674845326ee10d37ca60470760d4288a6f80f304007d92e5c53bab78c9cfd79" +checksum = "d023da39d1fde5a8a3fe1f3e01ca9632ada0a63e9797de55a879d6e2236277be" dependencies = [ "getrandom", "serde", ] +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + [[package]] name = "vcpkg" version = "0.2.15" @@ -2340,25 +2584,29 @@ dependencies = [ [[package]] name = "walkdir" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" dependencies = [ "same-file", - "winapi", "winapi-util", ] [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] +[[package]] +name = "wasi" +version = "0.10.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -2367,9 +2615,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -2377,24 +2625,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn", + "syn 2.0.23", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.34" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" dependencies = [ "cfg-if", "js-sys", @@ -2404,9 +2652,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2414,28 +2662,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.23", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "web-sys" -version = "0.3.61" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" dependencies = [ "js-sys", "wasm-bindgen", @@ -2473,34 +2721,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows-sys" -version = "0.42.0" +name = "windows" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows-targets", ] [[package]] name = "windows-sys" -version = "0.45.0" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ "windows-targets", ] [[package]] name = "windows-targets" -version = "0.42.1" +version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -2513,51 +2755,51 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winnow" -version = "0.3.5" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee7b2c67f962bf5042bfd8b6a916178df33a26eec343ae064cb8e069f638fa6f" +checksum = "ca0ace3845f0d96209f0375e6d367e3eb87eb65d27d445bdc9f1843a26f39448" dependencies = [ "memchr", ] @@ -2582,9 +2824,9 @@ dependencies = [ [[package]] name = "zstd-safe" -version = "6.0.4+zstd.1.5.4" +version = "6.0.5+zstd.1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7afb4b54b8910cf5447638cb54bf4e8a65cbedd783af98b98c62ffe91f185543" +checksum = "d56d9e60b4b1758206c238a10165fbcae3ca37b01744e394c463463f6529d23b" dependencies = [ "libc", "zstd-sys", @@ -2592,9 +2834,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.7+zstd.1.5.4" +version = "2.0.8+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94509c3ba2fe55294d752b79842c530ccfab760192521df74a081a78d2b3c7f5" +checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" dependencies = [ "cc", "libc", diff --git a/Cargo.toml b/Cargo.toml index 290f469..d547ca7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,14 +4,14 @@ version = "0.1.0" authors = ["simon lehericey "] edition = "2018" build = "build.rs" # Cargo only supports one build script per project at the moment -rust-version = "1.67.1" +rust-version = "1.69.0" [dependencies] sodiumoxide = "*" futures = "*" futures-core = "*" actix-web = { version="*", features = ["openssl"] } -awc = "*" +awc = { version = "*", features = ["openssl"] } actix-http = "*" actix-files = "*" bytes = "*" @@ -25,6 +25,17 @@ sentry-actix = "*" url = "*" base64 = "*" serde_json = "*" +tokio = { version = "*", features = ["full"] } +tokio-util = { version = "*", features = ["full"] } +chrono = "*" +hex = "*" +ring = "*" +http = "*" +sha256 = "*" +data-encoding = "*" +openssl = "*" +md-5 = "*" +sha2 = "*" [dev-dependencies] assert_cmd = "*" diff --git a/launch_demo.sh b/launch_demo.sh index 20dcceb..30736c5 100755 --- a/launch_demo.sh +++ b/launch_demo.sh @@ -7,7 +7,7 @@ DS_PROXY_LOG=/tmp/ds_proxy_log NODE_LOG=/tmp/node_log echo 'compiling ds_proxy' -cargo build +cargo build --release echo 'building simple node server which mimics a backend storage' npm install --prefix tests/fixtures/server-static @@ -15,8 +15,16 @@ npm install --prefix tests/fixtures/server-static echo 'building keyring file' ./target/debug/ds_proxy add-key --password-file <(echo -n "$PASSWORD") --keyring-file "$KEYRING_FILE" --salt "$SALT" -echo 'launching ds_proxy listenning on 4444' -RUST_LOG=info ./target/debug/ds_proxy proxy --address "127.0.0.1:4444" --password-file <(echo -n "$PASSWORD") --salt "$SALT" --keyring-file "$KEYRING_FILE" --upstream-url "http://localhost:3333" > "$DS_PROXY_LOG" 2>&1 & +if [ "$1" = "aws" ]; then + echo 'launching ds_proxy in aws mode listenning on real s3 backend' + RUST_LOG=info ./target/release/ds_proxy proxy --address "127.0.0.1:4444" --password-file <(echo -n "$PASSWORD") --salt "$SALT" --keyring-file "$KEYRING_FILE" --upstream-url "https://test-de-proxy.s3-eu-west-1.amazonaws.com" --aws-access-key $ACCESS_KEY --aws-secret-key $SECRET_KEY --aws-region "eu-west-1" > "$DS_PROXY_LOG" 2>&1 & +elif [ "$1" = "fake_aws" ]; then + echo 'launching ds_proxy in aws mode listenning on 4444 binded on node server' + RUST_LOG=info ./target/release/ds_proxy proxy --address "127.0.0.1:4444" --password-file <(echo -n "$PASSWORD") --salt "$SALT" --keyring-file "$KEYRING_FILE" --upstream-url "http://localhost:3333" --aws-access-key $ACCESS_KEY --aws-secret-key $SECRET_KEY --aws-region "eu-west-1" > "$DS_PROXY_LOG" 2>&1 & +else + echo 'launching ds_proxy listenning on 4444 binded on node server' + RUST_LOG=info ./target/release/ds_proxy proxy --address "127.0.0.1:4444" --password-file <(echo -n "$PASSWORD") --salt "$SALT" --keyring-file "$KEYRING_FILE" --upstream-url "http://localhost:3333" > "$DS_PROXY_LOG" 2>&1 & +fi echo 'launching fake backend storage with node listenning on 3333' DEBUG=express:* node tests/fixtures/server-static/server.js > "$NODE_LOG" 2>&1 & diff --git a/readme.md b/readme.md index 4707d6e..12c6d4d 100644 --- a/readme.md +++ b/readme.md @@ -58,6 +58,10 @@ DS Proxy utilise actuellement l'algorithme de chiffrement [xchacha20poly1305](ht Les clés de chiffrement sont stockées sur un fichier `keyring.toml`. Ce fichier est lui-même chiffré à l'aide d'un mot de passe maître et d'un sel. +## Dépendances + +En plus des différents crates utilisés référencés dans le Cargo.lock, la signature aws est calculée à l'aide d'une implémentation proposée par https://github.com/psnszsn/aws-sign-v4. + ## Comment contribuer ? **ds_proxy** est un [logiciel libre](https://fr.wikipedia.org/wiki/Logiciel_libre) sous [licence AGPL](LICENSE.txt). diff --git a/src/args.rs b/src/args.rs index 4e3310a..845bc10 100644 --- a/src/args.rs +++ b/src/args.rs @@ -6,7 +6,7 @@ DS encryption proxy. Usage: ds_proxy encrypt [--password-file=] [--salt=] [--chunk-size=] [--keyring-file=] ds_proxy decrypt [--password-file=] [--salt=] [--chunk-size=] [--keyring-file=] - ds_proxy proxy [--address=
] [--password-file=] [--salt=] [--chunk-size=] [--upstream-url=] [--local-encryption-directory=] [--keyring-file=] + ds_proxy proxy [--address=
] [--password-file=] [--salt=] [--chunk-size=] [--upstream-url=] [--local-encryption-directory=] [--keyring-file=] [--aws-access-key=] [--aws-secret-key=] [--aws-region=] ds_proxy add-key [--password-file=] [--salt=] [--keyring-file=] ds_proxy (-h | --help) ds_proxy --version @@ -27,6 +27,9 @@ pub struct Args { pub flag_salt: Option, pub flag_upstream_url: Option, pub flag_local_encryption_directory: Option, + pub flag_aws_access_key: Option, + pub flag_aws_secret_key: Option, + pub flag_aws_region: Option, pub cmd_encrypt: bool, pub cmd_decrypt: bool, pub cmd_proxy: bool, diff --git a/src/config.rs b/src/config.rs index 0b19946..151a321 100644 --- a/src/config.rs +++ b/src/config.rs @@ -39,6 +39,9 @@ pub struct HttpConfig { pub chunk_size: usize, pub address: SocketAddr, pub local_encryption_directory: PathBuf, + pub aws_access_key: Option, + pub aws_secret_key: Option, + pub aws_region: Option, } #[derive(Debug, Clone)] @@ -152,6 +155,9 @@ impl Config { upstream_base_url, address, local_encryption_directory, + aws_access_key: args.flag_aws_access_key.clone(), + aws_secret_key: args.flag_aws_secret_key.clone(), + aws_region: args.flag_aws_region.clone(), }) } } @@ -313,6 +319,9 @@ mod tests { upstream_base_url: normalize_and_parse_upstream_url(upstream_base_url.to_string()), address: "127.0.0.1:1234".to_socket_addrs().unwrap().next().unwrap(), local_encryption_directory: PathBuf::from(DEFAULT_LOCAL_ENCRYPTION_DIRECTORY), + aws_access_key: None, + aws_secret_key: None, + aws_region: None, } } } diff --git a/src/crypto/encoder.rs b/src/crypto/encoder.rs index 2f6c374..8bf1473 100644 --- a/src/crypto/encoder.rs +++ b/src/crypto/encoder.rs @@ -2,8 +2,10 @@ use super::header::{Header, HEADER_SIZE}; use actix_web::web::{Bytes, BytesMut}; use core::pin::Pin; use core::task::{Context, Poll}; +use data_encoding::HEXLOWER; use futures_core::stream::Stream; use log::trace; +use md5::{digest::DynDigest, Digest, Md5}; use sodiumoxide::crypto::secretstream::xchacha20poly1305; use sodiumoxide::crypto::secretstream::xchacha20poly1305::Key; use sodiumoxide::crypto::secretstream::Tag; @@ -16,6 +18,7 @@ pub struct Encoder { chunk_size: usize, key: Key, key_id: u64, + md5_hasher: Box, } impl Encoder { @@ -33,9 +36,14 @@ impl Encoder { chunk_size, key, key_id, + md5_hasher: Box::new(Md5::new()), } } + pub fn input_md5(self) -> String { + HEXLOWER.encode(&self.md5_hasher.finalize()[..]) + } + fn encrypt_buffer(&mut self, cx: &mut Context) -> Poll>> { if self.buffer.is_empty() { trace!("buffer empty, stop"); @@ -105,6 +113,7 @@ impl Stream for Encoder { } Poll::Ready(Some(Ok(bytes))) => { trace!("poll: bytes"); + encoder.md5_hasher.update(&bytes); encoder.buffer.extend_from_slice(&bytes); encoder.encrypt_buffer(cx) } diff --git a/src/http/handlers/fetch.rs b/src/http/handlers/fetch.rs index 5c1596a..0483071 100644 --- a/src/http/handlers/fetch.rs +++ b/src/http/handlers/fetch.rs @@ -1,7 +1,9 @@ use super::*; -use crate::http::utils::partial_extractor::*; +use crate::http::utils::{aws_helper::sign_request, partial_extractor::*}; use actix_files::HttpRange; use actix_web::web::Bytes; +use data_encoding::HEXLOWER; +use sha2::{Digest, Sha256}; pub async fn fetch( req: HttpRequest, @@ -28,7 +30,21 @@ pub async fn fetch( fetch_req.headers_mut().remove(header); } - let res = fetch_req.send_body(body).await.map_err(|e| { + let req_to_send = if config.aws_access_key.is_some() { + let checksum = HEXLOWER.encode(&Sha256::digest(b"")); + + sign_request( + fetch_req, + &config.aws_access_key.clone().unwrap(), + &config.aws_secret_key.clone().unwrap(), + &config.aws_region.clone().unwrap(), + &checksum, + ) + } else { + fetch_req + }; + + let res = req_to_send.send_body(body).await.map_err(|e| { error!("fetch error {:?}, {:?}", e, req); match e { awc::error::SendRequestError::Timeout => actix_web::error::ErrorGatewayTimeout(e), diff --git a/src/http/handlers/forward.rs b/src/http/handlers/forward.rs index e4e797a..9260e97 100644 --- a/src/http/handlers/forward.rs +++ b/src/http/handlers/forward.rs @@ -1,5 +1,8 @@ +use crate::http::utils::{aws_helper::sign_request, memory_or_file_buffer::MemoryOrFileBuffer}; + use super::*; use actix_web::body::SizedStream; +use futures::StreamExt; use std::time::Duration; const UPLOAD_TIMEOUT: Duration = Duration::from_secs(60 * 60); @@ -51,25 +54,49 @@ pub async fn forward( .get_last_key() .expect("no key avalaible for encryption"); - let stream: Box + Unpin> = Box::new(Encoder::new( - key, - key_id, - config.chunk_size, - Box::new(payload), - )); - - let req_copy = req.clone(); - let stream_to_send = stream.map_err(move |e| { - error!("forward error with stream {:?}, {:?}", e, req_copy); - Error::from(e) - }); - - let res_e = if let Some(length) = forward_length { - forwarded_req - .send_body(SizedStream::new(length as u64, stream_to_send)) - .await + let mut encrypted_stream = Encoder::new(key, key_id, config.chunk_size, Box::new(payload)); + + let cloned_req = req.clone(); + + let mut input_etag: Option = None; + + let res_e = if config.aws_access_key.is_some() { + let filepath = config.local_encryption_path_for(&req); + let mut buffer = MemoryOrFileBuffer::new(filepath); + + while let Ok(Some(v)) = encrypted_stream.try_next().await { + buffer.append(v).await; + } + + let (output_sha256, length) = buffer.sha256_and_len(); + input_etag = Some(encrypted_stream.input_md5()); + + let stream_to_send = buffer.to_stream().await; + + sign_request( + forwarded_req, + &config.aws_access_key.clone().unwrap(), + &config.aws_secret_key.clone().unwrap(), + &config.aws_region.clone().unwrap(), + &output_sha256, + ) + .send_body(SizedStream::new(length, stream_to_send)) + .await } else { - forwarded_req.send_stream(stream_to_send).await + let stream_to_send = encrypted_stream + .map_err(move |e| { + error!("forward error with stream {:?}, {:?}", e, cloned_req); + Error::from(e) + }) + .boxed_local(); + + if let Some(length) = forward_length { + forwarded_req + .send_body(SizedStream::new(length as u64, stream_to_send)) + .await + } else { + forwarded_req.send_stream(stream_to_send).await + } }; let mut res = res_e.map_err(|e| { @@ -91,5 +118,9 @@ pub async fn forward( client_resp.append_header(header); } + if let Some(etag) = input_etag { + client_resp.insert_header(("etag", format!("\"{}\"", etag))); + } + Ok(client_resp.body(res.body().await?)) } diff --git a/src/http/handlers/mod.rs b/src/http/handlers/mod.rs index d12f052..e290c75 100644 --- a/src/http/handlers/mod.rs +++ b/src/http/handlers/mod.rs @@ -23,12 +23,15 @@ use futures::TryStreamExt; use futures_core::stream::Stream; use log::error; -pub static FETCH_RESPONSE_HEADERS_TO_REMOVE: [header::HeaderName; 2] = [ +pub static FETCH_RESPONSE_HEADERS_TO_REMOVE: [header::HeaderName; 3] = [ // Connection settings (keepalived) must not be resend header::CONNECTION, // Encryption changes the length of the content // and we use chunk transfert-encoding header::CONTENT_LENGTH, + // Encryption change the data and thus the etag + // which is often used as a md5 + header::ETAG, ]; pub static FETCH_REQUEST_HEADERS_TO_REMOVE: [header::HeaderName; 2] = [ diff --git a/src/http/handlers/simple_proxy.rs b/src/http/handlers/simple_proxy.rs index 1cd7ee0..ec32e88 100644 --- a/src/http/handlers/simple_proxy.rs +++ b/src/http/handlers/simple_proxy.rs @@ -1,3 +1,8 @@ +use data_encoding::HEXLOWER; +use sha2::{Digest, Sha256}; + +use crate::http::utils::aws_helper::sign_request; + use super::*; pub async fn simple_proxy( @@ -18,7 +23,21 @@ pub async fn simple_proxy( proxied_req.headers_mut().remove(header); } - proxied_req + let req_to_send = if config.aws_access_key.is_some() { + let checksum = HEXLOWER.encode(&Sha256::digest(b"")); + + sign_request( + proxied_req, + &config.aws_access_key.clone().unwrap(), + &config.aws_secret_key.clone().unwrap(), + &config.aws_region.clone().unwrap(), + &checksum, + ) + } else { + proxied_req + }; + + req_to_send .send_stream(payload) .await .map_err(|e| { diff --git a/src/http/utils/aws_helper.rs b/src/http/utils/aws_helper.rs new file mode 100644 index 0000000..3d2b22e --- /dev/null +++ b/src/http/utils/aws_helper.rs @@ -0,0 +1,52 @@ +use crate::http::utils::sign::*; +use actix_http::header::{HeaderName, HeaderValue}; +use awc::ClientRequest; + +pub fn sign_request( + mut req: ClientRequest, + aws_access_key: &str, + aws_secret_key: &str, + aws_region: &str, + checksum: &str, +) -> ClientRequest { + let datetime = chrono::Utc::now(); + + let host = req.get_uri().host().unwrap(); + let amz_date = datetime.format("%Y%m%dT%H%M%SZ").to_string(); + + let amz_headers: Vec<(&HeaderName, &HeaderValue)> = req + .headers() + .iter() + .filter(|(key, _)| key.to_string().starts_with("x-amz-")) + .collect(); + + log::info!("voila les amz: {:?}", amz_headers); + + let mut map = http::HeaderMap::new(); + + for (header_name, header_value) in amz_headers { + map.insert::(header_name.into(), header_value.into()); + } + map.insert("x-amz-date", amz_date.parse().unwrap()); + map.insert("x-amz-content-sha256", checksum.parse().unwrap()); + map.insert("host", host.parse().unwrap()); + + let authorization = AwsSign::new( + req.get_method().as_str(), + &req.get_uri().to_string(), + &datetime, + &map, + aws_region, + aws_access_key, + aws_secret_key, + "s3", + checksum, + ) + .sign(); + + for (key, value) in map { + req = req.insert_header((key.unwrap().to_string(), value.to_str().unwrap())); + } + + req.insert_header(("Authorization", authorization)) +} diff --git a/src/http/utils/memory_or_file_buffer.rs b/src/http/utils/memory_or_file_buffer.rs new file mode 100644 index 0000000..f9e2a8b --- /dev/null +++ b/src/http/utils/memory_or_file_buffer.rs @@ -0,0 +1,98 @@ +use std::path::PathBuf; + +use actix_web::Error; +use bytes::{Bytes, BytesMut}; +use data_encoding::HEXLOWER; +use futures::TryStreamExt; +use futures_core::Stream; +use sha2::{digest::DynDigest, Digest, Sha256}; +use tokio::fs::{File, OpenOptions}; +use tokio::io::{AsyncSeekExt, AsyncWriteExt}; +use tokio_util::io::ReaderStream; + +const MAX_IN_MEMORY_FILE_SIZE: usize = 10 * 1024 * 1024; + +pub struct MemoryOrFileBuffer { + file: Option, + buf: BytesMut, + filepath: PathBuf, + sha256_hasher: Box, + output_len: u64, +} + +impl MemoryOrFileBuffer { + pub fn new(filepath: PathBuf) -> MemoryOrFileBuffer { + MemoryOrFileBuffer { + file: None, + buf: BytesMut::new(), + filepath, + sha256_hasher: Box::new(Sha256::new()), + output_len: 0, + } + } + + pub async fn append(&mut self, bytes: Bytes) { + self.output_len += bytes.len() as u64; + self.sha256_hasher.update(&bytes); + + match &mut self.file { + None => { + if self.buf.len() < MAX_IN_MEMORY_FILE_SIZE { + log::info!("going memory"); + self.buf.extend_from_slice(&bytes); + } else { + log::info!("going file"); + let mut f = OpenOptions::new() + .read(true) + .write(true) + .create(true) + .open(&self.filepath) + .await + .unwrap(); + + f.write_all(&self.buf).await.unwrap(); + f.write_all(&bytes).await.unwrap(); + self.file = Some(f); + } + } + Some(f) => { + f.write_all(&bytes).await.unwrap(); + } + } + } + + pub async fn to_stream( + &mut self, + ) -> Box> + Unpin> { + match &mut self.file { + Some(f) => { + let mut f2 = f.try_clone().await.unwrap(); + f2.rewind().await.unwrap(); + let buf = tokio::io::BufReader::new(f2); + let stream = ReaderStream::new(buf).map_err(Error::from); + Box::new(stream) + } + None => { + let cloned = self.buf.clone(); + Box::new(Box::pin(futures::stream::once(async { + Ok(cloned.freeze()) + }))) + } + } + } + + pub fn sha256_and_len(&self) -> (String, u64) { + let hash = self.sha256_hasher.clone().finalize(); + let sha256 = HEXLOWER.encode(&hash); + (sha256, self.output_len) + } +} + +impl Drop for MemoryOrFileBuffer { + fn drop(&mut self) { + if self.file.is_some() { + std::fs::remove_file(&self.filepath) + .unwrap_or_else(|_| panic!("unable to remove file {}", &self.filepath.display())); + } + } +} diff --git a/src/http/utils/mod.rs b/src/http/utils/mod.rs index c283706..1829767 100644 --- a/src/http/utils/mod.rs +++ b/src/http/utils/mod.rs @@ -1,6 +1,9 @@ use actix_web::http::{header, header::HeaderMap}; +pub mod aws_helper; +pub mod memory_or_file_buffer; pub mod partial_extractor; +pub mod sign; pub fn content_length(headers: &HeaderMap) -> Option { headers diff --git a/src/http/utils/sign.rs b/src/http/utils/sign.rs new file mode 100644 index 0000000..7624095 --- /dev/null +++ b/src/http/utils/sign.rs @@ -0,0 +1,262 @@ +/* + * code from https://github.com/psnszsn/aws-sign-v4/blob/master/src/lib.rs + * +*/ + +use chrono::{DateTime, Utc}; +use http::header::HeaderMap; +use std::collections::HashMap; +use url::Url; + +const SHORT_DATE: &str = "%Y%m%d"; +const LONG_DATETIME: &str = "%Y%m%dT%H%M%SZ"; + +#[derive(Debug)] +pub struct AwsSign<'a, T: 'a> +where + &'a T: std::iter::IntoIterator, +{ + method: &'a str, + url: Url, + datetime: &'a DateTime, + region: &'a str, + access_key: &'a str, + secret_key: &'a str, + headers: T, + + /* + service is the that can be found in the service-quotas api. + + For example, use the value `ServiceCode` for this `service` property. + Thus, for "Amazon Simple Storage Service (Amazon S3)", you would use value "s3" + + ``` + > aws service-quotas list-services + { + "Services": [ + ... + { + "ServiceCode": "a4b", + "ServiceName": "Alexa for Business" + }, + ... + { + "ServiceCode": "s3", + "ServiceName": "Amazon Simple Storage Service (Amazon S3)" + }, + ... + ``` + This is not absolute, so you might need to poke around at the service you're interesed in. + See: + [AWS General Reference -> Service endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/aws-service-information.html) - to look up "service" names and codes + + added in 0.2.0 + */ + service: &'a str, + + /// digest, such as in an http POST + digest: &'a str, +} + +impl<'a> AwsSign<'a, HashMap> { + #[allow(clippy::too_many_arguments)] + pub fn new( + method: &'a str, + url: &'a str, + datetime: &'a DateTime, + headers: &'a HeaderMap, + region: &'a str, + access_key: &'a str, + secret_key: &'a str, + service: &'a str, + digest: &'a str, + ) -> Self { + let url: Url = url.parse().unwrap(); + let headers: HashMap = headers + .iter() + .filter_map(|(key, value)| { + if let Ok(value_inner) = value.to_str() { + Some((key.as_str().to_owned(), value_inner.to_owned())) + } else { + None + } + }) + .collect(); + Self { + method, + url, + datetime, + region, + access_key, + secret_key, + headers, + service, + digest, + } + } +} + +impl<'a, T> AwsSign<'a, T> +where + &'a T: std::iter::IntoIterator, +{ + //Thanks https://github.com/durch/rust-s3 for the signing implementation. + + pub fn canonical_header_string(&'a self) -> String { + let mut keyvalues = self + .headers + .into_iter() + .map(|(key, value)| key.to_lowercase() + ":" + value.trim()) + .collect::>(); + keyvalues.sort(); + keyvalues.join("\n") + } + + pub fn signed_header_string(&'a self) -> String { + let mut keys = self + .headers + .into_iter() + .map(|(key, _)| key.to_lowercase()) + .collect::>(); + keys.sort(); + keys.join(";") + } + + pub fn canonical_request(&'a self) -> String { + let url: &str = self.url.path(); + + format!( + "{method}\n{uri}\n{query_string}\n{headers}\n\n{signed}\n{sha256}", + method = self.method, + uri = url, + query_string = canonical_query_string(&self.url), + headers = self.canonical_header_string(), + signed = self.signed_header_string(), + sha256 = self.digest, + ) + } + pub fn sign(&'a self) -> String { + let canonical = self.canonical_request(); + let string_to_sign = string_to_sign(self.datetime, self.region, &canonical, self.service); + let signing_key = signing_key(self.datetime, self.secret_key, self.region, self.service); + let key = ring::hmac::Key::new(ring::hmac::HMAC_SHA256, &signing_key.unwrap()); + let tag = ring::hmac::sign(&key, string_to_sign.as_bytes()); + let signature = hex::encode(tag.as_ref()); + let signed_headers = self.signed_header_string(); + + format!( + "AWS4-HMAC-SHA256 Credential={access_key}/{scope},\ + SignedHeaders={signed_headers},Signature={signature}", + access_key = self.access_key, + scope = scope_string(self.datetime, self.region, self.service), + signed_headers = signed_headers, + signature = signature + ) + } +} + +pub fn uri_encode(string: &str, encode_slash: bool) -> String { + let mut result = String::with_capacity(string.len() * 2); + for c in string.chars() { + match c { + 'a'..='z' | 'A'..='Z' | '0'..='9' | '_' | '-' | '~' | '.' => result.push(c), + '/' if encode_slash => result.push_str("%2F"), + '/' if !encode_slash => result.push('/'), + _ => { + result.push('%'); + result.push_str( + &format!("{}", c) + .bytes() + .map(|b| format!("{:02X}", b)) + .collect::(), + ); + } + } + } + result +} + +pub fn canonical_query_string(uri: &Url) -> String { + let mut keyvalues = uri + .query_pairs() + .map(|(key, value)| uri_encode(&key, true) + "=" + &uri_encode(&value, true)) + .collect::>(); + keyvalues.sort(); + keyvalues.join("&") +} + +pub fn scope_string(datetime: &DateTime, region: &str, service: &str) -> String { + format!( + "{date}/{region}/{service}/aws4_request", + date = datetime.format(SHORT_DATE), + region = region, + service = service + ) +} + +pub fn string_to_sign( + datetime: &DateTime, + region: &str, + canonical_req: &str, + service: &str, +) -> String { + let hash = ring::digest::digest(&ring::digest::SHA256, canonical_req.as_bytes()); + format!( + "AWS4-HMAC-SHA256\n{timestamp}\n{scope}\n{hash}", + timestamp = datetime.format(LONG_DATETIME), + scope = scope_string(datetime, region, service), + hash = hex::encode(hash.as_ref()) + ) +} + +pub fn signing_key( + datetime: &DateTime, + secret_key: &str, + region: &str, + service: &str, +) -> Result, String> { + let secret = String::from("AWS4") + secret_key; + + let date_key = ring::hmac::Key::new(ring::hmac::HMAC_SHA256, secret.as_bytes()); + let date_tag = ring::hmac::sign( + &date_key, + datetime.format(SHORT_DATE).to_string().as_bytes(), + ); + + let region_key = ring::hmac::Key::new(ring::hmac::HMAC_SHA256, date_tag.as_ref()); + let region_tag = ring::hmac::sign(®ion_key, region.to_string().as_bytes()); + + let service_key = ring::hmac::Key::new(ring::hmac::HMAC_SHA256, region_tag.as_ref()); + let service_tag = ring::hmac::sign(&service_key, service.as_bytes()); + + let signing_key = ring::hmac::Key::new(ring::hmac::HMAC_SHA256, service_tag.as_ref()); + let signing_tag = ring::hmac::sign(&signing_key, b"aws4_request"); + Ok(signing_tag.as_ref().to_vec()) +} + +#[cfg(test)] +mod tests { + use super::*; + use sha2::{Digest, Sha256}; + + #[test] + fn sample_canonical_request() { + let datetime = chrono::Utc::now(); + let url: &str = "https://hi.s3.us-east-1.amazonaws.com/Prod/graphql"; + let map: HeaderMap = HeaderMap::new(); + let checksum = data_encoding::HEXLOWER.encode(&Sha256::digest(b"")); + let aws_sign = AwsSign::new( + "GET", + url, + &datetime, + &map, + "us-east-1", + "a", + "b", + "s3", + &checksum, + ); + let s = aws_sign.canonical_request(); + assert_eq!(s, "GET\n/Prod/graphql\n\n\n\n\ne3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"); + } +} diff --git a/tests/helpers/curl.rs b/tests/helpers/curl.rs index 78827a1..7804419 100644 --- a/tests/helpers/curl.rs +++ b/tests/helpers/curl.rs @@ -1,6 +1,8 @@ use std::process::{Command, Output}; use std::{thread, time}; +const RETURNED_HEADER: &str = "/tmp/curl_headers"; + pub fn curl_get_status(url: &str) -> String { let stdout = Command::new("curl") .arg("-XGET") @@ -24,6 +26,8 @@ pub fn curl_put(file_path: &str, url: &str) -> Output { .arg(url) .arg("--data-binary") .arg(format!("@{}", file_path)) + .arg("--dump-header") + .arg(RETURNED_HEADER) .output() .expect("failed to perform upload"); @@ -92,3 +96,34 @@ pub fn curl_socket_get(url: &str) -> Output { .output() .expect("failed to perform download") } + +pub fn node_received_header(header: &str) -> Option { + let last_put_headers = curl_get("localhost:3333/last_put_headers").stdout; + let last_put_headers_string = String::from_utf8_lossy(&last_put_headers); + + use serde_json::Value; + let lookup: std::collections::HashMap = + serde_json::from_str(&last_put_headers_string).unwrap(); + + lookup.get(header).map(|h| h.to_string()) +} + +pub fn returned_header(header: &str) -> String { + read_lines(RETURNED_HEADER) + .find(|x| x.as_ref().unwrap().contains(header)) + .unwrap() + .unwrap() + .split(": ") + .nth(1) + .unwrap() + .to_string() +} + +fn read_lines

(filename: P) -> std::io::Lines> +where + P: AsRef, +{ + use std::io::BufRead; + let file = std::fs::File::open(filename).unwrap(); + std::io::BufReader::new(file).lines() +} diff --git a/tests/helpers/mod.rs b/tests/helpers/mod.rs index 862bd67..945c4a5 100644 --- a/tests/helpers/mod.rs +++ b/tests/helpers/mod.rs @@ -23,6 +23,7 @@ pub const CHUNK_SIZE: usize = 512; pub const COMPUTER_SVG_PATH: &str = "tests/fixtures/computer.svg"; pub static COMPUTER_SVG_BYTES: Bytes = Bytes::from_static(include_bytes!("../fixtures/computer.svg")); +pub const COMPUTER_SVG_MD5_ETAG: &str = "\"12ed2469072ced7b2d0e3141f0ef01f5\""; pub const ENCRYPTED_COMPUTER_SVG_PATH: &str = "tests/fixtures/computer.svg.enc"; pub static ENCRYPTED_COMPUTER_SVG_BYTES: Bytes = @@ -67,6 +68,9 @@ pub fn launch_proxy(log: PrintServerLogs, keyring_path: Option<&str>) -> ChildGu .arg("proxy") .arg("--address=localhost:4444") .arg("--upstream-url=http://localhost:3333/jail/cell") + .arg("--aws-access-key=key") + .arg("--aws-secret-key=secret") + .arg("--aws-region=region") .env("DS_KEYRING", keyring) .env("DS_PASSWORD", PASSWORD) .env("DS_SALT", SALT) @@ -189,3 +193,14 @@ pub fn add_a_key(keyring_path: &str) -> assert_cmd::assert::Assert { .assert() .success() } + +pub fn compute_sha256(file_path: &str) -> String { + use data_encoding::HEXLOWER; + use sha2::{Digest, Sha256}; + use std::{fs, io}; + + let mut file = fs::File::open(file_path).unwrap(); + let mut hasher = Sha256::new(); + let _n = io::copy(&mut file, &mut hasher).unwrap(); + HEXLOWER.encode(&hasher.finalize()[..]) +} diff --git a/tests/upload_and_download.rs b/tests/upload_and_download.rs index 6ad5685..c1a07a0 100644 --- a/tests/upload_and_download.rs +++ b/tests/upload_and_download.rs @@ -12,7 +12,8 @@ fn upload_and_download() { This test: - spawns a node server that stores uploaded files in tests/fixtures/server-static/uploads/ - spawns a ds proxy that uses the node proxy as a storage backend - - uploads a file using curl via the DS proxy + - uploads a file using curl via the DS proxy and check correct uploaded md5 + - checks amz headers - checks that said file is encrypted - decrypt the uploaded file by the decrypted command and check the result - downloads the uploaded file via the proxy, and checks that its content matches the initial content @@ -28,10 +29,19 @@ fn upload_and_download() { let _proxy_and_node = ProxyAndNode::start(); curl_put(COMPUTER_SVG_PATH, "localhost:4444/upstream/victory"); + assert_eq!(returned_header("etag"), COMPUTER_SVG_MD5_ETAG); + + assert!(node_received_header("x-amz-date").is_some()); + assert!(node_received_header("authorization").is_some()); let uploaded_bytes = std::fs::read(uploaded_path).expect("uploaded should exist !"); assert_eq!(&uploaded_bytes[0..PREFIX_SIZE], PREFIX); + assert_eq!( + format!("\"{}\"", compute_sha256(uploaded_path)), + node_received_header("x-amz-content-sha256").unwrap() + ); + decrypt(uploaded_path, decrypted_path); let decrypted_bytes = std::fs::read(decrypted_path).unwrap(); assert_eq!(decrypted_bytes, COMPUTER_SVG_BYTES);