From 39df25a8f646c8ed4f5e7d512a836f7ee70e31a0 Mon Sep 17 00:00:00 2001 From: Ning Sun Date: Tue, 31 Jan 2023 14:19:18 +0800 Subject: [PATCH] refactor: make postgres handler stateful (#914) * feat: update pgwire to 0.8 and unify postgres handler * fix: correct password message matching --- Cargo.lock | 847 +++++++++++------------ src/servers/Cargo.toml | 3 +- src/servers/src/postgres.rs | 79 +++ src/servers/src/postgres/auth_handler.rs | 94 +-- src/servers/src/postgres/handler.rs | 69 +- src/servers/src/postgres/server.rs | 36 +- src/servers/tests/postgres/mod.rs | 14 +- 7 files changed, 598 insertions(+), 544 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 77a91da067cc..dbb67be715e2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -35,20 +35,20 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.8", + "getrandom", "once_cell", "version_check", ] [[package]] name = "ahash" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf6ccdb167abbf410dcb915cabd428929d7f6a04980b54a11f26a39f1c7f7107" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ "cfg-if 1.0.0", "const-random", - "getrandom 0.2.8", + "getrandom", "once_cell", "version_check", ] @@ -142,7 +142,7 @@ dependencies = [ "common-error", "common-time", "datatypes", - "prost 0.11.5", + "prost 0.11.6", "snafu", "tonic", "tonic-build", @@ -165,9 +165,9 @@ checksum = "b3f9eb837c6a783fbf002e3e5cc7925a3aa6893d6d42f9169517528983777590" [[package]] name = "arc-swap" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "983cd8b9d4b02a6dc6ffa557262eb5858a27a0038ffffe21a0f133eaa819a164" +checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" [[package]] name = "array-init-cursor" @@ -181,12 +181,6 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "arrayvec" version = "0.7.2" @@ -199,7 +193,7 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fe17dc0113da7e2eaeaedbd304d347aa8ea64916d225b79a5c3f3b6b5d8da4c" dependencies = [ - "ahash 0.8.2", + "ahash 0.8.3", "arrow-array", "arrow-buffer", "arrow-cast", @@ -213,8 +207,8 @@ dependencies = [ "arrow-string", "chrono", "comfy-table", - "half 2.1.0", - "hashbrown 0.13.1", + "half 2.2.1", + "hashbrown 0.13.2", "multiversion", "num", "regex", @@ -226,13 +220,13 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9452131e027aec3276e43449162af084db611c42ef875e54d231e6580bc6254" dependencies = [ - "ahash 0.8.2", + "ahash 0.8.3", "arrow-buffer", "arrow-data", "arrow-schema", "chrono", - "half 2.1.0", - "hashbrown 0.13.1", + "half 2.2.1", + "hashbrown 0.13.2", "num", ] @@ -242,7 +236,7 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a301001e8ed7da638a12fa579ac5f3f154c44c0655f2ca6ed0f8586b418a779" dependencies = [ - "half 2.1.0", + "half 2.2.1", "num", ] @@ -288,7 +282,7 @@ checksum = "e59619d9d102e4e6b22087b2bd60c07df76fcb68683620841718f6bc8e8f02cb" dependencies = [ "arrow-buffer", "arrow-schema", - "half 2.1.0", + "half 2.2.1", "num", ] @@ -306,9 +300,9 @@ dependencies = [ "bytes", "futures", "proc-macro2", - "prost 0.11.5", + "prost 0.11.6", "prost-build 0.11.3", - "prost-derive 0.11.5", + "prost-derive 0.11.6", "tokio", "tonic", "tonic-build", @@ -340,7 +334,7 @@ dependencies = [ "arrow-data", "arrow-schema", "chrono", - "half 2.1.0", + "half 2.2.1", "indexmap", "num", "serde_json", @@ -409,7 +403,7 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" dependencies = [ - "term 0.7.0", + "term", ] [[package]] @@ -470,7 +464,7 @@ dependencies = [ "slab", "socket2", "waker-fn", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] @@ -506,9 +500,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.60" +version = "0.1.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d1d8ab452a3936018a687b20e6f7cf5363d713b732b8884001317b0e48aa3" +checksum = "eff18d764974428cf3a9328e23fc5c986f5fbed46e6cd4cdf42544df5d297ec1" dependencies = [ "proc-macro2", "quote", @@ -555,9 +549,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.1" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08b108ad2665fa3f6e6a517c3d80ec3e77d224c47d605167aefaa5d7ef97fa48" +checksum = "e5694b64066a2459918d8074c2ce0d5a88f409431994c2356617c8ae0c4721fc" dependencies = [ "async-trait", "axum-core", @@ -588,9 +582,9 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79b8558f5a0581152dc94dcd289132a1d377494bdeafcd41869b3258e3e2ad92" +checksum = "1cae3e661676ffbacb30f1a824089a8c9150e71017f7e1e38f2aa32009188d34" dependencies = [ "async-trait", "bytes", @@ -605,9 +599,9 @@ dependencies = [ [[package]] name = "axum-macros" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4df0fc33ada14a338b799002f7e8657711422b25d4e16afb032708d6b185621" +checksum = "9dbcf61bed07d554bd5c225cd07bc41b793eab63e79c6f0ceac7e1aed2f1c670" dependencies = [ "heck 0.4.0", "proc-macro2", @@ -639,7 +633,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" dependencies = [ "futures-core", - "getrandom 0.2.8", + "getrandom", "instant", "pin-project-lite", "rand 0.8.5", @@ -685,12 +679,28 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +[[package]] +name = "base64ct" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf" + +[[package]] +name = "bcder" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69dfb7dc0d4aee3f8c723c43553b55662badf692b541ff8e4426df75dae8da9a" +dependencies = [ + "bytes", + "smallvec", +] + [[package]] name = "benchmarks" version = "0.1.0" dependencies = [ "arrow", - "clap 4.0.32", + "clap 4.1.4", "client", "indicatif", "itertools", @@ -798,17 +808,6 @@ dependencies = [ "digest", ] -[[package]] -name = "blake2b_simd" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587" -dependencies = [ - "arrayref", - "arrayvec 0.5.2", - "constant_time_eq 0.1.5", -] - [[package]] name = "blake3" version = "1.3.3" @@ -816,10 +815,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ae2468a89544a466886840aa467a25b766499f4f04bf7d9fcd10ecee9fccef" dependencies = [ "arrayref", - "arrayvec 0.7.2", + "arrayvec", "cc", "cfg-if 1.0.0", - "constant_time_eq 0.2.4", + "constant_time_eq", "digest", ] @@ -890,9 +889,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "2.3.2" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ad2d4653bf5ca36ae797b1f4bb4dbddb60ce49ca4aed8a2ce4829f60425b80" +checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -923,9 +922,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.11.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" +checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" [[package]] name = "bytecheck" @@ -956,9 +955,9 @@ checksum = "2c676a478f63e9fa2dd5368a42f28bba0d6c560b775f38583c8bbaa7fcd67c9c" [[package]] name = "bytemuck" -version = "1.12.3" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaa3a8d9a1ca92e282c96a32d6511b695d7d994d1d102ba85d279f9b2756947f" +checksum = "c041d3eab048880cb0b86b256447da3f18859a163c3b8d8893f4e6368abe6393" [[package]] name = "byteorder" @@ -1004,9 +1003,9 @@ checksum = "cf034765b7d19a011c6d619e880582bf95e8186b580e6fab56589872dd87dcf5" [[package]] name = "camino" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ad0e1e3e88dd237a156ab9f571021b8a158caa0ae44b1968a241efb5144c1e" +checksum = "c77df041dc383319cc661b428b6961a005db4d6808d5e12536931b1ca9556055" dependencies = [ "serde", ] @@ -1088,9 +1087,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" dependencies = [ "jobserver", ] @@ -1141,7 +1140,7 @@ dependencies = [ "num-integer", "num-traits", "serde", - "time 0.1.43", + "time 0.1.45", "wasm-bindgen", "winapi", ] @@ -1168,12 +1167,6 @@ dependencies = [ "phf_codegen 0.11.1", ] -[[package]] -name = "chunked_transfer" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff857943da45f546682664a79488be82e69e43c1a7a2307679ab9afb3a66d2e" - [[package]] name = "ciborium" version = "0.2.0" @@ -1246,13 +1239,13 @@ dependencies = [ [[package]] name = "clap" -version = "4.0.32" +version = "4.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7db700bc935f9e43e88d00b0850dae18a63773cfbec6d8e070fccf7fef89a39" +checksum = "f13b9c79b5d1dd500d20ef541215a6423c75829ef43117e1b4d17fd8af0b5d76" dependencies = [ "bitflags", - "clap_derive 4.0.21", - "clap_lex 0.3.0", + "clap_derive 4.1.0", + "clap_lex 0.3.1", "is-terminal", "once_cell", "strsim 0.10.0", @@ -1274,9 +1267,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.0.21" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0177313f9f02afc995627906bbd8967e2be069f5261954222dac78290c2b9014" +checksum = "684a277d672e91966334af371f1a7b5833f9aa00b07c84e92fbce95e00208ce8" dependencies = [ "heck 0.4.0", "proc-macro-error", @@ -1296,9 +1289,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8" +checksum = "783fe232adfca04f90f56201b26d79682d4cd2625e0bc7290b95123afe558ade" dependencies = [ "os_str_bytes", ] @@ -1323,7 +1316,7 @@ dependencies = [ "enum_dispatch", "futures-util", "parking_lot", - "prost 0.11.5", + "prost 0.11.6", "prost 0.9.0", "rand 0.8.5", "snafu", @@ -1337,9 +1330,9 @@ dependencies = [ [[package]] name = "clipboard-win" -version = "4.4.2" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4ab1b92798304eedc095b53942963240037c0516452cb11aeba709d420b2219" +checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362" dependencies = [ "error-code", "str-buf", @@ -1389,9 +1382,9 @@ dependencies = [ [[package]] name = "comfy-table" -version = "6.1.3" +version = "6.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e621e7e86c46fd8a14c32c6ae3cb95656621b4743a27d0cffedb831d46e7ad21" +checksum = "6e7b787b0dc42e8111badfdbe4c3059158ccb2db8780352fa1b01e8ccf45cc4d" dependencies = [ "strum", "strum_macros", @@ -1491,7 +1484,7 @@ dependencies = [ "datatypes", "flatbuffers", "futures", - "prost 0.11.5", + "prost 0.11.6", "rand 0.8.5", "snafu", "tokio", @@ -1616,25 +1609,24 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd7bef69dc86e3c610e4e7aed41035e2a7ed12e72dd7530f61327a6579a4390b" +checksum = "c278839b831783b70278b14df4d45e1beb1aad306c07bb796637de9a0e323e8e" dependencies = [ "crossbeam-utils", ] [[package]] name = "console" -version = "0.15.2" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c050367d967ced717c04b65d8c619d863ef9292ce0c5760028655a2fb298718c" +checksum = "c3d79fbe8970a77e3e34151cc13d3b3e248aa0faaecb9f6091fa07ebefe5ad60" dependencies = [ - "encode_unicode", + "encode_unicode 0.3.6", "lazy_static", "libc", - "terminal_size", "unicode-width", - "winapi", + "windows-sys", ] [[package]] @@ -1643,8 +1635,8 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e57ff02e8ad8e06ab9731d5dc72dc23bef9200778eae1a89d555d8c42e5d4a86" dependencies = [ - "prost 0.11.5", - "prost-types 0.11.5", + "prost 0.11.6", + "prost-types 0.11.6", "tonic", "tracing-core", ] @@ -1661,7 +1653,7 @@ dependencies = [ "futures", "hdrhistogram", "humantime", - "prost-types 0.11.5", + "prost-types 0.11.6", "serde", "serde_json", "thread_local", @@ -1673,6 +1665,12 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "const-oid" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cec318a675afcb6a1ea1d4340e2d377e56e47c266f28043ceccbf4412ddfdd3b" + [[package]] name = "const-random" version = "0.1.15" @@ -1689,18 +1687,12 @@ version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d7d6ab3c3a2282db210df5f02c4dab6e0a7057af0fb7ebd4070f30fe05c0ddb" dependencies = [ - "getrandom 0.2.8", + "getrandom", "once_cell", "proc-macro-hack", "tiny-keccak", ] -[[package]] -name = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" - [[package]] name = "constant_time_eq" version = "0.2.4" @@ -1734,18 +1726,18 @@ dependencies = [ [[package]] name = "crc" -version = "3.0.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53757d12b596c16c78b83458d732a5d1a17ab3f53f2f7412f6fb57cc8a140ab3" +checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" dependencies = [ "crc-catalog", ] [[package]] name = "crc-catalog" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d0165d2900ae6778e36e80bbc4da3b5eefccee9ba939761f9c2882a5d9af3ff" +checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" [[package]] name = "crc32fast" @@ -1935,9 +1927,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.85" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5add3fc1717409d029b20c5b6903fc0c0b02fa6741d820054f4a2efa5e5816fd" +checksum = "322296e2f2e5af4270b54df9e85a02ff037e271af20ba3e7fe1575515dc840b8" dependencies = [ "cc", "cxxbridge-flags", @@ -1947,9 +1939,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.85" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c87959ba14bc6fbc61df77c3fcfe180fc32b93538c4f1031dd802ccb5f2ff0" +checksum = "017a1385b05d631e7875b1f151c9f012d37b53491e2a87f65bff5c262b2111d8" dependencies = [ "cc", "codespan-reporting", @@ -1962,15 +1954,15 @@ dependencies = [ [[package]] name = "cxxbridge-flags" -version = "1.0.85" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69a3e162fde4e594ed2b07d0f83c6c67b745e7f28ce58c6df5e6b6bef99dfb59" +checksum = "c26bbb078acf09bc1ecda02d4223f03bdd28bd4874edcb0379138efc499ce971" [[package]] name = "cxxbridge-macro" -version = "1.0.85" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e7e2adeb6a0d4a282e581096b06e1791532b7d576dcde5ccd9382acf55db8e6" +checksum = "357f40d1f06a24b60ae1fe122542c1fb05d28d32acb2aed064e84bc2ad1e252e" dependencies = [ "proc-macro2", "quote", @@ -2030,7 +2022,7 @@ name = "datafusion" version = "15.0.0" source = "git+https://github.com/apache/arrow-datafusion.git?rev=4917235a398ae20145c87d20984e6367dc1a0c1e#4917235a398ae20145c87d20984e6367dc1a0c1e" dependencies = [ - "ahash 0.8.2", + "ahash 0.8.3", "arrow", "async-compression", "async-trait", @@ -2047,7 +2039,7 @@ dependencies = [ "flate2", "futures", "glob", - "hashbrown 0.13.1", + "hashbrown 0.13.2", "itertools", "lazy_static", "log", @@ -2087,7 +2079,7 @@ name = "datafusion-expr" version = "15.0.0" source = "git+https://github.com/apache/arrow-datafusion.git?rev=4917235a398ae20145c87d20984e6367dc1a0c1e#4917235a398ae20145c87d20984e6367dc1a0c1e" dependencies = [ - "ahash 0.8.2", + "ahash 0.8.3", "arrow", "datafusion-common", "log", @@ -2105,7 +2097,7 @@ dependencies = [ "datafusion-common", "datafusion-expr", "datafusion-physical-expr", - "hashbrown 0.13.1", + "hashbrown 0.13.2", "log", ] @@ -2114,7 +2106,7 @@ name = "datafusion-physical-expr" version = "15.0.0" source = "git+https://github.com/apache/arrow-datafusion.git?rev=4917235a398ae20145c87d20984e6367dc1a0c1e#4917235a398ae20145c87d20984e6367dc1a0c1e" dependencies = [ - "ahash 0.8.2", + "ahash 0.8.3", "arrow", "arrow-buffer", "arrow-schema", @@ -2124,8 +2116,8 @@ dependencies = [ "datafusion-common", "datafusion-expr", "datafusion-row", - "half 2.1.0", - "hashbrown 0.13.1", + "half 2.2.1", + "hashbrown 0.13.2", "itertools", "lazy_static", "md-5", @@ -2197,7 +2189,7 @@ dependencies = [ "mito", "object-store", "pin-project", - "prost 0.11.5", + "prost 0.11.6", "query", "script", "serde", @@ -2239,6 +2231,15 @@ dependencies = [ "snafu", ] +[[package]] +name = "der" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" +dependencies = [ + "const-oid", +] + [[package]] name = "derive-new" version = "0.5.9" @@ -2256,7 +2257,16 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3" dependencies = [ - "derive_builder_macro", + "derive_builder_macro 0.11.2", +] + +[[package]] +name = "derive_builder" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" +dependencies = [ + "derive_builder_macro 0.12.0", ] [[package]] @@ -2271,13 +2281,35 @@ dependencies = [ "syn", ] +[[package]] +name = "derive_builder_core" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "derive_builder_macro" version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" dependencies = [ - "derive_builder_core", + "derive_builder_core 0.11.2", + "syn", +] + +[[package]] +name = "derive_builder_macro" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" +dependencies = [ + "derive_builder_core 0.12.0", "syn", ] @@ -2298,17 +2330,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "dirs" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901" -dependencies = [ - "libc", - "redox_users 0.3.5", - "winapi", -] - [[package]] name = "dirs" version = "4.0.0" @@ -2335,7 +2356,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" dependencies = [ "libc", - "redox_users 0.4.3", + "redox_users", "winapi", ] @@ -2346,7 +2367,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", - "redox_users 0.4.3", + "redox_users", "winapi", ] @@ -2388,9 +2409,9 @@ checksum = "c9b0705efd4599c15a38151f4721f7bc388306f61084d3bfd50bd07fbca5cb60" [[package]] name = "either" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" +checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" [[package]] name = "ena" @@ -2407,6 +2428,12 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + [[package]] name = "encoding_rs" version = "0.8.31" @@ -2424,9 +2451,9 @@ checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" [[package]] name = "enum-iterator" -version = "1.1.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a0ac4aeb3a18f92eaf09c6bb9b3ac30ff61ca95514fc58cbead1c9a6bf5401" +checksum = "91a4ec26efacf4aeff80887a175a419493cb6f8b5480d26387eb0bd038976187" dependencies = [ "enum-iterator-derive", ] @@ -2444,9 +2471,9 @@ dependencies = [ [[package]] name = "enum_dispatch" -version = "0.3.8" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eb359f1476bf611266ac1f5355bc14aeca37b299d0ebccc038ee7058891c9cb" +checksum = "11f36e95862220b211a6e2aa5eca09b4fa391b13cd52ceb8035a24bf65a79de2" dependencies = [ "once_cell", "proc-macro2", @@ -2501,7 +2528,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1259da3b15ec7e54bd7203adb2c4335adb9ca1d47b56220d650e52c247e824a" dependencies = [ "http", - "prost 0.11.5", + "prost 0.11.6", "tokio", "tokio-stream", "tonic", @@ -2550,13 +2577,13 @@ dependencies = [ [[package]] name = "fd-lock" -version = "3.0.8" +version = "3.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb21c69b9fea5e15dbc1049e4b77145dd0ba1c84019c488102de0dc4ea4b0a27" +checksum = "28c0190ff0bd3b28bfdd4d0cf9f92faa12880fb0b8ae2054723dd6c76a4efd42" dependencies = [ "cfg-if 1.0.0", "rustix", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] @@ -2567,8 +2594,8 @@ checksum = "4e884668cd0c7480504233e951174ddc3b382f7c2666e3b7310b5c4e7b0c37f9" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.2.16", - "windows-sys 0.42.0", + "redox_syscall", + "windows-sys", ] [[package]] @@ -2660,7 +2687,7 @@ dependencies = [ "meta-srv", "moka", "openmetrics-parser", - "prost 0.11.5", + "prost 0.11.6", "query", "rustls", "serde", @@ -2897,17 +2924,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.8" @@ -2935,15 +2951,15 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" +checksum = "221996f774192f0f718773def8201c4ae31f02616a54ccfc2d358bb0e5cefdec" [[package]] name = "glob" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "h2" @@ -2972,9 +2988,9 @@ checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" [[package]] name = "half" -version = "2.1.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad6a9459c9c30b177b925162351f97e7d967c7ea8bab3b8352805327daf45554" +checksum = "02b4af3693f1b705df946e9fe5631932443781d0aabb423b62fcd4d73f6d2fd0" dependencies = [ "crunchy", "num-traits", @@ -3000,11 +3016,11 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ff8ae62cd3a9102e5637afc8452c55acf3844001bd5374e0b0bd7b6616c038" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.2", + "ahash 0.8.3", ] [[package]] @@ -3238,9 +3254,9 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.17.2" +version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4295cbb7573c16d310e99e713cf9e75101eb190ab31fccd35f2d2691b4352b19" +checksum = "cef509aa9bc73864d6756f0d34d35504af3cf0844373afe9b8669a5b8005a729" dependencies = [ "console", "number_prefix", @@ -3280,19 +3296,19 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46112a93252b123d31a119a8d1a1ac19deac4fac6e0e8b0df58f0d4e5870e63c" +checksum = "e7d6c6f8c91b4b9ed43484ad1a938e393caf35960fce7f82a040497207bd8e9e" dependencies = [ "libc", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] name = "ipnet" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11b0d96e660696543b251e58030cf9787df56da39dab19ad60eae7353040917e" +checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" [[package]] name = "iri-string" @@ -3325,7 +3341,7 @@ dependencies = [ "hermit-abi 0.2.6", "io-lifetimes", "rustix", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] @@ -3408,7 +3424,7 @@ dependencies = [ "regex", "regex-syntax", "string_cache", - "term 0.7.0", + "term", "tiny-keccak", "unicode-xid", ] @@ -3741,9 +3757,9 @@ dependencies = [ [[package]] name = "matches" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" +checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "matchit" @@ -3853,7 +3869,7 @@ dependencies = [ "http-body", "lazy_static", "parking_lot", - "prost 0.11.5", + "prost 0.11.6", "regex", "serde", "serde_json", @@ -3961,7 +3977,7 @@ dependencies = [ "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] @@ -4215,14 +4231,23 @@ dependencies = [ [[package]] name = "nom" -version = "7.1.1" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ "memchr", "minimal-lexical", ] +[[package]] +name = "nom8" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae01545c9c7fc4486ab7debaf2aad7003ac19431791868fb2e8066df97fad2f8" +dependencies = [ + "memchr", +] + [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -4261,9 +4286,9 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ae39348c8bc5fbd7f40c727a9925f03517afd2ab27d46702108b6a7e5414c19" +checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" dependencies = [ "num-traits", "serde", @@ -4335,20 +4360,20 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.5.7" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf5395665662ef45796a4ff5486c5d41d29e0c09640af4c5f17fd94ee2c119c9" +checksum = "8d829733185c1ca374f17e52b762f24f535ec625d2cc1f070e34c8a9068f341b" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.5.7" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" +checksum = "2be1598bf1c313dcdd12092e3f1920f463462525a21b7b4e11b4168353d0123e" dependencies = [ - "proc-macro-crate 1.2.1", + "proc-macro-crate 1.3.0", "proc-macro2", "quote", "syn", @@ -4362,9 +4387,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.30.0" +version = "0.30.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239da7f290cfa979f43f85a8efeee9a8a76d0827c356d37f9d3d7254d6b537fb" +checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" dependencies = [ "memchr", ] @@ -4384,9 +4409,9 @@ dependencies = [ [[package]] name = "object_store" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0014545954c5023b5fb8260415e54467cde434db6c824c9028a4b329f1b28e48" +checksum = "b4201837dc4c27a8670f0363b1255cd3845a4f0c521211cced1ed14c1d0cc6d2" dependencies = [ "async-trait", "bytes", @@ -4621,18 +4646,18 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff9f3fef3968a3ec5945535ed654cb38ff72d7495a25619e2247fb15a2ed9ba" +checksum = "ba1ef8814b5c993410bb3adfad7a5ed269563e4a2f90c41f5d85be7fb47133bf" dependencies = [ "backtrace", "cfg-if 1.0.0", "libc", "petgraph", - "redox_syscall 0.2.16", + "redox_syscall", "smallvec", "thread-id", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] @@ -4641,7 +4666,7 @@ version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d906343fd18ace6b998d5074697743e8e9358efa8c3c796a1381b98cba813338" dependencies = [ - "ahash 0.8.2", + "ahash 0.8.3", "arrow-array", "arrow-buffer", "arrow-cast", @@ -4655,7 +4680,7 @@ dependencies = [ "chrono", "flate2", "futures", - "hashbrown 0.13.1", + "hashbrown 0.13.2", "lz4", "num", "num-bigint", @@ -4704,9 +4729,9 @@ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" [[package]] name = "pem" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c64931a1a212348ec4f3b4362585eca7159d0d09cbdf4a7f74f02173596fd4" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" dependencies = [ "base64 0.13.1", ] @@ -4719,9 +4744,9 @@ checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "pest" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f6e86fb9e7026527a0d46bc308b841d73170ef8f443e1807f6ef88526a816d4" +checksum = "4ab62d2fa33726dbe6321cc97ef96d8cde531e3eeaf858a058de53a8a6d40d8f" dependencies = [ "thiserror", "ucd-trie", @@ -4729,9 +4754,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96504449aa860c8dcde14f9fba5c58dc6658688ca1fe363589d6327b8662c603" +checksum = "8bf026e2d0581559db66d837fe5242320f525d85c76283c61f4d51a1238d65ea" dependencies = [ "pest", "pest_generator", @@ -4739,9 +4764,9 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "798e0220d1111ae63d66cb66a5dcb3fc2d986d520b98e49e1852bfdb11d7c5e7" +checksum = "2b27bd18aa01d91c8ed2b61ea23406a676b42d82609c6e2581fba42f0c15f17f" dependencies = [ "pest", "pest_meta", @@ -4752,13 +4777,13 @@ dependencies = [ [[package]] name = "pest_meta" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "984298b75898e30a843e278a9f2452c31e349a073a0ce6fd950a12a74464e065" +checksum = "9f02b677c1859756359fc9983c2e56a0237f18624a3789528804406b7e915e5d" dependencies = [ "once_cell", "pest", - "sha1", + "sha2", ] [[package]] @@ -4773,25 +4798,28 @@ dependencies = [ [[package]] name = "pgwire" -version = "0.6.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab6d8c74bed581ab4a5ae0393ae05dc50e6b097d6298bcf97c5c58246b74aee6" +checksum = "6594056c6fc1c40b203ce6647d55bda25f249bc2b06bffaad3a4032a6d110e88" dependencies = [ "async-trait", + "base64 0.21.0", "bytes", "derive-new", "futures", "getset", - "hex", "log", "md5", "postgres-types", "rand 0.8.5", + "ring", + "stringprep", "thiserror", "time 0.3.17", "tokio", "tokio-rustls", "tokio-util", + "x509-certificate", ] [[package]] @@ -4974,7 +5002,7 @@ dependencies = [ "libc", "log", "wepoll-ffi", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] @@ -5026,9 +5054,9 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "prettydiff" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6176190f1637d46034820b82fbe758727ccb40da9c9fc2255d695eb05ea29c" +checksum = "d593ade80c7e334ad6bffbe003afac07948b88a0ae41aa321a5cd87abf260928" dependencies = [ "ansi_term", "prettytable-rs", @@ -5037,9 +5065,9 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c8992a85d8e93a28bdf76137db888d3874e3b230dee5ed8bebac4c9f7617773" +checksum = "e97e3215779627f01ee256d2fad52f3d95e8e1c11e9fc6fd08f7cd455d5d5c78" dependencies = [ "proc-macro2", "syn", @@ -5047,15 +5075,15 @@ dependencies = [ [[package]] name = "prettytable-rs" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fd04b170004fa2daccf418a7f8253aaf033c27760b5f225889024cf66d7ac2e" +checksum = "eea25e07510aa6ab6547308ebe3c036016d162b8da920dbb079e3ba8acf3d95a" dependencies = [ - "atty", "csv", - "encode_unicode", + "encode_unicode 1.0.0", + "is-terminal", "lazy_static", - "term 0.5.2", + "term", "unicode-width", ] @@ -5080,13 +5108,12 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" +checksum = "66618389e4ec1c7afe67d51a9bf34ff9236480f8d51e7489b7d5ab0303c13f34" dependencies = [ "once_cell", - "thiserror", - "toml", + "toml_edit", ] [[package]] @@ -5199,12 +5226,12 @@ dependencies = [ [[package]] name = "prost" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c01db6702aa05baa3f57dec92b8eeeeb4cb19e894e73996b32a4093289e54592" +checksum = "21dc42e00223fc37204bd4aa177e69420c604ca4a183209a8f9de30c6d934698" dependencies = [ "bytes", - "prost-derive 0.11.5", + "prost-derive 0.11.6", ] [[package]] @@ -5241,8 +5268,8 @@ dependencies = [ "multimap", "petgraph", "prettyplease", - "prost 0.11.5", - "prost-types 0.11.5", + "prost 0.11.6", + "prost-types 0.11.6", "regex", "syn", "tempfile", @@ -5264,9 +5291,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8842bad1a5419bca14eac663ba798f6bc19c413c2fdceb5f3ba3b0932d96720" +checksum = "8bda8c0881ea9f722eb9629376db3d0b903b462477c1aafcb0566610ac28ac5d" dependencies = [ "anyhow", "itertools", @@ -5287,12 +5314,12 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "017f79637768cde62820bc2d4fe0e45daaa027755c323ad077767c6c5f173091" +checksum = "a5e0526209433e96d83d750dd81a99118edbc55739e7e61a46764fd2ad537788" dependencies = [ "bytes", - "prost 0.11.5", + "prost 0.11.6", ] [[package]] @@ -5373,7 +5400,7 @@ dependencies = [ "mach", "once_cell", "raw-cpuid", - "wasi 0.10.2+wasi-snapshot-preview1", + "wasi 0.10.0+wasi-snapshot-preview1", "web-sys", "winapi", ] @@ -5548,7 +5575,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.8", + "getrandom", ] [[package]] @@ -5588,9 +5615,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.10.1" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" +checksum = "356a0625f1954f730c0201cdab48611198dc6ce21f4acff55089b5a78e6e835b" dependencies = [ "crossbeam-channel", "crossbeam-deque", @@ -5607,12 +5634,6 @@ dependencies = [ "rand_core 0.3.1", ] -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - [[package]] name = "redox_syscall" version = "0.2.16" @@ -5622,33 +5643,22 @@ dependencies = [ "bitflags", ] -[[package]] -name = "redox_users" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d" -dependencies = [ - "getrandom 0.1.16", - "redox_syscall 0.1.57", - "rust-argon2", -] - [[package]] name = "redox_users" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.8", - "redox_syscall 0.2.16", + "getrandom", + "redox_syscall", "thiserror", ] [[package]] name = "regex" -version = "1.7.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a" +checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" dependencies = [ "aho-corasick", "memchr", @@ -5698,7 +5708,7 @@ dependencies = [ "backon", "base64 0.21.0", "bytes", - "dirs 4.0.0", + "dirs", "form_urlencoded", "hex", "hmac", @@ -5719,11 +5729,11 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.13" +version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68cc60575865c7831548863cc02356512e3f1dc2f3f82cb837d7fc4cc8f3c97c" +checksum = "21eed90ec8570952d53b772ecf8f206aa1ec9a3d76b2521c56c42973f2d91ee9" dependencies = [ - "base64 0.13.1", + "base64 0.21.0", "bytes", "encoding_rs", "futures-core", @@ -5754,6 +5764,7 @@ dependencies = [ "url", "wasm-bindgen", "wasm-bindgen-futures", + "wasm-streams", "web-sys", "winreg", ] @@ -5831,18 +5842,6 @@ dependencies = [ "serde", ] -[[package]] -name = "rust-argon2" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b18820d944b33caa75a71378964ac46f58517c92b6ae5f762636247c09e78fb" -dependencies = [ - "base64 0.13.1", - "blake2b_simd", - "constant_time_eq 0.1.5", - "crossbeam-utils", -] - [[package]] name = "rust-ini" version = "0.18.0" @@ -5855,11 +5854,11 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.27.0" +version = "1.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c321ee4e17d2b7abe12b5d20c1231db708dd36185c8a21e9de5fed6da4dbe9" +checksum = "7fe32e8c89834541077a5c5bbe5691aa69324361e27e6aeb3552a737db4a70c8" dependencies = [ - "arrayvec 0.7.2", + "arrayvec", "borsh", "bytecheck", "byteorder", @@ -5903,23 +5902,23 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.6" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4feacf7db682c6c329c4ede12649cd36ecab0f3be5b7d74e6a20304725db4549" +checksum = "d4fdebc4b395b7fbb9ab11e462e20ed9051e7b16e42d24042c776eca0ac81b03" dependencies = [ "bitflags", "errno", "io-lifetimes", "libc", "linux-raw-sys", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] name = "rustls" -version = "0.20.7" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "539a2bfe908f471bfa933876bd1eb6a19cf2176d375f82ef7f99530a40e48c2c" +checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" dependencies = [ "log", "ring", @@ -5941,11 +5940,11 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0864aeff53f8c05aa08d86e5ef839d3dfcf07aeba2db32f12db0ef716e87bd55" +checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" dependencies = [ - "base64 0.13.1", + "base64 0.21.0", ] [[package]] @@ -6179,7 +6178,7 @@ dependencies = [ "crossbeam-utils", "exitcode", "flate2", - "getrandom 0.2.8", + "getrandom", "glob", "half 1.8.2", "hex", @@ -6245,9 +6244,9 @@ checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" [[package]] name = "rustyline" -version = "10.0.0" +version = "10.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1cd5ae51d3f7bf65d7969d579d502168ef578f289452bd8ccc91de28fda20e" +checksum = "c1e83c32c3f3c33b08496e0d1df9ea8c64d39adb8eb36a1ebb1440c690697aef" dependencies = [ "bitflags", "cfg-if 1.0.0", @@ -6257,7 +6256,7 @@ dependencies = [ "libc", "log", "memchr", - "nix 0.24.3", + "nix 0.25.1", "radix_trie", "scopeguard", "unicode-segmentation", @@ -6342,12 +6341,11 @@ checksum = "ece8e78b2f38ec51c51f5d475df0a7187ba5111b2a28bdc761ee05b075d40a71" [[package]] name = "schannel" -version = "0.1.20" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" +checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" dependencies = [ - "lazy_static", - "windows-sys 0.36.1", + "windows-sys", ] [[package]] @@ -6462,9 +6460,9 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "security-framework" -version = "2.7.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" +checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" dependencies = [ "bitflags", "core-foundation", @@ -6475,9 +6473,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.6.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" +checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" dependencies = [ "core-foundation-sys", "libc", @@ -6625,6 +6623,7 @@ dependencies = [ "common-telemetry", "common-time", "datatypes", + "derive_builder 0.12.0", "digest", "futures", "hex", @@ -6640,7 +6639,7 @@ dependencies = [ "opensrv-mysql", "pgwire", "pin-project", - "prost 0.11.5", + "prost 0.11.6", "query", "rand 0.8.5", "regex", @@ -6745,6 +6744,12 @@ dependencies = [ "libc", ] +[[package]] +name = "signature" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fe458c98333f9c8152221191a77e2a44e8325d0193484af2e9421a53019e57d" + [[package]] name = "simba" version = "0.5.1" @@ -6879,6 +6884,16 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spki" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +dependencies = [ + "base64ct", + "der", +] + [[package]] name = "sql" version = "0.1.0" @@ -6905,7 +6920,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ffa69a2ae10018ec72a3cb7574e3a33a3fc322ed03740f6e435fd7f0c1db4a7" dependencies = [ "async-trait", - "derive_builder", + "derive_builder 0.11.2", "prettydiff", "serde", "thiserror", @@ -7004,7 +7019,7 @@ dependencies = [ "parquet", "paste", "planus", - "prost 0.11.5", + "prost 0.11.6", "rand 0.8.5", "regex", "serde", @@ -7032,7 +7047,7 @@ dependencies = [ "common-query", "common-time", "datatypes", - "derive_builder", + "derive_builder 0.11.2", "futures", "serde", "serde_json", @@ -7248,7 +7263,7 @@ dependencies = [ "datafusion-common", "datafusion-expr", "datatypes", - "derive_builder", + "derive_builder 0.11.2", "futures", "parquet", "parquet-format-async-temp", @@ -7292,22 +7307,11 @@ dependencies = [ "cfg-if 1.0.0", "fastrand", "libc", - "redox_syscall 0.2.16", + "redox_syscall", "remove_dir_all", "winapi", ] -[[package]] -name = "term" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edd106a334b7657c10b7c540a0106114feadeb4dc314513e97df481d5d966f42" -dependencies = [ - "byteorder", - "dirs 1.0.5", - "winapi", -] - [[package]] name = "term" version = "0.7.0" @@ -7321,23 +7325,13 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.1.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" dependencies = [ "winapi-util", ] -[[package]] -name = "terminal_size" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "termios" version = "0.3.3" @@ -7430,7 +7424,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5fdfe0627923f7411a43ec9ec9c39c3a9b4151be313e0922042581fb6c9b717f" dependencies = [ "libc", - "redox_syscall 0.2.16", + "redox_syscall", "winapi", ] @@ -7478,11 +7472,12 @@ dependencies = [ [[package]] name = "time" -version = "0.1.43" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" +checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" dependencies = [ "libc", + "wasi 0.10.0+wasi-snapshot-preview1", "winapi", ] @@ -7555,9 +7550,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.24.2" +version = "1.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a12a59981d9e3c38d216785b0c37399f6e415e8d0712047620f189371b0bb" +checksum = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af" dependencies = [ "autocfg", "bytes", @@ -7571,7 +7566,7 @@ dependencies = [ "socket2", "tokio-macros", "tracing", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] @@ -7685,13 +7680,30 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.10" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ "serde", ] +[[package]] +name = "toml_datetime" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4553f467ac8e3d374bc9a177a26801e5d0f9b211aa1673fb137a403afd1c9cf5" + +[[package]] +name = "toml_edit" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56c59d8dd7d0dcbc6428bf7aa2f0e823e26e43b3c9aca15bbc9475d23e5fa12b" +dependencies = [ + "indexmap", + "nom8", + "toml_datetime", +] + [[package]] name = "tonic" version = "0.8.3" @@ -7712,8 +7724,8 @@ dependencies = [ "hyper-timeout", "percent-encoding", "pin-project", - "prost 0.11.5", - "prost-derive 0.11.5", + "prost 0.11.6", + "prost-derive 0.11.6", "tokio", "tokio-stream", "tokio-util", @@ -7837,10 +7849,11 @@ dependencies = [ [[package]] name = "tracing-bunyan-formatter" -version = "0.3.4" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2445962f94a813b2aaea29ceeccb6dce9fd3aa5b1cb45595cde755b00d021ad" +checksum = "78fa7c4b548e5c79a0300396f36f175da001e9933dfb5960b326db25fddbaee7" dependencies = [ + "ahash 0.8.3", "gethostname", "log", "serde", @@ -7925,9 +7938,9 @@ checksum = "f1ee9bd9239c339d714d657fac840c6d2a4f9c45f4f9ec7b0975113458be78db" [[package]] name = "try-lock" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "try_from" @@ -8106,9 +8119,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.8" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" [[package]] name = "unicode-casing" @@ -8163,12 +8176,11 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "ureq" -version = "2.5.0" +version = "2.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97acb4c28a254fd7a4aeec976c46a7fa404eac4d7c134b30c75144846d7cb8f" +checksum = "338b31dd1314f68f3aabf3ed57ab922df95ffcd902476ca7ba3c4ce7b908c46d" dependencies = [ "base64 0.13.1", - "chunked_transfer", "log", "once_cell", "rustls", @@ -8202,7 +8214,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c" dependencies = [ "atomic", - "getrandom 0.2.8", + "getrandom", "rand 0.8.5", "serde", "uuid-macro-internal", @@ -8239,9 +8251,9 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "vergen" -version = "7.4.4" +version = "7.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efadd36bc6fde40c6048443897d69511a19161c0756cb704ed403f8dfd2b7d1c" +checksum = "571b69f690c855821462709b6f41d42ceccc316fbd17b60bd06d06928cfe6a99" dependencies = [ "anyhow", "cfg-if 1.0.0", @@ -8310,15 +8322,9 @@ dependencies = [ [[package]] name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" +version = "0.10.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" [[package]] name = "wasi" @@ -8392,6 +8398,19 @@ version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" +[[package]] +name = "wasm-streams" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bbae3363c08332cadccd13b67db371814cd214c2524020932f0804b8cf7c078" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "web-sys" version = "0.3.60" @@ -8432,9 +8451,9 @@ dependencies = [ [[package]] name = "which" -version = "4.3.0" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" +checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" dependencies = [ "either", "libc", @@ -8491,19 +8510,6 @@ dependencies = [ "windows_x86_64_msvc 0.39.0", ] -[[package]] -name = "windows-sys" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" -dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", -] - [[package]] name = "windows-sys" version = "0.42.0" @@ -8511,25 +8517,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.0", - "windows_i686_gnu 0.42.0", - "windows_i686_msvc 0.42.0", - "windows_x86_64_gnu 0.42.0", + "windows_aarch64_msvc 0.42.1", + "windows_i686_gnu 0.42.1", + "windows_i686_msvc 0.42.1", + "windows_x86_64_gnu 0.42.1", "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.0", + "windows_x86_64_msvc 0.42.1", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.36.1" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" [[package]] name = "windows_aarch64_msvc" @@ -8539,15 +8539,9 @@ checksum = "ec7711666096bd4096ffa835238905bb33fb87267910e154b18b44eaabb340f2" [[package]] name = "windows_aarch64_msvc" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" - -[[package]] -name = "windows_i686_gnu" -version = "0.36.1" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" [[package]] name = "windows_i686_gnu" @@ -8557,15 +8551,9 @@ checksum = "763fc57100a5f7042e3057e7e8d9bdd7860d330070251a73d003563a3bb49e1b" [[package]] name = "windows_i686_gnu" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" - -[[package]] -name = "windows_i686_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" [[package]] name = "windows_i686_msvc" @@ -8575,15 +8563,9 @@ checksum = "7bc7cbfe58828921e10a9f446fcaaf649204dcfe6c1ddd712c5eebae6bda1106" [[package]] name = "windows_i686_msvc" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" [[package]] name = "windows_x86_64_gnu" @@ -8593,21 +8575,15 @@ checksum = "6868c165637d653ae1e8dc4d82c25d4f97dd6605eaa8d784b5c6e0ab2a252b65" [[package]] name = "windows_x86_64_gnu" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" +checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.36.1" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" [[package]] name = "windows_x86_64_msvc" @@ -8617,9 +8593,9 @@ checksum = "5e4d40883ae9cae962787ca76ba76390ffa29214667a111db9e0a1ad8377e809" [[package]] name = "windows_x86_64_msvc" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" +checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" [[package]] name = "winreg" @@ -8639,6 +8615,24 @@ dependencies = [ "tap", ] +[[package]] +name = "x509-certificate" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6ae06cd45e681e1ae216e2e668e30ce1c4f02db026374bde8c0644684af1721" +dependencies = [ + "bcder", + "bytes", + "chrono", + "der", + "hex", + "pem", + "ring", + "signature", + "spki", + "thiserror", +] + [[package]] name = "xml-rs" version = "0.8.4" @@ -8656,9 +8650,9 @@ dependencies = [ [[package]] name = "zstd" -version = "0.12.1+zstd.1.5.2" +version = "0.12.2+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c947d2adc84ff9a59f2e3c03b81aa4128acf28d6ad7d56273f7e8af14e47bea" +checksum = "e9262a83dc741c0b0ffec209881b45dbc232c21b02a2b9cb1adb93266e41303d" dependencies = [ "zstd-safe", ] @@ -8675,10 +8669,11 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.4+zstd.1.5.2" +version = "2.0.5+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fa202f2ef00074143e219d15b62ffc317d17cc33909feac471c044087cad7b0" +checksum = "edc50ffce891ad571e9f9afe5039c4837bede781ac4bb13052ed7ae695518596" dependencies = [ "cc", "libc", + "pkg-config", ] diff --git a/src/servers/Cargo.toml b/src/servers/Cargo.toml index e2b3808e6e6f..cd3a73785bad 100644 --- a/src/servers/Cargo.toml +++ b/src/servers/Cargo.toml @@ -25,6 +25,7 @@ common-runtime = { path = "../common/runtime" } common-telemetry = { path = "../common/telemetry" } common-time = { path = "../common/time" } datatypes = { path = "../datatypes" } +derive_builder = "0.12" digest = "0.10" futures = "0.3" hex = { version = "0.4" } @@ -37,7 +38,7 @@ num_cpus = "1.13" once_cell = "1.16" openmetrics-parser = "0.4" opensrv-mysql = { git = "https://github.com/datafuselabs/opensrv", rev = "b44c9d1360da297b305abf33aecfa94888e1554c" } -pgwire = "0.6.3" +pgwire = "0.8" pin-project = "1.0" prost.workspace = true query = { path = "../query" } diff --git a/src/servers/src/postgres.rs b/src/servers/src/postgres.rs index 87507e998e68..b2160211a980 100644 --- a/src/servers/src/postgres.rs +++ b/src/servers/src/postgres.rs @@ -23,4 +23,83 @@ pub(crate) const METADATA_CATALOG: &str = "catalog"; /// key to store our parsed schema pub(crate) const METADATA_SCHEMA: &str = "schema"; +use std::collections::HashMap; +use std::sync::Arc; + +use derive_builder::Builder; +use pgwire::api::auth::ServerParameterProvider; +use pgwire::api::stmt::NoopQueryParser; +use pgwire::api::store::MemPortalStore; +use pgwire::api::{ClientInfo, MakeHandler}; pub use server::PostgresServer; +use session::context::{QueryContext, QueryContextRef}; + +use self::auth_handler::PgLoginVerifier; +use crate::auth::UserProviderRef; +use crate::query_handler::sql::ServerSqlQueryHandlerRef; + +pub(crate) struct GreptimeDBStartupParameters { + version: &'static str, +} + +impl GreptimeDBStartupParameters { + fn new() -> GreptimeDBStartupParameters { + GreptimeDBStartupParameters { + version: env!("CARGO_PKG_VERSION"), + } + } +} + +impl ServerParameterProvider for GreptimeDBStartupParameters { + fn server_parameters(&self, _client: &C) -> Option> + where + C: ClientInfo, + { + let mut params = HashMap::with_capacity(4); + params.insert("server_version".to_owned(), self.version.to_owned()); + params.insert("server_encoding".to_owned(), "UTF8".to_owned()); + params.insert("client_encoding".to_owned(), "UTF8".to_owned()); + params.insert("DateStyle".to_owned(), "ISO YMD".to_owned()); + + Some(params) + } +} + +pub struct PostgresServerHandler { + query_handler: ServerSqlQueryHandlerRef, + login_verifier: PgLoginVerifier, + force_tls: bool, + param_provider: Arc, + + query_ctx: QueryContextRef, + portal_store: Arc>, + query_parser: Arc, +} + +#[derive(Builder)] +pub(crate) struct MakePostgresServerHandler { + query_handler: ServerSqlQueryHandlerRef, + user_provider: Option, + #[builder(default = "Arc::new(GreptimeDBStartupParameters::new())")] + param_provider: Arc, + #[builder(default = "Arc::new(NoopQueryParser::new())")] + query_parser: Arc, + force_tls: bool, +} + +impl MakeHandler for MakePostgresServerHandler { + type Handler = Arc; + + fn make(&self) -> Self::Handler { + Arc::new(PostgresServerHandler { + query_handler: self.query_handler.clone(), + login_verifier: PgLoginVerifier::new(self.user_provider.clone()), + force_tls: self.force_tls, + param_provider: self.param_provider.clone(), + + query_ctx: QueryContext::arc(), + portal_store: Arc::new(MemPortalStore::new()), + query_parser: self.query_parser.clone(), + }) + } +} diff --git a/src/servers/src/postgres/auth_handler.rs b/src/servers/src/postgres/auth_handler.rs index 075251fd76e3..b9488da844c1 100644 --- a/src/servers/src/postgres/auth_handler.rs +++ b/src/servers/src/postgres/auth_handler.rs @@ -12,29 +12,35 @@ // See the License for the specific language governing permissions and // limitations under the License. -use std::collections::HashMap; use std::fmt::Debug; use async_trait::async_trait; use futures::{Sink, SinkExt}; -use pgwire::api::auth::{ServerParameterProvider, StartupHandler}; +use pgwire::api::auth::StartupHandler; use pgwire::api::{auth, ClientInfo, PgWireConnectionState}; use pgwire::error::{ErrorInfo, PgWireError, PgWireResult}; use pgwire::messages::response::ErrorResponse; use pgwire::messages::startup::Authentication; use pgwire::messages::{PgWireBackendMessage, PgWireFrontendMessage}; -use session::context::UserInfo; +use session::context::{QueryContextRef, UserInfo}; use snafu::ResultExt; +use super::PostgresServerHandler; use crate::auth::{Identity, Password, UserProviderRef}; use crate::error; use crate::error::Result; use crate::query_handler::sql::ServerSqlQueryHandlerRef; -struct PgLoginVerifier { +pub(crate) struct PgLoginVerifier { user_provider: Option, } +impl PgLoginVerifier { + pub(crate) fn new(user_provider: Option) -> Self { + Self { user_provider } + } +} + #[allow(dead_code)] struct LoginInfo { user: Option, @@ -107,61 +113,24 @@ impl PgLoginVerifier { } } -struct GreptimeDBStartupParameters { - version: &'static str, -} - -impl GreptimeDBStartupParameters { - fn new() -> GreptimeDBStartupParameters { - GreptimeDBStartupParameters { - version: env!("CARGO_PKG_VERSION"), - } - } -} - -impl ServerParameterProvider for GreptimeDBStartupParameters { - fn server_parameters(&self, _client: &C) -> Option> - where - C: ClientInfo, - { - let mut params = HashMap::with_capacity(4); - params.insert("server_version".to_owned(), self.version.to_owned()); - params.insert("server_encoding".to_owned(), "UTF8".to_owned()); - params.insert("client_encoding".to_owned(), "UTF8".to_owned()); - params.insert("DateStyle".to_owned(), "ISO YMD".to_owned()); - - Some(params) +fn set_query_context_from_client_info(client: &C, query_context: QueryContextRef) +where + C: ClientInfo, +{ + if let Some(current_catalog) = client.metadata().get(super::METADATA_CATALOG) { + query_context.set_current_catalog(current_catalog); } -} - -pub struct PgAuthStartupHandler { - verifier: PgLoginVerifier, - param_provider: GreptimeDBStartupParameters, - force_tls: bool, - query_handler: ServerSqlQueryHandlerRef, -} - -impl PgAuthStartupHandler { - pub fn new( - user_provider: Option, - force_tls: bool, - query_handler: ServerSqlQueryHandlerRef, - ) -> Self { - PgAuthStartupHandler { - verifier: PgLoginVerifier { user_provider }, - param_provider: GreptimeDBStartupParameters::new(), - force_tls, - query_handler, - } + if let Some(current_schema) = client.metadata().get(super::METADATA_SCHEMA) { + query_context.set_current_schema(current_schema); } } #[async_trait] -impl StartupHandler for PgAuthStartupHandler { +impl StartupHandler for PostgresServerHandler { async fn on_startup( &self, client: &mut C, - message: &PgWireFrontendMessage, + message: PgWireFrontendMessage, ) -> PgWireResult<()> where C: ClientInfo + Sink + Unpin + Send, @@ -194,7 +163,7 @@ impl StartupHandler for PgAuthStartupHandler { } } - if self.verifier.user_provider.is_some() { + if self.login_verifier.user_provider.is_some() { client.set_state(PgWireConnectionState::AuthenticationInProgress); client .send(PgWireBackendMessage::Authentication( @@ -202,14 +171,22 @@ impl StartupHandler for PgAuthStartupHandler { )) .await?; } else { - auth::finish_authentication(client, &self.param_provider).await; + set_query_context_from_client_info(client, self.query_ctx.clone()); + auth::finish_authentication(client, self.param_provider.as_ref()).await; } } - PgWireFrontendMessage::Password(ref pwd) => { + PgWireFrontendMessage::PasswordMessageFamily(pwd) => { + // the newer version of pgwire has a few variant password + // message like cleartext/md5 password, saslresponse, etc. Here + // we must manually coerce it into password + let pwd = pwd.into_password()?; + let login_info = LoginInfo::from_client_info(client); // do authenticate - let authenticate_result = - self.verifier.verify_pwd(pwd.password(), &login_info).await; + let authenticate_result = self + .login_verifier + .verify_pwd(pwd.password(), &login_info) + .await; if !matches!(authenticate_result, Ok(true)) { return send_error( client, @@ -220,7 +197,7 @@ impl StartupHandler for PgAuthStartupHandler { .await; } // do authorize - let authorize_result = self.verifier.authorize(&login_info).await; + let authorize_result = self.login_verifier.authorize(&login_info).await; if !matches!(authorize_result, Ok(true)) { return send_error( client, @@ -230,7 +207,8 @@ impl StartupHandler for PgAuthStartupHandler { ) .await; } - auth::finish_authentication(client, &self.param_provider).await; + set_query_context_from_client_info(client, self.query_ctx.clone()); + auth::finish_authentication(client, self.param_provider.as_ref()).await; } _ => {} } diff --git a/src/servers/src/postgres/handler.rs b/src/servers/src/postgres/handler.rs index dcc18f828177..c147b241207f 100644 --- a/src/servers/src/postgres/handler.rs +++ b/src/servers/src/postgres/handler.rs @@ -25,46 +25,24 @@ use futures::{future, stream, Stream, StreamExt}; use pgwire::api::portal::Portal; use pgwire::api::query::{ExtendedQueryHandler, SimpleQueryHandler}; use pgwire::api::results::{text_query_response, FieldInfo, Response, Tag, TextDataRowEncoder}; +use pgwire::api::stmt::NoopQueryParser; +use pgwire::api::store::MemPortalStore; use pgwire::api::{ClientInfo, Type}; use pgwire::error::{ErrorInfo, PgWireError, PgWireResult}; -use session::context::QueryContext; +use super::PostgresServerHandler; use crate::error::{self, Error, Result}; -use crate::query_handler::sql::ServerSqlQueryHandlerRef; - -pub struct PostgresServerHandler { - query_handler: ServerSqlQueryHandlerRef, -} - -impl PostgresServerHandler { - pub fn new(query_handler: ServerSqlQueryHandlerRef) -> Self { - PostgresServerHandler { query_handler } - } -} - -fn query_context_from_client_info(client: &C) -> Arc -where - C: ClientInfo, -{ - let query_context = QueryContext::new(); - if let Some(current_catalog) = client.metadata().get(super::METADATA_CATALOG) { - query_context.set_current_catalog(current_catalog); - } - if let Some(current_schema) = client.metadata().get(super::METADATA_SCHEMA) { - query_context.set_current_schema(current_schema); - } - - Arc::new(query_context) -} #[async_trait] impl SimpleQueryHandler for PostgresServerHandler { - async fn do_query(&self, client: &C, query: &str) -> PgWireResult> + async fn do_query(&self, _client: &C, query: &str) -> PgWireResult> where C: ClientInfo + Unpin + Send + Sync, { - let query_ctx = query_context_from_client_info(client); - let outputs = self.query_handler.do_query(query, query_ctx).await; + let outputs = self + .query_handler + .do_query(query, self.query_ctx.clone()) + .await; let mut results = Vec::with_capacity(outputs.len()); @@ -201,16 +179,43 @@ fn type_translate(origin: &ConcreteDataType) -> Result { #[async_trait] impl ExtendedQueryHandler for PostgresServerHandler { + type Statement = String; + type QueryParser = NoopQueryParser; + type PortalStore = MemPortalStore; + + fn portal_store(&self) -> Arc { + self.portal_store.clone() + } + + fn query_parser(&self) -> Arc { + self.query_parser.clone() + } + async fn do_query( &self, _client: &mut C, - _portal: &Portal, + _portal: &Portal, _max_rows: usize, ) -> PgWireResult where C: ClientInfo + Unpin + Send + Sync, { - unimplemented!() + Ok(Response::Error(Box::new(ErrorInfo::new( + "ERROR".to_owned(), + "XX000".to_owned(), + "Extended query is not implemented on this server yet".to_owned(), + )))) + } + + async fn do_describe( + &self, + _client: &mut C, + _statement: &Self::Statement, + ) -> PgWireResult> + where + C: ClientInfo + Unpin + Send + Sync, + { + Ok(vec![]) } } diff --git a/src/servers/src/postgres/server.rs b/src/servers/src/postgres/server.rs index 800f32a4745e..89018a10815d 100644 --- a/src/servers/src/postgres/server.rs +++ b/src/servers/src/postgres/server.rs @@ -25,18 +25,16 @@ use pgwire::tokio::process_socket; use tokio; use tokio_rustls::TlsAcceptor; +use super::{MakePostgresServerHandler, MakePostgresServerHandlerBuilder}; use crate::auth::UserProviderRef; use crate::error::Result; -use crate::postgres::auth_handler::PgAuthStartupHandler; -use crate::postgres::handler::PostgresServerHandler; use crate::query_handler::sql::ServerSqlQueryHandlerRef; use crate::server::{AbortableStream, BaseTcpServer, Server}; use crate::tls::TlsOption; pub struct PostgresServer { base_server: BaseTcpServer, - auth_handler: Arc, - query_handler: Arc, + make_handler: Arc, tls: TlsOption, } @@ -48,16 +46,17 @@ impl PostgresServer { io_runtime: Arc, user_provider: Option, ) -> PostgresServer { - let postgres_handler = Arc::new(PostgresServerHandler::new(query_handler.clone())); - let startup_handler = Arc::new(PgAuthStartupHandler::new( - user_provider, - tls.should_force_tls(), - query_handler, - )); + let make_handler = Arc::new( + MakePostgresServerHandlerBuilder::default() + .query_handler(query_handler.clone()) + .user_provider(user_provider.clone()) + .force_tls(tls.should_force_tls()) + .build() + .unwrap(), + ); PostgresServer { base_server: BaseTcpServer::create_server("Postgres", io_runtime), - auth_handler: startup_handler, - query_handler: postgres_handler, + make_handler, tls, } } @@ -68,14 +67,11 @@ impl PostgresServer { accepting_stream: AbortableStream, tls_acceptor: Option>, ) -> impl Future { - let auth_handler = self.auth_handler.clone(); - let query_handler = self.query_handler.clone(); - + let handler = self.make_handler.clone(); accepting_stream.for_each(move |tcp_stream| { let io_runtime = io_runtime.clone(); - let auth_handler = auth_handler.clone(); - let query_handler = query_handler.clone(); let tls_acceptor = tls_acceptor.clone(); + let handler = handler.clone(); async move { match tcp_stream { @@ -89,9 +85,9 @@ impl PostgresServer { io_runtime.spawn(process_socket( io_stream, tls_acceptor.clone(), - auth_handler.clone(), - query_handler.clone(), - query_handler.clone(), + handler.clone(), + handler.clone(), + handler, )); } }; diff --git a/src/servers/tests/postgres/mod.rs b/src/servers/tests/postgres/mod.rs index 871b08906753..0defacaacc73 100644 --- a/src/servers/tests/postgres/mod.rs +++ b/src/servers/tests/postgres/mod.rs @@ -89,13 +89,13 @@ async fn test_shutdown_pg_server_range() -> Result<()> { Ok(()) } -#[tokio::test] +#[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_schema_validating() -> Result<()> { async fn generate_server(auth_info: DatabaseAuthInfo<'_>) -> Result<(Box, u16)> { let table = MemTable::default_numbers_table(); let postgres_server = create_postgres_server(table, true, Default::default(), Some(auth_info))?; - let listening = "127.0.0.1:5432".parse::().unwrap(); + let listening = "127.0.0.1:0".parse::().unwrap(); let server_addr = postgres_server.start(listening).await.unwrap(); let server_port = server_addr.port(); Ok((postgres_server, server_port)) @@ -103,8 +103,8 @@ async fn test_schema_validating() -> Result<()> { common_telemetry::init_default_ut_logging(); let (pg_server, server_port) = generate_server(DatabaseAuthInfo { - catalog: "greptime", - schema: "public", + catalog: DEFAULT_CATALOG_NAME, + schema: DEFAULT_SCHEMA_NAME, username: "greptime", }) .await?; @@ -115,8 +115,8 @@ async fn test_schema_validating() -> Result<()> { assert!(result.is_ok()); let (pg_server, server_port) = generate_server(DatabaseAuthInfo { - catalog: "greptime", - schema: "public", + catalog: DEFAULT_CATALOG_NAME, + schema: DEFAULT_SCHEMA_NAME, username: "no_right_user", }) .await?; @@ -141,7 +141,7 @@ async fn test_shutdown_pg_server(with_pwd: bool) -> Result<()> { .to_string() .contains("Postgres server is not started.")); - let listening = "127.0.0.1:5432".parse::().unwrap(); + let listening = "127.0.0.1:0".parse::().unwrap(); let server_addr = postgres_server.start(listening).await.unwrap(); let server_port = server_addr.port();