diff --git a/Cargo.lock b/Cargo.lock index efae5b1c..d009a30f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -104,9 +104,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" +checksum = "b84bf0a05bbb2a83e5eb6fa36bb6e87baa08193c35ff52bbf6b38d8af2890e46" [[package]] name = "anstyle-parse" @@ -199,7 +199,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.33", ] [[package]] @@ -210,7 +210,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.33", ] [[package]] @@ -245,13 +245,13 @@ dependencies = [ "aws-smithy-json", "aws-smithy-types", "aws-types", - "bytes 1.4.0", + "bytes 1.5.0", "fastrand 1.9.0", "hex", "http", "hyper", "ring", - "time 0.3.28", + "time", "tokio", "tower", "tracing", @@ -296,7 +296,7 @@ dependencies = [ "aws-smithy-http", "aws-smithy-types", "aws-types", - "bytes 1.4.0", + "bytes 1.5.0", "http", "http-body", "lazy_static", @@ -326,7 +326,7 @@ dependencies = [ "aws-smithy-types", "aws-smithy-xml", "aws-types", - "bytes 1.4.0", + "bytes 1.5.0", "http", "http-body", "once_cell", @@ -355,7 +355,7 @@ dependencies = [ "aws-smithy-json", "aws-smithy-types", "aws-types", - "bytes 1.4.0", + "bytes 1.5.0", "http", "regex", "tokio-stream", @@ -382,7 +382,7 @@ dependencies = [ "aws-smithy-types", "aws-smithy-xml", "aws-types", - "bytes 1.4.0", + "bytes 1.5.0", "http", "regex", "tower", @@ -412,7 +412,7 @@ checksum = "9d2ce6f507be68e968a33485ced670111d1cbad161ddbbab1e313c03d37d8f4c" dependencies = [ "aws-smithy-eventstream", "aws-smithy-http", - "bytes 1.4.0", + "bytes 1.5.0", "form_urlencoded", "hex", "hmac", @@ -421,7 +421,7 @@ dependencies = [ "percent-encoding", "regex", "sha2", - "time 0.3.28", + "time", "tracing", ] @@ -445,7 +445,7 @@ checksum = "07ed8b96d95402f3f6b8b57eb4e0e45ee365f78b1a924faf20ff6e97abf1eae6" dependencies = [ "aws-smithy-http", "aws-smithy-types", - "bytes 1.4.0", + "bytes 1.5.0", "crc32c", "crc32fast", "hex", @@ -468,7 +468,7 @@ dependencies = [ "aws-smithy-http", "aws-smithy-http-tower", "aws-smithy-types", - "bytes 1.4.0", + "bytes 1.5.0", "fastrand 1.9.0", "http", "http-body", @@ -489,7 +489,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "460c8da5110835e3d9a717c61f5556b20d03c32a1dec57f8fc559b360f733bb8" dependencies = [ "aws-smithy-types", - "bytes 1.4.0", + "bytes 1.5.0", "crc32fast", ] @@ -501,7 +501,7 @@ checksum = "2b3b693869133551f135e1f2c77cb0b8277d9e3e17feaf2213f735857c4f0d28" dependencies = [ "aws-smithy-eventstream", "aws-smithy-types", - "bytes 1.4.0", + "bytes 1.5.0", "bytes-utils", "futures-core", "http", @@ -524,7 +524,7 @@ checksum = "3ae4f6c5798a247fac98a867698197d9ac22643596dc3777f0c76b91917616b9" dependencies = [ "aws-smithy-http", "aws-smithy-types", - "bytes 1.4.0", + "bytes 1.5.0", "http", "http-body", "pin-project-lite", @@ -561,7 +561,7 @@ dependencies = [ "itoa", "num-integer", "ryu", - "time 0.3.28", + "time", ] [[package]] @@ -598,7 +598,7 @@ dependencies = [ "async-trait", "axum-core", "bitflags 1.3.2", - "bytes 1.4.0", + "bytes 1.5.0", "futures-util", "headers", "http", @@ -629,7 +629,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" dependencies = [ "async-trait", - "bytes 1.4.0", + "bytes 1.5.0", "futures-util", "http", "http-body", @@ -647,7 +647,7 @@ checksum = "a93e433be9382c737320af3924f7d5fc6f89c155cf2bf88949d8f5126fab283f" dependencies = [ "axum", "axum-core", - "bytes 1.4.0", + "bytes 1.5.0", "futures-util", "http", "http-body", @@ -671,7 +671,7 @@ dependencies = [ "cfg-if", "libc", "miniz_oxide", - "object 0.32.0", + "object 0.32.1", "rustc-demangle", ] @@ -683,9 +683,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.3" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414dcefbc63d77c526a76b3afcf6fbb9b5e2791c19c3aa2297733208750c6e53" +checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" [[package]] name = "base64-simd" @@ -718,13 +718,13 @@ dependencies = [ "lazy_static", "lazycell", "peeking_take_while", - "prettyplease 0.2.12", + "prettyplease", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 2.0.29", + "syn 2.0.33", ] [[package]] @@ -772,7 +772,7 @@ dependencies = [ "async-compression", "aws-config", "aws-sdk-s3", - "bytes 1.4.0", + "bytes 1.5.0", "chrono", "crc", "futures", @@ -825,28 +825,28 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "bytemuck" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdde5c9cd29ebd706ce1b35600920a33550e402fc998a2e53ad3b42c3c47a192" +checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.33", ] [[package]] @@ -863,9 +863,9 @@ checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" dependencies = [ "serde", ] @@ -876,7 +876,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e47d3a8076e283f3acd27400535992edb3ba4b5bb72f8891ad8fbe7932a7d4b9" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "either", ] @@ -976,16 +976,15 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.27" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56b4c72906975ca04becb8a30e102dfecddd0c06181e3e95ddc444be28881f8" +checksum = "defd4e7873dbddba6c7c91e199c7fcb946abc4a6a4ac3195400bcfb01b5de877" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "serde", - "time 0.1.45", "wasm-bindgen", "windows-targets 0.48.5", ] @@ -1003,20 +1002,19 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.1" +version = "4.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c8d502cbaec4595d2e7d5f61e318f05417bd2b66fdc3809498f0d3fdf0bea27" +checksum = "84ed82781cea27b43c9b106a979fe450a13a31aab0500595fb3fc06616de08e6" dependencies = [ "clap_builder", "clap_derive", - "once_cell", ] [[package]] name = "clap_builder" -version = "4.4.1" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5891c7bc0edb3e1c2204fc5e94009affabeb1821c9e5fdc3959536c5c0bb984d" +checksum = "2bb9faaa7c2ef94b2743a21f5a29e6f0010dff4caa69ac8e9d6cf8b6fa74da08" dependencies = [ "anstream", "anstyle", @@ -1026,14 +1024,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.0" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9fd1a5729c4548118d7d70ff234a44868d00489a4b6597b0b020918a0e91a1a" +checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.33", ] [[package]] @@ -1063,7 +1061,7 @@ dependencies = [ [[package]] name = "console-api" version = "0.5.0" -source = "git+https://github.com/tokio-rs/console?branch=lucio/tonic-fix#222a35edb125e0bc2bdc9323d90881f2a81eeac3" +source = "git+https://github.com/MarinPostma/console.git?branch=bump-tonic#b9e11175b81adf7b1ed9024a7ed938b74bbeb590" dependencies = [ "futures-core", "prost", @@ -1075,13 +1073,12 @@ dependencies = [ [[package]] name = "console-subscriber" version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4cf42660ac07fcebed809cfe561dd8730bcd35b075215e6479c516bcd0d11cb" +source = "git+https://github.com/MarinPostma/console.git?branch=bump-tonic#b9e11175b81adf7b1ed9024a7ed938b74bbeb590" dependencies = [ "console-api", "crossbeam-channel", "crossbeam-utils", - "futures", + "futures-task", "hdrhistogram", "humantime", "prost-types", @@ -1255,7 +1252,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "itertools", + "itertools 0.10.5", "log", "smallvec", "wasmparser", @@ -1401,7 +1398,7 @@ checksum = "53e0efad4403bfc52dc201159c4b842a246a14b98c64b55dfd0f2d89729dfeb8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.33", ] [[package]] @@ -1585,7 +1582,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b0377f1edc77dbd1118507bc7a66e4ab64d2b90c66f90726dc801e73a8c68f9" dependencies = [ "cfg-if", - "rustix 0.38.10", + "rustix 0.38.13", "windows-sys 0.48.0", ] @@ -1664,7 +1661,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d167b646a876ba8fda6b50ac645cfd96242553cbaf0ca4fccaa39afcbf0801f" dependencies = [ "io-lifetimes 1.0.11", - "rustix 0.38.10", + "rustix 0.38.13", "windows-sys 0.48.0", ] @@ -1724,7 +1721,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.33", ] [[package]] @@ -1809,7 +1806,7 @@ checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", ] [[package]] @@ -1841,7 +1838,7 @@ version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "fnv", "futures-core", "futures-sink", @@ -1903,13 +1900,12 @@ dependencies = [ [[package]] name = "headers" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" +checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" dependencies = [ - "base64 0.13.1", - "bitflags 1.3.2", - "bytes 1.4.0", + "base64 0.21.4", + "bytes 1.5.0", "headers-core", "http", "httpdate", @@ -1953,13 +1949,22 @@ dependencies = [ "digest", ] +[[package]] +name = "home" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +dependencies = [ + "windows-sys 0.48.0", +] + [[package]] name = "http" version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "fnv", "itoa", ] @@ -1970,7 +1975,7 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "http", "pin-project-lite", ] @@ -2005,7 +2010,7 @@ version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "futures-channel", "futures-core", "futures-util", @@ -2052,6 +2057,21 @@ dependencies = [ "tokio-rustls 0.24.1", ] +[[package]] +name = "hyper-rustls" +version = "0.24.1" +source = "git+https://github.com/MarinPostma/hyper-rustls.git?branch=generic-tls-acceptor#7652e4c4732f624e3866f8a1ccf891f9629e226a" +dependencies = [ + "futures-util", + "http", + "hyper", + "log", + "rustls 0.21.7", + "rustls-native-certs", + "tokio", + "tokio-rustls 0.24.1", +] + [[package]] name = "hyper-timeout" version = "0.4.1" @@ -2070,7 +2090,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "hyper", "native-tls", "tokio", @@ -2188,9 +2208,9 @@ dependencies = [ [[package]] name = "inventory" -version = "0.3.11" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a53088c87cf71c9d4f3372a2cb9eea1e7b8a0b1bf8b7f7d23fe5b76dbb07e63b" +checksum = "e1be380c410bf0595e94992a648ea89db4dd3f3354ba54af206fd2a68cf5ac8e" [[package]] name = "io-extras" @@ -2232,7 +2252,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi", - "rustix 0.38.10", + "rustix 0.38.13", "windows-sys 0.48.0", ] @@ -2245,6 +2265,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.9" @@ -2295,7 +2324,7 @@ version = "8.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" dependencies = [ - "base64 0.21.3", + "base64 0.21.4", "pem", "ring", "serde", @@ -2323,9 +2352,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" [[package]] name = "libloading" @@ -2345,9 +2374,9 @@ checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" [[package]] name = "libmimalloc-sys" -version = "0.1.34" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25d058a81af0d1c22d7a1c948576bee6d673f7af3c0f35564abd6c81122f513d" +checksum = "3979b5c37ece694f1f5e51e7ecc871fdb0f517ed04ee45f88d15d6d553cb9664" dependencies = [ "cc", "libc", @@ -2361,7 +2390,7 @@ checksum = "9c7b1c078b4d3d45ba0db91accc23dcb8d2761d67f819efd94293065597b7ac8" dependencies = [ "anyhow", "async-trait", - "base64 0.21.3", + "base64 0.21.4", "num-traits", "reqwest", "serde_json", @@ -2381,7 +2410,7 @@ dependencies = [ [[package]] name = "libsqlite3-sys" version = "0.26.0" -source = "git+https://github.com/psarna/rusqlite?rev=477264453b#477264453b3a254bce04ad9b27c4777eee73467c" +source = "git+https://github.com/psarna/rusqlite?rev=2e28bca6#2e28bca6e8ebe8e9496b6bccb7e983ccf3dfad1f" dependencies = [ "bindgen", "cc", @@ -2404,9 +2433,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.5" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" +checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" [[package]] name = "lock_api" @@ -2471,9 +2500,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.6.1" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f478948fd84d9f8e86967bf432640e46adfb5a4bd4f14ef7e864ab38220534ae" +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "memfd" @@ -2523,9 +2552,9 @@ dependencies = [ [[package]] name = "mimalloc" -version = "0.1.38" +version = "0.1.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "972e5f23f6716f62665760b0f4cbf592576a80c7b879ba9beaafc0e558894127" +checksum = "fa01922b5ea280a911e323e4d2fd24b7fe5cc4042e0d2cda3c40775cdc4bdc9c" dependencies = [ "libmimalloc-sys", ] @@ -2558,7 +2587,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys 0.48.0", ] @@ -2689,9 +2718,9 @@ dependencies = [ [[package]] name = "object" -version = "0.32.0" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ "memchr", ] @@ -2754,7 +2783,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.33", ] [[package]] @@ -2765,9 +2794,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.92" +version = "0.9.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db7e971c2c2bba161b2d2fdf37080177eff520b3bc044787c7f1f5f9e78d869b" +checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" dependencies = [ "cc", "libc", @@ -2923,7 +2952,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.33", ] [[package]] @@ -2952,7 +2981,7 @@ checksum = "4d0ade207138f12695cb4be3b590283f1cf764c5c4909f39966c4b4b0dba7c1e" dependencies = [ "base64 0.13.1", "byteorder", - "bytes 1.4.0", + "bytes 1.5.0", "chrono", "containers-api", "flate2", @@ -2988,22 +3017,12 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "prettyplease" -version = "0.1.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" -dependencies = [ - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "prettyplease" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c64d9ba0963cdcea2e1b2230fbae2bab30eb25a174be395c41e764bfb65dd62" +checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "syn 2.0.29", + "syn 2.0.33", ] [[package]] @@ -3018,9 +3037,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" dependencies = [ "unicode-ident", ] @@ -3047,54 +3066,54 @@ dependencies = [ [[package]] name = "prost" -version = "0.11.9" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" +checksum = "aa8473a65b88506c106c28ae905ca4a2b83a2993640467a41bb3080627ddfd2c" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "prost-derive", ] [[package]] name = "prost-build" -version = "0.11.9" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" +checksum = "30d3e647e9eb04ddfef78dfee2d5b3fefdf94821c84b710a3d8ebc89ede8b164" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "heck", - "itertools", - "lazy_static", + "itertools 0.11.0", "log", "multimap", + "once_cell", "petgraph", - "prettyplease 0.1.25", + "prettyplease", "prost", "prost-types", "regex", - "syn 1.0.109", + "syn 2.0.33", "tempfile", "which", ] [[package]] name = "prost-derive" -version = "0.11.9" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" +checksum = "56075c27b20ae524d00f247b8a4dc333e5784f889fe63099f8e626bc8d73486c" dependencies = [ "anyhow", - "itertools", + "itertools 0.11.0", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.33", ] [[package]] name = "prost-types" -version = "0.11.9" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" +checksum = "cebe0a918c97f86c217b0f76fd754e966f8b9f41595095cf7d74cb4e59d730f6" dependencies = [ "prost", ] @@ -3257,13 +3276,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12de2eff854e5fa4b1295edd650e227e9d8fb0c9e90b12e7f36d6a6811791a29" +checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.7", + "regex-automata 0.3.8", "regex-syntax 0.7.5", ] @@ -3278,9 +3297,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49530408a136e16e5b486e883fbb6ba058e8e4e8ae6621a77b048b314336e629" +checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" dependencies = [ "aho-corasick", "memchr", @@ -3305,8 +3324,8 @@ version = "0.11.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" dependencies = [ - "base64 0.21.3", - "bytes 1.4.0", + "base64 0.21.4", + "bytes 1.5.0", "encoding_rs", "futures-core", "futures-util", @@ -3314,7 +3333,7 @@ dependencies = [ "http", "http-body", "hyper", - "hyper-rustls 0.24.1", + "hyper-rustls 0.24.1 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-tls", "ipnet", "js-sys", @@ -3359,7 +3378,7 @@ dependencies = [ [[package]] name = "rusqlite" version = "0.29.0" -source = "git+https://github.com/psarna/rusqlite?rev=477264453b#477264453b3a254bce04ad9b27c4777eee73467c" +source = "git+https://github.com/psarna/rusqlite?rev=2e28bca6#2e28bca6e8ebe8e9496b6bccb7e983ccf3dfad1f" dependencies = [ "bitflags 2.4.0", "fallible-iterator 0.2.0", @@ -3408,14 +3427,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.10" +version = "0.38.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6248e1caa625eb708e266e06159f135e8c26f2bb7ceb72dc4b2766d0340964" +checksum = "d7db8590df6dfcd144d22afd1b83b36c21a18d7cbc1dc4bb5295a8712e9eb662" dependencies = [ "bitflags 2.4.0", "errno", "libc", - "linux-raw-sys 0.4.5", + "linux-raw-sys 0.4.7", "windows-sys 0.48.0", ] @@ -3461,14 +3480,14 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.21.3", + "base64 0.21.4", ] [[package]] name = "rustls-webpki" -version = "0.101.4" +version = "0.101.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d93931baf2d282fff8d3a532bbfd7653f734643161b87e3e01e59a04439bf0d" +checksum = "45a27e3b59326c16e23d30aeb7a36a24cc0d29e71d68ff611cdfb4a01d013bed" dependencies = [ "ring", "untrusted", @@ -3569,14 +3588,14 @@ checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.33", ] [[package]] name = "serde_json" -version = "1.0.105" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ "indexmap 2.0.0", "itoa", @@ -3635,7 +3654,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7895c8ae88588ccead14ff438b939b0c569cd619116f14b4d13fdff7b8333386" dependencies = [ "async-trait", - "bytes 1.4.0", + "bytes 1.5.0", "hex", "sha2", "tokio", @@ -3661,9 +3680,9 @@ dependencies = [ [[package]] name = "shlex" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" +checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" [[package]] name = "signal-hook-registry" @@ -3689,7 +3708,7 @@ dependencies = [ "num-bigint", "num-traits", "thiserror", - "time 0.3.28", + "time", ] [[package]] @@ -3731,9 +3750,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" dependencies = [ "libc", "windows-sys 0.48.0", @@ -3757,11 +3776,11 @@ dependencies = [ "aws-sdk-s3", "axum", "axum-extra", - "base64 0.21.3", + "base64 0.21.4", "bincode", "bottomless", "bytemuck", - "bytes 1.4.0", + "bytes 1.5.0", "bytesize", "chrono", "clap", @@ -3775,9 +3794,10 @@ dependencies = [ "futures-core", "hmac", "hyper", + "hyper-rustls 0.24.1 (git+https://github.com/MarinPostma/hyper-rustls.git?branch=generic-tls-acceptor)", "hyper-tungstenite", "insta", - "itertools", + "itertools 0.10.5", "jsonwebtoken", "libsql-client", "memmap", @@ -3795,6 +3815,8 @@ dependencies = [ "regex", "reqwest", "rusqlite", + "rustls 0.21.7", + "rustls-pemfile", "semver", "serde", "serde_json", @@ -3881,9 +3903,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.29" +version = "2.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" +checksum = "9caece70c63bfba29ec2fed841a09851b14a235c60010fa4de58089b6c025668" dependencies = [ "proc-macro2", "quote", @@ -3907,9 +3929,9 @@ dependencies = [ "cap-std", "fd-lock", "io-lifetimes 2.0.2", - "rustix 0.38.10", + "rustix 0.38.13", "windows-sys 0.48.0", - "winx 0.36.1", + "winx 0.36.2", ] [[package]] @@ -3938,7 +3960,7 @@ dependencies = [ "cfg-if", "fastrand 2.0.0", "redox_syscall 0.3.5", - "rustix 0.38.10", + "rustix 0.38.13", "windows-sys 0.48.0", ] @@ -3965,22 +3987,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.47" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" +checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.47" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" +checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.33", ] [[package]] @@ -3993,17 +4015,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - [[package]] name = "time" version = "0.3.28" @@ -4056,14 +4067,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" dependencies = [ "backtrace", - "bytes 1.4.0", + "bytes 1.5.0", "libc", "mio", "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.3", + "socket2 0.5.4", "tokio-macros", "tracing", "windows-sys 0.48.0", @@ -4087,7 +4098,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.33", ] [[package]] @@ -4150,7 +4161,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "futures-core", "futures-sink", "pin-project-lite", @@ -4169,14 +4180,14 @@ dependencies = [ [[package]] name = "tonic" -version = "0.9.2" -source = "git+https://github.com/hyperium/tonic#2325e3293b8a54f3412a8c9a5fcac064fa82db56" +version = "0.10.0" +source = "git+https://github.com/hyperium/tonic#6af8d5cc31a068d78c4a7937ad2eadb073e06025" dependencies = [ "async-stream", "async-trait", "axum", - "base64 0.21.3", - "bytes 1.4.0", + "base64 0.21.4", + "bytes 1.5.0", "h2", "http", "http-body", @@ -4198,31 +4209,31 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.9.2" -source = "git+https://github.com/hyperium/tonic#2325e3293b8a54f3412a8c9a5fcac064fa82db56" +version = "0.10.0" +source = "git+https://github.com/hyperium/tonic#6af8d5cc31a068d78c4a7937ad2eadb073e06025" dependencies = [ - "prettyplease 0.2.12", + "prettyplease", "proc-macro2", "prost-build", "quote", - "syn 2.0.29", + "syn 2.0.33", ] [[package]] name = "tonic-web" -version = "0.9.2" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b00ec4842256d1fe0a46176e2ef5bc357664c66e7d91aff5a7d43d83a65f47" +checksum = "605028b8adec50b03ee93c1cf6a9dd0d861f508d82fbda569f4a813b411862c1" dependencies = [ - "base64 0.21.3", - "bytes 1.4.0", - "futures-core", + "base64 0.21.4", + "bytes 1.5.0", "http", "http-body", "hyper", "pin-project 1.1.3", + "tokio-stream", "tonic", - "tower-http 0.4.3", + "tower-http 0.4.4", "tower-layer", "tower-service", "tracing", @@ -4256,7 +4267,7 @@ checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" dependencies = [ "async-compression", "bitflags 1.3.2", - "bytes 1.4.0", + "bytes 1.5.0", "futures-core", "futures-util", "http", @@ -4272,12 +4283,12 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ae70283aba8d2a8b411c695c437fe25b8b5e44e23e780662002fc72fb47a82" +checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ "bitflags 2.4.0", - "bytes 1.4.0", + "bytes 1.5.0", "futures-core", "futures-util", "http", @@ -4321,7 +4332,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.33", ] [[package]] @@ -4386,7 +4397,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15fba1a6d6bb030745759a9a2a588bfe8490fc8b4751a277db3a0be1c9ebbf67" dependencies = [ "byteorder", - "bytes 1.4.0", + "bytes 1.5.0", "data-encoding", "http", "httparse", @@ -4436,9 +4447,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -4521,13 +4532,13 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "vergen" -version = "8.2.4" +version = "8.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbc5ad0d9d26b2c49a5ab7da76c3e79d3ee37e7821799f8223fcb8f2f391a2e7" +checksum = "85e7dc29b3c54a2ea67ef4f953d5ec0c4085035c0ae2d325be1c0d2144bd9f16" dependencies = [ "anyhow", "rustversion", - "time 0.3.28", + "time", ] [[package]] @@ -4560,12 +4571,6 @@ dependencies = [ "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" @@ -4637,7 +4642,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.33", "wasm-bindgen-shared", ] @@ -4671,7 +4676,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.33", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4752,7 +4757,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6107809b2d9f5b2fd3ddbaddb3bb92ff8048b62f4030debf1408119ffd38c6cb" dependencies = [ "anyhow", - "base64 0.21.3", + "base64 0.21.4", "bincode", "directories-next", "file-per-thread-logger", @@ -5008,9 +5013,9 @@ dependencies = [ [[package]] name = "webpki" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +checksum = "f0e74f82d49d545ad128049b7e88f6576df2da6b02e9ce565c6f533be576957e" dependencies = [ "ring", "untrusted", @@ -5024,13 +5029,14 @@ checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" [[package]] name = "which" -version = "4.4.0" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" dependencies = [ "either", - "libc", + "home", "once_cell", + "rustix 0.38.13", ] [[package]] @@ -5270,9 +5276,9 @@ dependencies = [ [[package]] name = "winx" -version = "0.36.1" +version = "0.36.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4857cedf8371f690bb6782a3e2b065c54d1b6661be068aaf3eac8b45e813fdf8" +checksum = "357bb8e2932df531f83b052264b050b81ba0df90ee5a59b2d1d3949f344f81e5" dependencies = [ "bitflags 2.4.0", "windows-sys 0.48.0", @@ -5364,3 +5370,8 @@ dependencies = [ "libc", "pkg-config", ] + +[[patch.unused]] +name = "console-api" +version = "0.5.0" +source = "git+https://github.com/tokio-rs/console?branch=lucio/tonic-fix#222a35edb125e0bc2bdc9323d90881f2a81eeac3" diff --git a/sqld/Cargo.toml b/sqld/Cargo.toml index fcffd2f2..4008ea09 100644 --- a/sqld/Cargo.toml +++ b/sqld/Cargo.toml @@ -17,7 +17,8 @@ bytemuck = { version = "1.13.0", features = ["derive"] } bytes = { version = "1.2.1", features = ["serde"] } bytesize = "1.2.0" clap = { version = "4.0.23", features = [ "derive", "env", "string" ] } -console-subscriber = { version = "0.1.10", optional = true } +# console-subscriber = { version = "0.1.10", optional = true } +console-subscriber = { git = "https://github.com/MarinPostma/console.git", branch = "bump-tonic", optional = true } crc = "3.0.0" crossbeam = "0.8.2" enclose = "1.1" @@ -36,7 +37,7 @@ once_cell = "1.17.0" parking_lot = "0.12.1" pin-project-lite = "0.2.13" priority-queue = "1.3" -prost = "0.11.3" +prost = "0.12" rand = "0.8" regex = "1.7.0" reqwest = { version = "0.11.16", features = ["json", "rustls-tls"], default-features = false } @@ -54,8 +55,8 @@ tokio = { version = "1.22.2", features = ["rt-multi-thread", "net", "io-std", "i tokio-stream = "0.1.11" tokio-tungstenite = "0.19" tokio-util = { version = "0.7.8", features = ["io", "io-util"] } -tonic = { version = "0.9.2", features = ["tls"] } -tonic-web = "0.9" +tonic = { version = "0.10.0", features = ["tls"] } +tonic-web = "0.10" tower = { version = "0.4.13", features = ["make"] } tower-http = { version = "0.3.5", features = ["compression-full", "cors", "trace"] } tracing = "0.1.37" @@ -64,6 +65,10 @@ tracing-subscriber = { version = "0.3.16", features = ["env-filter"] } url = { version = "2.3", features = ["serde"] } uuid = { version = "1.3", features = ["v4", "serde"] } chrono = { version = "0.4.26", features = ["serde"] } +# hyper-rustls = "0.24.1" +hyper-rustls = { git = "https://github.com/MarinPostma/hyper-rustls.git", branch = "generic-tls-acceptor" } +rustls-pemfile = "1.0.3" +rustls = "0.21.7" [dev-dependencies] proptest = "1.0.0" @@ -78,9 +83,9 @@ aws-config = "0.55" aws-sdk-s3 = "0.28" [build-dependencies] -prost-build = "0.11.4" +prost-build = "0.12.0" protobuf-src = "1.1.0" -tonic-build = "0.9" +tonic-build = "0.10" vergen = { version = "8", features = ["build", "git", "gitcl"] } [features] diff --git a/sqld/src/hrana/ws/mod.rs b/sqld/src/hrana/ws/mod.rs index b8a0f941..a939825d 100644 --- a/sqld/src/hrana/ws/mod.rs +++ b/sqld/src/hrana/ws/mod.rs @@ -7,7 +7,6 @@ use anyhow::Result; use enclose::enclose; use tokio::pin; use tokio::sync::{mpsc, oneshot}; -use tonic::transport::server::Connected; use crate::auth::Auth; use crate::namespace::{MakeNamespace, NamespaceStore}; diff --git a/sqld/src/net.rs b/sqld/src/net.rs index 78a7c112..3a7cb7bb 100644 --- a/sqld/src/net.rs +++ b/sqld/src/net.rs @@ -6,6 +6,7 @@ use std::task::{ready, Context, Poll}; use hyper::server::accept::Accept as HyperAccept; use hyper::Uri; +use hyper_rustls::acceptor::TlsStream; use pin_project_lite::pin_project; use tokio::io::{AsyncRead, AsyncWrite}; use tonic::transport::server::{Connected, TcpConnectInfo}; @@ -31,12 +32,13 @@ where type Err = Self::Error; } -pub trait Conn: - AsyncRead + AsyncWrite + Unpin + Send + 'static + Connected -{ +pub trait Conn: AsyncRead + AsyncWrite + Unpin + Send + 'static { + fn connect_info(&self) -> TcpConnectInfo; } -pub trait Accept: HyperAccept + Send + 'static { +pub trait Accept: + HyperAccept + Unpin + Send + 'static +{ type Connection: Conn; } @@ -87,7 +89,17 @@ impl Accept for AddrIncoming { type Connection = AddrStream; } -impl Conn for AddrStream {} +impl Conn for AddrStream { + fn connect_info(&self) -> TcpConnectInfo { + ::connect_info(self) + } +} + +impl Conn for TlsStream { + fn connect_info(&self) -> TcpConnectInfo { + self.io().unwrap().connect_info() + } +} impl AsyncRead for AddrStream { fn poll_read( diff --git a/sqld/src/rpc/mod.rs b/sqld/src/rpc/mod.rs index 19134c37..41ff40b3 100644 --- a/sqld/src/rpc/mod.rs +++ b/sqld/src/rpc/mod.rs @@ -1,5 +1,10 @@ +use std::sync::Arc; + use anyhow::Context; use bytes::Bytes; +use hyper_rustls::TlsAcceptor; +use rustls::server::AllowAnyAuthenticatedClient; +use rustls::RootCertStore; use tonic::Status; use tower::util::option_layer; @@ -39,33 +44,62 @@ pub async fn run_rpc_server( // tracing::info!("serving write proxy server at {addr}"); - let mut builder = tonic::transport::Server::builder(); if let Some(tls_config) = maybe_tls { - let cert_pem = std::fs::read_to_string(&tls_config.cert)?; - let key_pem = std::fs::read_to_string(&tls_config.key)?; - let identity = tonic::transport::Identity::from_pem(cert_pem, key_pem); + let cert_pem = tokio::fs::read_to_string(&tls_config.cert).await?; + let certs = rustls_pemfile::certs(&mut cert_pem.as_bytes())?; + let certs = certs + .into_iter() + .map(rustls::Certificate) + .collect::>(); + + let key_pem = tokio::fs::read_to_string(&tls_config.key).await?; + let keys = rustls_pemfile::pkcs8_private_keys(&mut key_pem.as_bytes())?; + let key = rustls::PrivateKey(keys[0].clone()); let ca_cert_pem = std::fs::read_to_string(&tls_config.ca_cert)?; - let ca_cert = tonic::transport::Certificate::from_pem(ca_cert_pem); - - let tls_config = tonic::transport::ServerTlsConfig::new() - .identity(identity) - .client_ca_root(ca_cert); - builder = builder - .tls_config(tls_config) - .context("Failed to read the TSL config of RPC server")?; + let ca_certs = rustls_pemfile::certs(&mut ca_cert_pem.as_bytes())?; + let ca_certs = ca_certs + .into_iter() + .map(rustls::Certificate) + .collect::>(); + + let mut roots = RootCertStore::empty(); + ca_certs.iter().try_for_each(|c| roots.add(c))?; + let verifier = AllowAnyAuthenticatedClient::new(roots); + let config = rustls::server::ServerConfig::builder() + .with_safe_defaults() + .with_client_cert_verifier(Arc::new(verifier)) + .with_single_cert(certs, key)?; + + let acceptor = TlsAcceptor::builder() + .with_tls_config(config) + .with_all_versions_alpn() + .with_acceptor(acceptor); + + let router = tonic::transport::Server::builder() + .layer(&option_layer(idle_shutdown_layer)) + .add_service(ProxyServer::new(proxy_service)) + .add_service(ReplicationLogServer::new(logger_service)) + .into_router(); + + let h2c = crate::h2c::H2cMaker::new(router); + hyper::server::Server::builder(acceptor) + .serve(h2c) + .await + .context("http server")?; + } else { + let router = tonic::transport::Server::builder() + .layer(&option_layer(idle_shutdown_layer)) + .add_service(ProxyServer::new(proxy_service)) + .add_service(ReplicationLogServer::new(logger_service)) + .into_router(); + + let h2c = crate::h2c::H2cMaker::new(router); + hyper::server::Server::builder(acceptor) + .serve(h2c) + .await + .context("http server")?; } - let router = builder - .layer(&option_layer(idle_shutdown_layer)) - .add_service(ProxyServer::new(proxy_service)) - .add_service(ReplicationLogServer::new(logger_service)) - .into_router(); - - let h2c = crate::h2c::H2cMaker::new(router); - hyper::server::Server::builder(acceptor) - .serve(h2c) - .await - .context("http server")?; Ok(()) }