diff --git a/Cargo.lock b/Cargo.lock index 837a077..fbca77c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -24,7 +24,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom 0.2.14", + "getrandom", "once_cell", "version_check", "zerocopy", @@ -40,63 +40,55 @@ dependencies = [ ] [[package]] -name = "android-tzdata" -version = "0.1.1" +name = "allocator-api2" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "anstream" -version = "0.6.13" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -104,9 +96,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "assert-json-diff" @@ -119,14 +111,15 @@ dependencies = [ ] [[package]] -name = "async-channel" -version = "1.9.0" +name = "async-broadcast" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +checksum = "20cd0e2e25ea8e5f7e9df04578dc6cf5c83577fd09b1a46aaf5c85e1c33f2a7e" dependencies = [ - "concurrent-queue", "event-listener", + "event-listener-strategy", "futures-core", + "pin-project-lite", ] [[package]] @@ -148,36 +141,58 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.73", ] [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.73", ] [[package]] -name = "atty" -version = "0.2.14" +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "aws-lc-rs" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae74d9bd0a7530e8afd1770739ad34b36838829d6ad61818f9230f683f5ad77" dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", + "aws-lc-sys", + "mirai-annotations", + "paste", + "zeroize", ] [[package]] -name = "autocfg" -version = "1.2.0" +name = "aws-lc-sys" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +checksum = "0f0e249228c6ad2d240c2dc94b714d711629d52bad946075d8e9b2f5391f0703" +dependencies = [ + "bindgen", + "cc", + "cmake", + "dunce", + "fs_extra", + "libc", + "paste", +] [[package]] name = "backoff" @@ -185,16 +200,16 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" dependencies = [ - "getrandom 0.2.14", + "getrandom", "instant", - "rand 0.8.5", + "rand", ] [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", @@ -207,21 +222,44 @@ dependencies = [ [[package]] name = "base64" -version = "0.13.1" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64" -version = "0.20.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] -name = "base64" -version = "0.21.7" +name = "base64ct" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bindgen" +version = "0.69.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +dependencies = [ + "bitflags 2.6.0", + "cexpr", + "clang-sys", + "itertools", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash 1.1.0", + "shlex", + "syn 2.0.73", + "which 4.4.2", +] [[package]] name = "bitflags" @@ -231,9 +269,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "block-buffer" @@ -258,15 +296,28 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "cc" -version = "1.0.96" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9e8aabfac534be767c909e0690571677d49f41bd8465ae876fe043d52ba5292" +dependencies = [ + "jobserver", + "libc", +] + +[[package]] +name = "cexpr" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "065a29261d53ba54260972629f9ca6bffa69bac13cd1fed61420f7fa68b9f8bd" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] [[package]] name = "cfg-if" @@ -280,18 +331,26 @@ version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ - "android-tzdata", - "iana-time-zone", "num-traits", "serde", - "windows-targets 0.52.5", +] + +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", ] [[package]] name = "clap" -version = "4.5.4" +version = "4.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "11d8838454fda655dafd3accb2b6e2bea645b9e4078abe84a22ceb947235c5cc" dependencies = [ "clap_builder", "clap_derive", @@ -299,49 +358,58 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim 0.11.1", + "strsim", "terminal_size", ] [[package]] name = "clap_complete" -version = "4.5.2" +version = "4.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79504325bf38b10165b02e89b4347300f855f273c4cb30c4a3209e6583275e" +checksum = "1d11bff0290e9a266fc9b4ce6fa96c2bf2ca3f9724c41c10202ac1daf7a087f8" dependencies = [ "clap", ] [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.73", ] [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" + +[[package]] +name = "cmake" +version = "0.1.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" +dependencies = [ + "cc", +] [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "concurrent-queue" @@ -365,6 +433,12 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + [[package]] name = "core-foundation" version = "0.9.4" @@ -377,9 +451,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" @@ -392,18 +466,18 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crypto-common" @@ -436,11 +510,38 @@ dependencies = [ "memchr", ] +[[package]] +name = "curve25519-dalek" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest", + "fiat-crypto", + "rustc_version", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.73", +] + [[package]] name = "darling" -version = "0.14.4" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ "darling_core", "darling_macro", @@ -448,47 +549,62 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.14.4" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim 0.10.0", - "syn 1.0.109", + "strsim", + "syn 2.0.73", ] [[package]] name = "darling_macro" -version = "0.14.4" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 1.0.109", + "syn 2.0.73", ] +[[package]] +name = "data-encoding" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" + [[package]] name = "deadpool" -version = "0.9.5" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "421fe0f90f2ab22016f32a9881be5134fdd71c65298917084b0c7477cbc3856e" +checksum = "fb84100978c1c7b37f09ed3ce3e5f843af02c2a2c431bae5b19230dad2c1b490" dependencies = [ "async-trait", "deadpool-runtime", "num_cpus", - "retain_mut", "tokio", ] [[package]] name = "deadpool-runtime" -version = "0.1.3" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "092966b41edc516079bdf31ec78a2e0588d1d0c08f78b91d8307215928642b2b" + +[[package]] +name = "der" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63dfa964fe2a66f3fde91fc70b267fe193d822c7e603e2a675a49a7f46ad3f49" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "zeroize", +] [[package]] name = "derivative" @@ -532,17 +648,48 @@ dependencies = [ "winapi", ] +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + [[package]] name = "dyn-clone" version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8", + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +dependencies = [ + "curve25519-dalek", + "ed25519", + "serde", + "sha2", + "signature", + "subtle", + "zeroize", +] + [[package]] name = "either" -version = "1.11.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "encode_unicode" @@ -556,15 +703,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" -[[package]] -name = "encoding_rs" -version = "0.8.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" -dependencies = [ - "cfg-if", -] - [[package]] name = "equivalent" version = "1.0.1" @@ -573,9 +711,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -583,9 +721,24 @@ dependencies = [ [[package]] name = "event-listener" -version = "2.5.3" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" +dependencies = [ + "event-listener", + "pin-project-lite", +] [[package]] name = "fastrand" @@ -602,28 +755,43 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "bf401df4a4e3872c4fe8151134cf483738e74b67fc934d6532c882b3d24a4550" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", + "libredox", + "windows-sys 0.59.0", ] [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "7f211bbe8e69bbd0cfdea405084f128ae8b4aaa6b0b522fc8f2b009084797920" dependencies = [ "crc32fast", "miniz_oxide", ] +[[package]] +name = "fluent-uri" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17c704e9dbe1ddd863da1e6ff3567795087b1eb201ce80d8fa81162e1516500d" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "fnv" version = "1.0.7" @@ -639,6 +807,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "futures" version = "0.3.30" @@ -687,21 +861,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" -[[package]] -name = "futures-lite" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" -dependencies = [ - "fastrand 1.9.0", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] - [[package]] name = "futures-macro" version = "0.3.30" @@ -710,7 +869,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.73", ] [[package]] @@ -725,12 +884,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" -[[package]] -name = "futures-timer" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" - [[package]] name = "futures-util" version = "0.3.30" @@ -761,78 +914,86 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.16" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", - "wasi 0.9.0+wasi-snapshot-preview1", + "wasi", ] [[package]] -name = "getrandom" -version = "0.2.14" +name = "gimli" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", -] +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] -name = "gimli" -version = "0.28.1" +name = "glob" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "h2" -version = "0.3.26" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" dependencies = [ + "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "futures-util", "http", - "indexmap 2.2.6", + "indexmap", "slab", "tokio", "tokio-util", "tracing", ] -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - [[package]] name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] [[package]] -name = "heck" -version = "0.5.0" +name = "headers" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +checksum = "322106e6bd0cba2d5ead589ddb8150a13d7c4217cf80d7c4f682ca994ccc6aa9" +dependencies = [ + "base64 0.21.7", + "bytes", + "headers-core", + "http", + "httpdate", + "mime", + "sha1", +] [[package]] -name = "hermit-abi" -version = "0.1.19" +name = "headers-core" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" dependencies = [ - "libc", + "http", ] +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.3.9" @@ -850,9 +1011,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.12" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ "bytes", "fnv", @@ -861,47 +1022,32 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.6" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", "http", - "pin-project-lite", ] [[package]] -name = "http-range-header" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" - -[[package]] -name = "http-types" -version = "2.12.0" +name = "http-body-util" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e9b187a72d63adbfba487f48095306ac823049cb504ee195541e91c7775f5ad" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ - "anyhow", - "async-channel", - "base64 0.13.1", - "futures-lite", + "bytes", + "futures-util", "http", - "infer", + "http-body", "pin-project-lite", - "rand 0.7.3", - "serde", - "serde_json", - "serde_qs", - "serde_urlencoded", - "url", ] [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -911,13 +1057,12 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.28" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ "bytes", "futures-channel", - "futures-core", "futures-util", "h2", "http", @@ -926,62 +1071,82 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "smallvec", "tokio", - "tower-service", - "tracing", "want", ] [[package]] -name = "hyper-rustls" -version = "0.24.2" +name = "hyper-http-proxy" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +checksum = "5d06dbdfbacf34d996c6fb540a71a684a7aae9056c71951163af8a8a4c07b9a4" dependencies = [ + "bytes", "futures-util", + "headers", "http", "hyper", - "log", - "rustls", + "hyper-rustls", + "hyper-util", + "pin-project-lite", "rustls-native-certs", "tokio", "tokio-rustls", + "tower-service", ] [[package]] -name = "hyper-timeout" -version = "0.4.1" +name = "hyper-rustls" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" dependencies = [ + "futures-util", + "http", "hyper", - "pin-project-lite", + "hyper-util", + "log", + "rustls", + "rustls-native-certs", + "rustls-pki-types", "tokio", - "tokio-io-timeout", + "tokio-rustls", + "tower-service", + "webpki-roots", ] [[package]] -name = "iana-time-zone" -version = "0.1.60" +name = "hyper-timeout" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", + "hyper", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", ] [[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" +name = "hyper-util" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" dependencies = [ - "cc", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "pin-project-lite", + "socket2", + "tokio", + "tower", + "tower-service", + "tracing", ] [[package]] @@ -1002,22 +1167,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.3" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "indexmap" -version = "2.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown", ] [[package]] @@ -1033,17 +1188,11 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "infer" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e9829a50b42bb782c1df523f78d332fe371b10c661e78b7a3c34b0198e9fac" - [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", ] @@ -1060,16 +1209,25 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", "windows-sys 0.52.0", ] [[package]] -name = "is_ci" -version = "1.2.0" +name = "is_terminal_polyfill" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7655c9839580ee829dfacba1d1278c2b7883e50a277ff7541299489d6bdfdc45" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] [[package]] name = "itoa" @@ -1077,6 +1235,15 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + [[package]] name = "js-sys" version = "0.3.69" @@ -1088,49 +1255,60 @@ dependencies = [ [[package]] name = "json-patch" -version = "1.2.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ff1e1486799e3f64129f8ccad108b38290df9cd7015cd31bed17239f0789d6" +checksum = "5b1fb8864823fad91877e6caea0baca82e49e8db50f8e5c9f9a453e27d3330fc" dependencies = [ + "jsonptr", "serde", "serde_json", "thiserror", - "treediff", ] [[package]] -name = "jsonpath_lib" -version = "0.3.0" +name = "jsonpath-rust" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaa63191d68230cccb81c5aa23abd53ed64d83337cacbb25a7b8c7979523774f" +checksum = "19d8fe85bd70ff715f31ce8c739194b423d79811a19602115d611a3ec85d6200" dependencies = [ - "log", + "lazy_static", + "once_cell", + "pest", + "pest_derive", + "regex", + "serde_json", + "thiserror", +] + +[[package]] +name = "jsonptr" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c6e529149475ca0b2820835d3dce8fcc41c6b943ca608d32f35b449255e4627" +dependencies = [ + "fluent-uri", "serde", "serde_json", ] [[package]] name = "k8s-openapi" -version = "0.17.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1985030683a2bac402cbda61222195de80d3f66b4c87ab56e5fea379bd98c3" +checksum = "19501afb943ae5806548bc3ebd7f3374153ca057a38f480ef30adfde5ef09755" dependencies = [ - "base64 0.20.0", - "bytes", + "base64 0.22.1", "chrono", - "http", - "percent-encoding", "serde", "serde-value", "serde_json", - "url", ] [[package]] name = "kube" -version = "0.81.0" +version = "0.93.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b1627877037d7d741dea776b0794911d8dbd99a4b3a213a257238b5803c8adb" +checksum = "0365920075af1a2d23619c1ca801c492f2400157de42627f041a061716e76416" dependencies = [ "k8s-openapi", "kube-client", @@ -1141,33 +1319,35 @@ dependencies = [ [[package]] name = "kube-client" -version = "0.81.0" +version = "0.93.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ad949ca6801c01670509d4ba75f6b4d033a943ed228350a4a149333bad8c3ce" +checksum = "d81336eb3a5b10a40c97a5a97ad66622e92bad942ce05ee789edd730aa4f8603" dependencies = [ - "base64 0.20.0", + "base64 0.22.1", "bytes", "chrono", - "dirs-next", "either", "futures", + "home", "http", "http-body", + "http-body-util", "hyper", + "hyper-http-proxy", "hyper-rustls", "hyper-timeout", - "jsonpath_lib", + "hyper-util", + "jsonpath-rust", "k8s-openapi", "kube-core", "pem", - "pin-project", - "rand 0.8.5", + "rand", "rustls", "rustls-pemfile", "secrecy", "serde", "serde_json", - "serde_yaml 0.8.26", + "serde_yaml", "thiserror", "tokio", "tokio-tungstenite", @@ -1179,16 +1359,15 @@ dependencies = [ [[package]] name = "kube-core" -version = "0.81.0" +version = "0.93.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0462ca1116c464f91d46569e2a22b65949b063e9c727719eb5d8343a4495c5" +checksum = "cce373a74d787d439063cdefab0f3672860bd7bac01a38e39019177e764a0fe6" dependencies = [ "chrono", "form_urlencoded", "http", "json-patch", "k8s-openapi", - "once_cell", "schemars", "serde", "serde_json", @@ -1197,36 +1376,39 @@ dependencies = [ [[package]] name = "kube-derive" -version = "0.81.0" +version = "0.93.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae5ec79270638912775e2dfc23969a40881e650b7e1a5027213e398121d5f92" +checksum = "04a26c9844791e127329be5dce9298b03f9e2ff5939076d5438c92dea5eb78f2" dependencies = [ "darling", "proc-macro2", "quote", "serde_json", - "syn 1.0.109", + "syn 2.0.73", ] [[package]] name = "kube-runtime" -version = "0.81.0" +version = "0.93.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "982748367d2021fc898e08f8a1dffd7e1be94c13b46a347b0699ff87e507520d" +checksum = "3b84733c0fed6085c9210b43ffb96248676c1e800d0ba38d15043275a792ffa4" dependencies = [ "ahash", + "async-broadcast", + "async-stream", "async-trait", "backoff", "derivative", "futures", + "hashbrown", "json-patch", + "jsonptr", "k8s-openapi", "kube-client", "parking_lot", "pin-project", "serde", "serde_json", - "smallvec", "thiserror", "tokio", "tokio-util", @@ -1235,15 +1417,31 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.154" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" + +[[package]] +name = "libloading" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" +dependencies = [ + "cfg-if", + "windows-targets 0.52.6", +] [[package]] name = "libredox" @@ -1251,21 +1449,16 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "libc", + "redox_syscall", ] -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" @@ -1279,9 +1472,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "matchers" @@ -1294,9 +1487,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "mime" @@ -1304,24 +1497,47 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.11" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" dependencies = [ + "hermit-abi", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.0", + "wasi", + "windows-sys 0.52.0", +] + +[[package]] +name = "mirai-annotations" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9be0862c1b3f26a88803c4a49de6889c10e608b3ee9344e6ef5b45fb37ad3d1" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", ] [[package]] @@ -1336,9 +1552,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] @@ -1349,7 +1565,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", ] @@ -1361,9 +1577,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.32.2" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" dependencies = [ "memchr", ] @@ -1395,15 +1611,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" -[[package]] -name = "owo-colors" -version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" -dependencies = [ - "supports-color", -] - [[package]] name = "parking" version = "2.2.0" @@ -1412,9 +1619,9 @@ checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] name = "parking_lot" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -1428,18 +1635,25 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.1", + "redox_syscall", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + [[package]] name = "pem" -version = "1.1.1" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" dependencies = [ - "base64 0.13.1", + "base64 0.22.1", + "serde", ] [[package]] @@ -1448,6 +1662,51 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +[[package]] +name = "pest" +version = "2.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a548d2beca6773b1c244554d36fcf8548a8a58e74156968211567250e48e49a" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c93a82e8d145725dcbaf44e5ea887c8a869efdcc28706df2d08c69e17077183" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn 2.0.73", +] + +[[package]] +name = "pest_meta" +version = "2.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a941429fea7e08bedec25e4f6785b6ffaacc6b755da98df5ef3e7dcf4a124c4f" +dependencies = [ + "once_cell", + "pest", + "sha2", +] + [[package]] name = "pin-project" version = "1.1.5" @@ -1465,7 +1724,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.73", ] [[package]] @@ -1480,17 +1739,40 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + [[package]] name = "portable-atomic" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" +checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "prettyplease" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +dependencies = [ + "proc-macro2", + "syn 2.0.73", +] [[package]] name = "prettytable" @@ -1508,9 +1790,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.81" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -1524,6 +1806,54 @@ dependencies = [ "memchr", ] +[[package]] +name = "quinn" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b22d8e7369034b9a7132bc2008cac12f2013c8132b45e0554e6e20e2617f2156" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash 2.0.0", + "rustls", + "socket2", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba92fb39ec7ad06ca2582c0ca834dfeadcaf06ddfc8e635c80aa7e1c05315fdd" +dependencies = [ + "bytes", + "rand", + "ring", + "rustc-hash 2.0.0", + "rustls", + "slab", + "thiserror", + "tinyvec", + "tracing", +] + +[[package]] +name = "quinn-udp" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bffec3605b73c6f1754535084a85229fa8a30f86014e6c81aeec4abb68b0285" +dependencies = [ + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.52.0", +] + [[package]] name = "quote" version = "1.0.36" @@ -1533,19 +1863,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - [[package]] name = "rand" version = "0.8.5" @@ -1553,18 +1870,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", + "rand_chacha", + "rand_core", ] [[package]] @@ -1574,16 +1881,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", + "rand_core", ] [[package]] @@ -1592,34 +1890,16 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.14", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", + "getrandom", ] [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" -dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", ] [[package]] @@ -1628,21 +1908,21 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ - "getrandom 0.2.14", + "getrandom", "libredox", "thiserror", ] [[package]] name = "regex" -version = "1.10.4" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.6", - "regex-syntax 0.8.3", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", ] [[package]] @@ -1656,13 +1936,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", ] [[package]] @@ -1673,26 +1953,27 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reqwest" -version = "0.11.27" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "bytes", - "encoding_rs", + "futures-channel", "futures-core", "futures-util", - "h2", "http", "http-body", + "http-body-util", "hyper", "hyper-rustls", + "hyper-util", "ipnet", "js-sys", "log", @@ -1700,13 +1981,14 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "quinn", "rustls", "rustls-pemfile", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", - "system-configuration", "tokio", "tokio-rustls", "tower-service", @@ -1718,12 +2000,6 @@ dependencies = [ "winreg", ] -[[package]] -name = "retain_mut" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4389f1d5789befaf6029ebd9f7dac4af7f7e3d61b69d4f30e2ac02b57e7712b0" - [[package]] name = "ring" version = "0.17.8" @@ -1732,7 +2008,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.14", + "getrandom", "libc", "spin", "untrusted", @@ -1741,9 +2017,30 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + +[[package]] +name = "rustc_version" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] [[package]] name = "rustix" @@ -1751,7 +2048,7 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -1760,58 +2057,72 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.12" +version = "0.23.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" dependencies = [ + "aws-lc-rs", "log", + "once_cell", "ring", + "rustls-pki-types", "rustls-webpki", - "sct", + "subtle", + "zeroize", ] [[package]] name = "rustls-native-certs" -version = "0.6.3" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +checksum = "a88d6d420651b496bdd98684116959239430022a115c1240e6c3993be0b15fba" dependencies = [ "openssl-probe", "rustls-pemfile", + "rustls-pki-types", "schannel", "security-framework", ] [[package]] name = "rustls-pemfile" -version = "1.0.4" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", + "rustls-pki-types", ] +[[package]] +name = "rustls-pki-types" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" + [[package]] name = "rustls-webpki" -version = "0.101.7" +version = "0.102.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" dependencies = [ + "aws-lc-rs", "ring", + "rustls-pki-types", "untrusted", ] [[package]] name = "rustversion" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "schannel" @@ -1824,9 +2135,9 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.17" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f55c82c700538496bdc329bb4918a81f87cc8888811bd123cf325a0f2f8d309" +checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" dependencies = [ "dyn-clone", "schemars_derive", @@ -1836,14 +2147,14 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.17" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83263746fe5e32097f06356968a077f96089739c927a61450efa069905eec108" +checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.60", + "syn 2.0.73", ] [[package]] @@ -1852,16 +2163,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "secrecy" version = "0.8.0" @@ -1874,11 +2175,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -1887,19 +2188,30 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", ] +[[package]] +name = "self-replace" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7828a58998685d8bf5a3c5e7a3379a5867289c20828c3ee436280b44b598515" +dependencies = [ + "fastrand 1.9.0", + "tempfile", + "windows-sys 0.48.0", +] + [[package]] name = "self_update" -version = "0.37.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a667e18055120bcc9a658d55d36f2f6bfc82e07968cc479ee7774e3bfb501e14" +checksum = "469a3970061380c19852269f393e74c0fe607a4e23d85267382cf25486aa8de5" dependencies = [ "either", "flate2", @@ -1909,24 +2221,26 @@ dependencies = [ "quick-xml", "regex", "reqwest", + "self-replace", "semver", "serde_json", "tar", "tempfile", "urlencoding", + "zipsign-api", ] [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.200" +version = "1.0.206" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddc6f9cc94d67c0e21aaf7eda3a010fd3af78ebf6e096aa6e2e13c79749cce4f" +checksum = "5b3e4cd94123dd520a128bcd11e34d9e9e423e7e3e50425cb1b4b1e3549d0284" dependencies = [ "serde_derive", ] @@ -1943,49 +2257,38 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.200" +version = "1.0.206" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "856f046b9400cee3c8c94ed572ecdb752444c24528c035cd35882aad6f492bcb" +checksum = "fabfb6138d2383ea8208cf98ccf69cdfb1aff4088460681d84189aa259762f97" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.73", ] [[package]] name = "serde_derive_internals" -version = "0.29.0" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "330f01ce65a3a5fe59a60c82f3c9a024b573b8a6e875bd233fe5f934e71d54e3" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.73", ] [[package]] name = "serde_json" -version = "1.0.116" +version = "1.0.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +checksum = "784b6203951c57ff748476b126ccb5e8e2959a5c19e5c617ab1956be3dbc68da" dependencies = [ - "indexmap 2.2.6", "itoa", + "memchr", "ryu", "serde", ] -[[package]] -name = "serde_qs" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7715380eec75f029a4ef7de39a9200e0a63823176b759d055b613f5a87df6a6" -dependencies = [ - "percent-encoding", - "serde", - "thiserror", -] - [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -1998,25 +2301,13 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_yaml" -version = "0.8.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" -dependencies = [ - "indexmap 1.9.3", - "ryu", - "serde", - "yaml-rust", -] - [[package]] name = "serde_yaml" version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.2.6", + "indexmap", "itoa", "ryu", "serde", @@ -2034,6 +2325,17 @@ dependencies = [ "digest", ] +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + [[package]] name = "sharded-slab" version = "0.1.7" @@ -2043,6 +2345,12 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -2052,6 +2360,16 @@ dependencies = [ "libc", ] +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core", +] + [[package]] name = "slab" version = "0.4.9" @@ -2084,10 +2402,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] -name = "strsim" -version = "0.10.0" +name = "spki" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] [[package]] name = "strsim" @@ -2096,14 +2418,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] -name = "supports-color" -version = "1.3.1" +name = "subtle" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ba6faf2ca7ee42fdd458f4347ae0a9bd6bcc445ad7cb57ad82b383f18870d6f" -dependencies = [ - "atty", - "is_ci", -] +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" @@ -2118,9 +2436,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.60" +version = "2.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +checksum = "837a7e8026c6ce912ff01cefbe8cafc2f8010ac49682e2a3d9decc3bce1ecaaf" dependencies = [ "proc-macro2", "quote", @@ -2129,36 +2447,15 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" [[package]] name = "tar" -version = "0.4.40" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" dependencies = [ "filetime", "libc", @@ -2167,14 +2464,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand 2.1.0", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2200,22 +2498,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.59" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.59" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.73", ] [[package]] @@ -2230,9 +2528,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -2245,42 +2543,31 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.48.0", -] - -[[package]] -name = "tokio-io-timeout" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" -dependencies = [ - "pin-project-lite", - "tokio", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.73", ] [[package]] @@ -2290,17 +2577,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" dependencies = [ "pin-project", - "rand 0.8.5", + "rand", "tokio", ] [[package]] name = "tokio-rustls" -version = "0.24.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ "rustls", + "rustls-pki-types", "tokio", ] @@ -2330,9 +2618,9 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.18.0" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54319c93411147bced34cb5609a80e0a8e44c5999c93903a81cd866630ec0bfd" +checksum = "c6989540ced10490aaf14e6bad2e3d33728a2813310a0c71d1574304c49631cd" dependencies = [ "futures-util", "log", @@ -2342,9 +2630,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", @@ -2352,7 +2640,6 @@ dependencies = [ "pin-project-lite", "slab", "tokio", - "tracing", ] [[package]] @@ -2374,18 +2661,16 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.4.4" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" +checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" dependencies = [ "base64 0.21.7", - "bitflags 2.5.0", + "bitflags 2.6.0", "bytes", - "futures-core", - "futures-util", "http", "http-body", - "http-range-header", + "http-body-util", "mime", "pin-project-lite", "tower-layer", @@ -2439,7 +2724,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.73", ] [[package]] @@ -2481,15 +2766,6 @@ dependencies = [ "tracing-log", ] -[[package]] -name = "treediff" -version = "4.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d127780145176e2b5d16611cc25a900150e86e9fd79d3bde6ff3a37359c9cb5" -dependencies = [ - "serde_json", -] - [[package]] name = "try-lock" version = "0.2.5" @@ -2498,20 +2774,19 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tungstenite" -version = "0.18.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ee6ab729cd4cf0fd55218530c4522ed30b7b6081752839b68fcec8d0960788" +checksum = "6e2e2ce1e47ed2994fd43b04c8f618008d4cabdd5ee34027cf14f9d918edd9c8" dependencies = [ - "base64 0.13.1", "byteorder", "bytes", + "data-encoding", "http", "httparse", "log", - "rand 0.8.5", + "rand", "sha1", "thiserror", - "url", "utf-8", ] @@ -2521,6 +2796,12 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "ucd-trie" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + [[package]] name = "unicode-bidi" version = "0.3.15" @@ -2544,9 +2825,9 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unsafe-libyaml" @@ -2562,14 +2843,13 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", "percent-encoding", - "serde", ] [[package]] @@ -2586,9 +2866,9 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "valuable" @@ -2598,7 +2878,7 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "vault-mgmt" -version = "0.1.3" +version = "0.1.4" dependencies = [ "anyhow", "async-trait", @@ -2606,18 +2886,21 @@ dependencies = [ "clap_complete", "futures-util", "http", + "http-body-util", "hyper", "hyper-rustls", + "hyper-util", "k8s-openapi", "kube", - "owo-colors", "prettytable", - "rand 0.8.5", + "rand", + "rustls", + "rustls-native-certs", "secrecy", "self_update", "serde", "serde_json", - "serde_yaml 0.9.34+deprecated", + "serde_yaml", "tokio", "tokio-retry", "tokio-rustls", @@ -2626,21 +2909,15 @@ dependencies = [ "tower-test", "tracing", "tracing-subscriber", - "which", + "which 6.0.2", "wiremock", ] [[package]] name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "waker-fn" -version = "1.1.1" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "want" @@ -2651,12 +2928,6 @@ dependencies = [ "try-lock", ] -[[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.11.0+wasi-snapshot-preview1" @@ -2684,7 +2955,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.73", "wasm-bindgen-shared", ] @@ -2718,7 +2989,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.73", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2741,9 +3012,12 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.4" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" +dependencies = [ + "rustls-pki-types", +] [[package]] name = "which" @@ -2757,6 +3031,18 @@ dependencies = [ "rustix", ] +[[package]] +name = "which" +version = "6.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d9c5ed668ee1f17edb3b627225343d210006a90bb1e3745ce1f30b1fb115075" +dependencies = [ + "either", + "home", + "rustix", + "winsafe", +] + [[package]] name = "winapi" version = "0.3.9" @@ -2779,15 +3065,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.5", -] - [[package]] name = "windows-sys" version = "0.48.0" @@ -2803,7 +3080,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -2823,18 +3109,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -2845,9 +3131,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -2857,9 +3143,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -2869,15 +3155,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -2887,9 +3173,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -2899,9 +3185,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -2911,9 +3197,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -2923,40 +3209,48 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winreg" -version = "0.50.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" dependencies = [ "cfg-if", "windows-sys 0.48.0", ] +[[package]] +name = "winsafe" +version = "0.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" + [[package]] name = "wiremock" -version = "0.5.22" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13a3a53eaf34f390dd30d7b1b078287dd05df2aa2e21a589ccb80f5c7253c2e9" +checksum = "6a59f8ae78a4737fb724f20106fb35ccb7cfe61ff335665d3042b3aa98e34717" dependencies = [ "assert-json-diff", "async-trait", "base64 0.21.7", "deadpool", "futures", - "futures-timer", - "http-types", + "http", + "http-body-util", "hyper", + "hyper-util", "log", "once_cell", "regex", "serde", "serde_json", "tokio", + "url", ] [[package]] @@ -2971,36 +3265,53 @@ dependencies = [ ] [[package]] -name = "yaml-rust" -version = "0.4.5" +name = "zerocopy" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ - "linked-hash-map", + "byteorder", + "zerocopy-derive", ] [[package]] -name = "zerocopy" -version = "0.7.32" +name = "zerocopy-derive" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ - "zerocopy-derive", + "proc-macro2", + "quote", + "syn 2.0.73", ] [[package]] -name = "zerocopy-derive" -version = "0.7.32" +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.73", ] [[package]] -name = "zeroize" -version = "1.7.0" +name = "zipsign-api" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "6413a546ada9dbcd0b9a3e0b0880581279e35047bce9797e523b3408e1df607c" +dependencies = [ + "base64 0.22.1", + "ed25519-dalek", + "thiserror", +] diff --git a/Cargo.toml b/Cargo.toml index 19eea85..6b0b005 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vault-mgmt" -version = "0.1.3" +version = "0.1.4" edition = "2021" description = "Manage your vault installation in Kubernetes (upgrades, unseal, step-down, ...)." license = "MIT" @@ -19,21 +19,21 @@ name = "vault-mgmt" path = "src/main.rs" [dependencies] -anyhow = "1.0.69" -clap = { version = "4.2.1", features = ["derive", "wrap_help"] } -tracing = "0.1.37" -tracing-subscriber = { version = "0.3.16", features = [ +anyhow = "1.0.86" +clap = { version = "4.5.15", features = ["derive", "wrap_help"] } +tracing = "0.1.40" +tracing-subscriber = { version = "0.3.18", features = [ "registry", "env-filter", ] } -tokio = { version = "1.14.0", features = ["full"] } -tokio-util = "0.7.7" -tokio-rustls = { version = "0.24.0", features = ["dangerous_configuration"] } -hyper = { version = "0.14.25", features = ["backports"] } -hyper-rustls = "0.24.0" +tokio = { version = "1.39.2", features = ["full"] } +tokio-util = "0.7.11" +tokio-rustls = "0.26.0" +hyper = "1.4.1" +hyper-rustls = "0.27.2" tower = "0.4.13" -futures-util = "0.3.27" -kube = { version = "0.81.0", default-features = false, features = [ +futures-util = "0.3.30" +kube = { version = "0.93.1", default-features = false, features = [ "client", "config", "runtime", @@ -41,23 +41,36 @@ kube = { version = "0.81.0", default-features = false, features = [ "derive", "ws", ] } -k8s-openapi = { version = "0.17.0", features = ["v1_24"] } -serde_json = "1.0.94" +k8s-openapi = { version = "0.22.0", features = ["v1_24"] } +serde_json = "1.0.122" secrecy = { version = "0.8.0", features = ["serde"] } prettytable = "0.10.0" -owo-colors = { version = "3", features = ["supports-colors"] } -serde_yaml = "0.9.21" -which = "4.4.0" +serde_yaml = "0.9.34" +which = "6.0.2" rand = "0.8.5" -serde = "1.0.160" +serde = "1.0.206" tower-test = "0.4.0" -http = "0.2.9" -async-trait = "0.1.68" -wiremock = "0.5.18" -clap_complete = "4.3.1" -self_update = { version = "0.37.0", default-features = false, features = [ +http = "1.1.0" +async-trait = "0.1.81" +wiremock = "0.6.1" +clap_complete = "4.5.14" +self_update = { version = "0.41.0", default-features = false, features = [ "rustls", "compression-flate2", "archive-tar", ] } tokio-retry = "0.3.0" +rustls = { version = "0.23.12", default-features = false, features = [ + "log", + "logging", + "ring", + "std", + "tls12", +] } +http-body-util = "0.1.2" +hyper-util = { version = "0.1.7", features = [ + "client-legacy", + "http1", + "tokio", +] } +rustls-native-certs = "0.7.1" diff --git a/README.md b/README.md index 37f258b..f3b8df6 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ ## Testing Unit tests can be run normally by cargo: `cargo test`. -End-to-end tests require a Kubernetes cluster and will install, upgrade and uninstall (except on failure) several deployments of a Vault cluster in the current `kubecontext` (namespace is set by environment variable `VAULT_MGMT_E2E_NAMESPACE`, defaulting to `vault-mgmt-e2e`). +End-to-end tests require a Kubernetes cluster and will install, upgrade and uninstall (except on failure) several deployments of a Vault cluster in the current `kubecontext` (namespace is set by environment variable `VAULT_MGMT_E2E_NAMESPACE`, defaulting to `vault-mgmt-e2e`). You can create the Namespace and NetworkPolicy from `e2e-preparation.yaml`. The Pods are using `emptyDir` as storage and should not consume a PV. The storage is not part of the tests, only the clustering and active/standby transitions. You can run those tests by calling `cargo test --ignored` with a working `kubeconfig` and existing namespace. diff --git a/e2e-preparation.yaml b/e2e-preparation.yaml new file mode 100644 index 0000000..b809385 --- /dev/null +++ b/e2e-preparation.yaml @@ -0,0 +1,25 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: vault-mgmt-e2e + +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: vault-mgmt-e2e + namespace: vault-mgmt-e2e +spec: + podSelector: {} + policyTypes: + - Ingress + - Egress + ingress: + - from: + - podSelector: {} + egress: + - to: + - podSelector: {} + - to: + - ipBlock: + cidr: 0.0.0.0/0 diff --git a/src/helpers.rs b/src/helpers.rs index 8adebe8..93aff67 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -2,7 +2,7 @@ use k8s_openapi::api::{apps::v1::StatefulSet, core::v1::Pod}; use kube::{api::ListParams, Api}; use tokio::io::{AsyncRead, AsyncWrite}; -use crate::HttpForwarderService; +use crate::{BytesBody, HttpForwarderService}; pub const LABEL_KEY_VAULT_ACTIVE: &str = "vault-active"; pub const LABEL_KEY_VAULT_SEALED: &str = "vault-sealed"; @@ -73,7 +73,11 @@ impl PodApi { )) } - pub async fn http(&self, pod: &str, port: u16) -> anyhow::Result { + pub async fn http( + &self, + pod: &str, + port: u16, + ) -> anyhow::Result> { let pf = self.portforward(pod, port).await?; if self.tls { diff --git a/src/http.rs b/src/http.rs index c863abd..415b41c 100644 --- a/src/http.rs +++ b/src/http.rs @@ -1,37 +1,53 @@ -use std::sync::Arc; +use std::{convert::Infallible, sync::Arc}; use http::Response; -use hyper::{Body, Request}; -use hyper_rustls::ConfigBuilderExt; +use http_body_util::{combinators::BoxBody, BodyExt, Empty}; +use hyper::{ + body::{Body, Bytes}, + Request, +}; +use hyper_util::rt::TokioIo; +use rustls::crypto::ring; use secrecy::{ExposeSecret, Secret}; use tokio::io::{AsyncRead, AsyncWrite}; +use tokio_rustls::rustls::{pki_types, RootCertStore}; use tracing::*; +pub type BytesBody = BoxBody; + /// Send HTTP requests #[async_trait::async_trait] -pub trait HttpRequest { +pub trait HttpRequest +where + B: Body, +{ /// Send an HTTP request and return the response - async fn send_request( - &mut self, - req: Request, - ) -> hyper::Result>; + async fn send_request(&mut self, req: Request) -> hyper::Result>; /// Wait until the connection is ready to send requests async fn ready(&mut self) -> anyhow::Result<()>; } /// Forward HTTP requests over a connection stream -pub struct HttpForwarderService { - sender: hyper::client::conn::http1::SendRequest, +pub struct HttpForwarderService +where + B: Body, +{ + sender: hyper::client::conn::http1::SendRequest, } -impl HttpForwarderService { +impl HttpForwarderService +where + B: Body + Send + 'static, +{ /// Forward HTTP requests over a connection stream - pub async fn http(stream: T) -> anyhow::Result + pub async fn http(stream: T) -> anyhow::Result> where T: AsyncRead + AsyncWrite + Unpin + Sync + Send + 'static, { - let (sender, connection) = hyper::client::conn::http1::handshake(stream).await?; + let io = TokioIo::new(stream); + + let (sender, connection) = hyper::client::conn::http1::handshake(io).await?; tokio::spawn(async move { if let Err(e) = connection.await { @@ -47,32 +63,25 @@ impl HttpForwarderService { /// The native root certificates are used to verify the TLS certificate /// /// TODO: allow customizing the TLS configuration - pub async fn https(domain: &str, stream: T) -> anyhow::Result + pub async fn https(domain: &str, stream: T) -> anyhow::Result> where T: AsyncRead + AsyncWrite + Unpin + Sync + Send + 'static, { - let tls = tokio_rustls::rustls::ClientConfig::builder() - .with_safe_defaults() - .with_native_roots() - .with_no_client_auth(); - - let tls_stream = tokio_rustls::TlsConnector::from(Arc::new(tls)) - .connect(tokio_rustls::rustls::ServerName::try_from(domain)?, stream) - .await?; + let tls_stream = setup_tls(domain, stream).await?; HttpForwarderService::http(tls_stream).await } } #[async_trait::async_trait] -impl HttpRequest for HttpForwarderService { - async fn send_request( - &mut self, - req: Request, - ) -> hyper::Result> { +impl HttpRequest for HttpForwarderService +where + B: Body + Send + 'static, +{ + async fn send_request(&mut self, req: Request) -> hyper::Result> { let (parts, body) = self.sender.send_request(req).await?.into_parts(); - let body = hyper::body::to_bytes(body).await?; - Ok(Response::from_parts(parts, body.into())) + let body = body.boxed().collect().await?.to_bytes(); + Ok(Response::from_parts(parts, body)) } async fn ready(&mut self) -> anyhow::Result<()> { @@ -83,6 +92,35 @@ impl HttpRequest for HttpForwarderService { } } +pub(crate) async fn setup_tls( + domain: &str, + stream: T, +) -> anyhow::Result> +where + T: AsyncRead + AsyncWrite + Unpin + Sync + Send + 'static, +{ + let mut root_cert_store = RootCertStore::empty(); + + for cert in rustls_native_certs::load_native_certs() + .map_err(|e| anyhow::anyhow!("could not load platform certs: {}", e))? + { + root_cert_store.add(cert).unwrap(); + } + + let tls = tokio_rustls::rustls::ClientConfig::builder_with_provider(Arc::new( + ring::default_provider(), + )) + .with_safe_default_protocol_versions()? + .with_root_certificates(root_cert_store) + .with_no_client_auth(); + + let tls_stream = tokio_rustls::TlsConnector::from(Arc::new(tls)) + .connect(pki_types::ServerName::try_from(domain)?.to_owned(), stream) + .await?; + + Ok(tls_stream) +} + pub const VAULT_PORT: u16 = 8200; pub(crate) fn vault_request() -> http::request::Builder { @@ -96,7 +134,7 @@ pub(crate) fn vault_request_with_token(token: Secret) -> http::request:: } const SEAL_STATUS_URL: &str = "/v1/sys/seal-status"; -pub(crate) fn seal_status_request(body: hyper::Body) -> http::Result> { +pub(crate) fn seal_status_request(body: BytesBody) -> http::Result> { vault_request() .uri(SEAL_STATUS_URL) .method(hyper::Method::GET) @@ -104,7 +142,7 @@ pub(crate) fn seal_status_request(body: hyper::Body) -> http::Result http::Result> { +pub(crate) fn unseal_request(body: BytesBody) -> http::Result> { vault_request() .uri(UNSEAL_URL) .method(hyper::Method::PUT) @@ -114,15 +152,15 @@ pub(crate) fn unseal_request(body: hyper::Body) -> http::Result> { pub(crate) fn get_unseal_keys_request( path: &str, token: Secret, -) -> http::Result> { +) -> http::Result> { vault_request_with_token(token) .uri(path) .method(hyper::Method::GET) - .body(hyper::Body::empty()) + .body(Empty::::new().boxed()) } const INIT_URL: &str = "/v1/sys/init"; -pub(crate) fn init_request(body: hyper::Body) -> http::Result> { +pub(crate) fn init_request(body: BytesBody) -> http::Result> { vault_request() .uri(INIT_URL) .method(hyper::Method::PUT) @@ -130,7 +168,7 @@ pub(crate) fn init_request(body: hyper::Body) -> http::Result> { } const RAFT_JOIN_URL: &str = "/v1/sys/storage/raft/join"; -pub(crate) fn raft_join_request(body: hyper::Body) -> http::Result> { +pub(crate) fn raft_join_request(body: BytesBody) -> http::Result> { vault_request() .uri(RAFT_JOIN_URL) .method(hyper::Method::POST) @@ -140,8 +178,8 @@ pub(crate) fn raft_join_request(body: hyper::Body) -> http::Result const RAFT_CONFIGURATION_URL: &str = "/v1/sys/storage/raft/configuration"; pub(crate) fn raft_configuration_request( token: Secret, - body: hyper::Body, -) -> http::Result> { + body: BytesBody, +) -> http::Result> { vault_request_with_token(token) .uri(RAFT_CONFIGURATION_URL) .method(hyper::Method::GET) @@ -151,8 +189,8 @@ pub(crate) fn raft_configuration_request( const STEP_DOWN_URL: &str = "/v1/sys/step-down"; pub(crate) fn step_down_request( token: Secret, - body: hyper::Body, -) -> http::Result> { + body: BytesBody, +) -> http::Result> { vault_request_with_token(token) .uri(STEP_DOWN_URL) .method(hyper::Method::PUT) @@ -162,6 +200,8 @@ pub(crate) fn step_down_request( #[cfg(test)] mod tests { use http::StatusCode; + use http_body_util::Empty; + use hyper::body::Bytes; use wiremock::{matchers::any, Mock, MockServer, ResponseTemplate}; use crate::http::{HttpForwarderService, HttpRequest}; @@ -187,7 +227,7 @@ mod tests { let http_req = hyper::Request::builder() .uri("/") .method(hyper::Method::GET) - .body(hyper::Body::from("")) + .body(Empty::::new()) .unwrap(); let (parts, _) = client.send_request(http_req).await.unwrap().into_parts(); @@ -196,28 +236,26 @@ mod tests { } // TODO: do not use remote host for testing - // #[tokio::test] - // async fn https_forward_works() { - // const DOMAIN: &str = "google.com"; - - // let mut pf = HttpForwarderService::https( - // DOMAIN, - // tokio::net::TcpStream::connect(&format!("{}:443", DOMAIN)) - // .await - // .unwrap(), - // ) - // .await - // .unwrap(); - - // let http_req = hyper::Request::builder() - // .uri("/") - // .header("Host", DOMAIN) - // .method(hyper::Method::GET) - // .body(hyper::Body::from("")) - // .unwrap(); - - // let (parts, _) = pf.send_request(http_req).await.unwrap().into_parts(); - - // assert!(parts.status.is_success() || parts.status.is_redirection()); - // } + #[ignore = "connecting to google.com"] + #[tokio::test] + async fn https_forward_works() { + const DOMAIN: &str = "google.com"; + + let stream = tokio::net::TcpStream::connect(&format!("{}:443", DOMAIN)) + .await + .unwrap(); + + let mut pf = HttpForwarderService::https(DOMAIN, stream).await.unwrap(); + + let http_req = hyper::Request::builder() + .uri("/") + .header("Host", DOMAIN) + .method(hyper::Method::GET) + .body(Empty::::new()) + .unwrap(); + + let (parts, _) = pf.send_request(http_req).await.unwrap().into_parts(); + + assert!(parts.status.is_success() || parts.status.is_redirection()); + } } diff --git a/src/init.rs b/src/init.rs index e534c30..eed86ce 100644 --- a/src/init.rs +++ b/src/init.rs @@ -1,13 +1,12 @@ use http::Request; -use hyper::Body; +use http_body_util::{BodyExt, Full}; +use hyper::body::Bytes; use k8s_openapi::api::core::v1::Pod; use kube::Api; use secrecy::Secret; use tracing::*; -use crate::{ - PodApi, {init_request, raft_join_request, HttpRequest, VAULT_PORT}, -}; +use crate::{init_request, raft_join_request, BytesBody, HttpRequest, PodApi, VAULT_PORT}; #[derive(Debug, serde::Serialize)] pub struct InitRequest { @@ -53,16 +52,15 @@ pub trait Init { #[async_trait::async_trait] impl Init for T where - T: HttpRequest + Send + Sync + 'static, + T: HttpRequest + Send + Sync + 'static, { async fn init(&mut self, req: InitRequest) -> anyhow::Result { let body = serde_json::ser::to_string(&req)?; - let http_req = init_request(Body::from(body.to_string()))?; + let http_req = init_request(Full::new(Bytes::from(body.to_string())).boxed())?; let (parts, body) = self.send_request(http_req).await?.into_parts(); - let body = hyper::body::to_bytes(body).await?; let body = String::from_utf8(body.to_vec())?; if parts.status != hyper::StatusCode::OK { @@ -85,18 +83,17 @@ pub trait RaftJoin { #[async_trait::async_trait] impl RaftJoin for T where - T: HttpRequest + Send + Sync + 'static, + T: HttpRequest + Send + Sync + 'static, { async fn raft_join(&mut self, join_to: &str) -> anyhow::Result<()> { let body = serde_json::json!({ "leader_api_addr": join_to, }); - let http_req = raft_join_request(Body::from(body.to_string()))?; + let http_req = raft_join_request(Full::new(Bytes::from(body.to_string())).boxed())?; let (parts, body) = self.send_request(http_req).await?.into_parts(); - let body = hyper::body::to_bytes(body).await?; let body = String::from_utf8(body.to_vec())?; if parts.status != hyper::StatusCode::OK { @@ -142,11 +139,10 @@ pub async fn init(domain: String, api: &Api, pod_name: &str) -> anyhow::Res .header("Host", "127.0.0.1") .header("X-Vault-Request", "true") .method(hyper::Method::PUT) - .body(Body::from(body.to_string()))?; + .body(Full::new(Bytes::from(body.to_string())).boxed())?; let (parts, body) = pf.send_request(http_req).await?.into_parts(); - let body = hyper::body::to_bytes(body).await?; let body = String::from_utf8(body.to_vec())?; if parts.status != hyper::StatusCode::OK { @@ -198,11 +194,10 @@ pub async fn raft_join( .header("Host", "127.0.0.1") .header("X-Vault-Request", "true") .method(hyper::Method::POST) - .body(Body::from(body.to_string()))?; + .body(Full::new(Bytes::from(body.to_string())).boxed())?; let (parts, body) = pf.send_request(http_req).await?.into_parts(); - let body = hyper::body::to_bytes(body).await?; let body = String::from_utf8(body.to_vec())?; if parts.status != hyper::StatusCode::OK { diff --git a/src/lib.rs b/src/lib.rs index df8968d..5822a7d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -21,6 +21,5 @@ pub use show::*; pub use status::*; pub use step_down::*; pub use unseal::*; -pub use upgrade::*; pub use version::*; pub use wait::*; diff --git a/src/main.rs b/src/main.rs index 660e901..d7290a5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -167,6 +167,10 @@ enum Commands { async fn main() -> anyhow::Result<()> { let cli = Cli::parse(); + rustls::crypto::ring::default_provider() + .install_default() + .unwrap(); + let env_filter = EnvFilter::try_from_default_env() .unwrap_or_else(|_| EnvFilter::new(format!("vault_mgmt={}", cli.log_level))); tracing::subscriber::set_global_default( diff --git a/src/show.rs b/src/show.rs index adeddb4..0150592 100644 --- a/src/show.rs +++ b/src/show.rs @@ -1,21 +1,20 @@ use k8s_openapi::api::core::v1::Pod; use kube::api::Api; -use owo_colors::{AnsiColors, DynColors, OwoColorize, Stream::Stdout}; -use prettytable::Table; +use prettytable::{color, Attr, Cell, Row, Table}; use crate::list_vault_pods; #[tracing::instrument(skip_all)] pub async fn construct_table(api: &Api) -> anyhow::Result { let mut table = Table::new(); - table.add_row(row![ - "NAME".if_supports_color(Stdout, |text| text.bold()), - "STATUS".if_supports_color(Stdout, |text| text.bold()), - "IMAGE".if_supports_color(Stdout, |text| text.bold()), - "INITIALIZED".if_supports_color(Stdout, |text| text.bold()), - "SEALED".if_supports_color(Stdout, |text| text.bold()), - "ACTIVE".if_supports_color(Stdout, |text| text.bold()), - "READY".if_supports_color(Stdout, |text| text.bold()), + table.set_titles(row![ + "NAME", + "STATUS", + "IMAGE", + "INITIALIZED", + "SEALED", + "ACTIVE", + "READY", ]); let pods = api.list(&list_vault_pods()).await?; @@ -46,35 +45,34 @@ pub async fn construct_table(api: &Api) -> anyhow::Result
{ .as_ref() .ok_or(anyhow::anyhow!("pod does not have a spec"))? .containers - .get(0) + .first() .ok_or(anyhow::anyhow!("pod does not have a container"))? .image .clone() .ok_or(anyhow::anyhow!("container does not have an image"))?; + let initialized = get_vault_label(p, "vault-initialized"); - let initialized = initialized.if_supports_color(Stdout, |text| { - text.color(match initialized.as_str() { - "true" => DynColors::Ansi(AnsiColors::Green), - "false" => DynColors::Ansi(AnsiColors::Red), - _ => DynColors::Ansi(AnsiColors::Yellow), - }) - }); + let initialized = + Cell::new(&initialized).with_style(Attr::ForegroundColor(match initialized.as_str() { + "true" => color::GREEN, + "false" => color::RED, + _ => color::YELLOW, + })); + let sealed = get_vault_label(p, "vault-sealed"); - let sealed = sealed.if_supports_color(Stdout, |text| { - text.color(match sealed.as_str() { - "true" => DynColors::Ansi(AnsiColors::Red), - "false" => DynColors::Ansi(AnsiColors::Green), - _ => DynColors::Ansi(AnsiColors::Yellow), - }) - }); + let sealed = Cell::new(&sealed).with_style(Attr::ForegroundColor(match sealed.as_str() { + "true" => color::RED, + "false" => color::GREEN, + _ => color::YELLOW, + })); + let active = get_vault_label(p, "vault-active"); - let active = active.if_supports_color(Stdout, |text| { - text.color(match active.as_str() { - "true" => DynColors::Ansi(AnsiColors::Green), - "false" => DynColors::Ansi(AnsiColors::White), - _ => DynColors::Ansi(AnsiColors::Yellow), - }) - }); + let active = Cell::new(&active).with_style(Attr::ForegroundColor(match active.as_str() { + "true" => color::GREEN, + "false" => color::WHITE, + _ => color::YELLOW, + })); + let ready = { let mut ready = "unknown".to_string(); @@ -99,23 +97,21 @@ pub async fn construct_table(api: &Api) -> anyhow::Result
{ ready }; - let ready = ready.if_supports_color(Stdout, |text| { - text.color(match ready.as_str() { - "true" => DynColors::Ansi(AnsiColors::Green), - "false" => DynColors::Ansi(AnsiColors::White), - _ => DynColors::Ansi(AnsiColors::Yellow), - }) - }); + let ready = Cell::new(&ready).with_style(Attr::ForegroundColor(match ready.as_str() { + "true" => color::GREEN, + "false" => color::WHITE, + _ => color::YELLOW, + })); - table.add_row(row![ - name, - status, - image, + table.add_row(Row::new(vec![ + Cell::new(&name), + Cell::new(&status), + Cell::new(&image), initialized, sealed, active, ready, - ]); + ])); } Ok(table) diff --git a/src/status.rs b/src/status.rs index b564377..8a1e4b4 100644 --- a/src/status.rs +++ b/src/status.rs @@ -1,8 +1,9 @@ -use hyper::Body; +use http_body_util::{BodyExt, Empty}; +use hyper::body::Bytes; use kube::runtime::wait::Condition; use secrecy::Secret; -use crate::{raft_configuration_request, seal_status_request, HttpRequest}; +use crate::{raft_configuration_request, seal_status_request, BytesBody, HttpRequest}; #[derive(Debug, serde::Serialize, serde::Deserialize)] pub struct PodSealStatus { @@ -45,14 +46,13 @@ pub trait GetSealStatus { #[async_trait::async_trait] impl GetSealStatus for T where - T: HttpRequest + Send + Sync + 'static, + T: HttpRequest + Send + Sync + 'static, { async fn seal_status(&mut self) -> anyhow::Result { - let http_req = seal_status_request(Body::from(""))?; + let http_req = seal_status_request(Empty::::new().boxed())?; let (parts, body) = self.send_request(http_req).await?.into_parts(); - let body = hyper::body::to_bytes(body).await?; let body = String::from_utf8(body.to_vec())?; if parts.status != hyper::StatusCode::OK { @@ -147,17 +147,16 @@ pub trait GetRaftConfiguration { #[async_trait::async_trait] impl GetRaftConfiguration for T where - T: HttpRequest + Send + Sync + 'static, + T: HttpRequest + Send + Sync + 'static, { async fn raft_configuration( &mut self, token: Secret, ) -> anyhow::Result { - let http_req = raft_configuration_request(token, Body::from(""))?; + let http_req = raft_configuration_request(token, Empty::::new().boxed())?; let (parts, body) = self.send_request(http_req).await?.into_parts(); - let body = hyper::body::to_bytes(body).await?; let body = String::from_utf8(body.to_vec())?; if parts.status != hyper::StatusCode::OK { @@ -306,16 +305,16 @@ mod tests { let status = client.seal_status().await.unwrap(); assert_eq!(status.type_, "shamir"); - assert_eq!(status.initialized, false); - assert_eq!(status.sealed, true); + assert!(!status.initialized); + assert!(status.sealed); assert_eq!(status.t, 2); assert_eq!(status.n, 3); assert_eq!(status.progress, 0); assert_eq!(status.nonce, ""); assert_eq!(status.version, "1.13.0"); assert_eq!(status.build_date, "2023-03-01T14:58:13Z"); - assert_eq!(status.migration, false); - assert_eq!(status.recovery_seal, false); + assert!(!status.migration); + assert!(!status.recovery_seal); assert_eq!(status.storage_type, "raft"); assert_eq!(status.ha_enabled, None); assert_eq!(status.cluster_name, None); @@ -342,18 +341,18 @@ mod tests { let status = client.seal_status().await.unwrap(); assert_eq!(status.type_, "shamir"); - assert_eq!(status.initialized, false); - assert_eq!(status.sealed, true); + assert!(!status.initialized); + assert!(status.sealed); assert_eq!(status.t, 2); assert_eq!(status.n, 3); assert_eq!(status.progress, 0); assert_eq!(status.nonce, ""); assert_eq!(status.version, "1.13.0"); assert_eq!(status.build_date, "2023-03-01T14:58:13Z"); - assert_eq!(status.migration, false); - assert_eq!(status.recovery_seal, false); + assert!(!status.migration); + assert!(!status.recovery_seal); assert_eq!(status.storage_type, "raft"); - assert_eq!(status.ha_enabled.unwrap(), true); + assert!(status.ha_enabled.unwrap()); assert_eq!(status.cluster_name, None); assert_eq!(status.cluster_id, None); assert_eq!(status.active_time.unwrap(), "0001-01-01T00:00:00Z"); @@ -378,18 +377,18 @@ mod tests { let status = client.seal_status().await.unwrap(); assert_eq!(status.type_, "shamir"); - assert_eq!(status.initialized, true); - assert_eq!(status.sealed, false); + assert!(status.initialized); + assert!(!status.sealed); assert_eq!(status.t, 2); assert_eq!(status.n, 3); assert_eq!(status.progress, 0); assert_eq!(status.nonce, ""); assert_eq!(status.version, "1.13.0"); assert_eq!(status.build_date, "2023-03-01T14:58:13Z"); - assert_eq!(status.migration, false); - assert_eq!(status.recovery_seal, false); + assert!(!status.migration); + assert!(!status.recovery_seal); assert_eq!(status.storage_type, "raft"); - assert_eq!(status.ha_enabled.unwrap(), true); + assert!(status.ha_enabled.unwrap()); assert_eq!(status.cluster_name.unwrap(), "vault-cluster-211d673a"); assert_eq!( status.cluster_id.unwrap(), @@ -423,7 +422,7 @@ mod tests { .unwrap() .unwrap(); - assert_eq!(status.initialized, true); + assert!(status.initialized); } fn raft_configuration() -> serde_json::Value { @@ -509,7 +508,7 @@ mod tests { #[tokio::test] async fn getting_raft_configuration_works() { - let mock_server = mock_raft_configuration(&vec![raft_configuration()]).await; + let mock_server = mock_raft_configuration(&[raft_configuration()]).await; let mut client = HttpForwarderService::http( tokio::net::TcpStream::connect(mock_server.uri().strip_prefix("http://").unwrap()) @@ -526,7 +525,7 @@ mod tests { assert_eq!(config.request_id, "7f6fc909-bb7f-e48c-d850-0ad8a22cb434"); assert_eq!(config.lease_id, ""); - assert_eq!(config.renewable, false); + assert!(!config.renewable); assert_eq!(config.lease_duration, 0); assert_eq!(config.data.config.index, 0); assert_eq!(config.data.config.servers.len(), 3); @@ -538,9 +537,9 @@ mod tests { config.data.config.servers[0].address, "vault-0.vault-internal:8201" ); - assert_eq!(config.data.config.servers[0].leader, true); + assert!(config.data.config.servers[0].leader); assert_eq!(config.data.config.servers[0].protocol_version, "3"); - assert_eq!(config.data.config.servers[0].voter, true); + assert!(config.data.config.servers[0].voter); assert_eq!( config.data.config.servers[1].node_id, "04ffa935-e1c2-e891-a9e9-426bf1a6c93d" @@ -549,9 +548,9 @@ mod tests { config.data.config.servers[1].address, "vault-1.vault-internal:8201" ); - assert_eq!(config.data.config.servers[1].leader, false); + assert!(!config.data.config.servers[1].leader); assert_eq!(config.data.config.servers[1].protocol_version, "3"); - assert_eq!(config.data.config.servers[1].voter, true); + assert!(config.data.config.servers[1].voter); assert_eq!( config.data.config.servers[2].node_id, "124bef00-64ec-59de-1366-7050edfb5c49" @@ -560,9 +559,9 @@ mod tests { config.data.config.servers[2].address, "vault-2.vault-internal:8201" ); - assert_eq!(config.data.config.servers[2].leader, false); + assert!(!config.data.config.servers[2].leader); assert_eq!(config.data.config.servers[2].protocol_version, "3"); - assert_eq!(config.data.config.servers[2].voter, true); + assert!(config.data.config.servers[2].voter); assert_eq!(config.wrap_info, None); assert_eq!(config.warnings, None); @@ -571,7 +570,7 @@ mod tests { #[tokio::test] async fn waiting_for_raft_configuration_works() { - let mock_server = mock_raft_configuration(&vec![raft_configuration()]).await; + let mock_server = mock_raft_configuration(&[raft_configuration()]).await; let mut client = HttpForwarderService::http( tokio::net::TcpStream::connect(mock_server.uri().strip_prefix("http://").unwrap()) @@ -590,12 +589,12 @@ mod tests { .unwrap() .unwrap(); - assert_eq!(config.data.config.servers[0].leader, true); + assert!(config.data.config.servers[0].leader); } #[tokio::test] async fn waiting_for_raft_configuration_having_leader_works() { - let mock_server = mock_raft_configuration(&vec![ + let mock_server = mock_raft_configuration(&[ raft_configuration_no_leader(), raft_configuration_no_leader(), raft_configuration(), @@ -619,12 +618,12 @@ mod tests { .unwrap() .unwrap(); - assert_eq!(config.data.config.servers[0].leader, true); + assert!(config.data.config.servers[0].leader); } #[tokio::test] async fn waiting_for_raft_configuration_having_all_voters_works() { - let mock_server = mock_raft_configuration(&vec![ + let mock_server = mock_raft_configuration(&[ raft_configuration_no_voter(), raft_configuration_single_non_voter(), raft_configuration(), diff --git a/src/step_down.rs b/src/step_down.rs index 98d9320..cdcedb2 100644 --- a/src/step_down.rs +++ b/src/step_down.rs @@ -1,7 +1,8 @@ -use hyper::Body; +use http_body_util::{BodyExt, Empty}; +use hyper::body::Bytes; use secrecy::Secret; -use crate::{step_down_request, HttpRequest}; +use crate::{step_down_request, BytesBody, HttpRequest}; /// Step down vault pod from active to standby #[async_trait::async_trait] @@ -13,14 +14,13 @@ pub trait StepDown { #[async_trait::async_trait] impl StepDown for T where - T: HttpRequest + Send + Sync + 'static, + T: HttpRequest + Send + Sync + 'static, { async fn step_down(&mut self, token: Secret) -> anyhow::Result<()> { - let http_req = step_down_request(token, Body::from(""))?; + let http_req = step_down_request(token, Empty::::new().boxed())?; let (parts, body) = self.send_request(http_req).await?.into_parts(); - let body = hyper::body::to_bytes(body).await?; let body = String::from_utf8(body.to_vec())?; if parts.status != hyper::StatusCode::NO_CONTENT { diff --git a/src/unseal.rs b/src/unseal.rs index 6166483..7053efc 100644 --- a/src/unseal.rs +++ b/src/unseal.rs @@ -1,13 +1,14 @@ use http::uri::Scheme; -use hyper::Body; +use http_body_util::{BodyExt, Full}; +use hyper::body::Bytes; use k8s_openapi::api::core::v1::Pod; use kube::api::Api; use secrecy::{ExposeSecret, Secret}; use tokio::process::Command; use crate::{ - get_unseal_keys_request, list_vault_pods, ExecIn, HttpForwarderService, - {unseal_request, HttpRequest}, + get_unseal_keys_request, list_vault_pods, unseal_request, BytesBody, ExecIn, + HttpForwarderService, HttpRequest, }; /// Get the unseal keys by running the specified command @@ -45,7 +46,7 @@ pub trait Unseal { #[async_trait::async_trait] impl Unseal for T where - T: HttpRequest + Send + Sync + 'static, + T: HttpRequest + Send + Sync + 'static, { async fn unseal(&mut self, keys: &[Secret]) -> anyhow::Result<()> { if keys.is_empty() { @@ -61,12 +62,11 @@ where "migrate": false, }); - let http_req = unseal_request(Body::from(body.to_string()))?; + let http_req = unseal_request(Full::new(Bytes::from(body.to_string())).boxed())?; let (parts, body) = self.send_request(http_req).await?.into_parts(); - let body = hyper::body::to_bytes(body).await?; - let body = String::from_utf8(body.to_vec())?; + let body = String::from_utf8(body.into()).unwrap(); if !(parts.status.is_success() || parts.status.is_redirection()) { return Err(anyhow::anyhow!("unsealing: {}", body)); @@ -91,7 +91,7 @@ pub trait GetUnsealKeys { #[async_trait::async_trait] impl GetUnsealKeys for T where - T: HttpRequest + Send + Sync + 'static, + T: HttpRequest + Send + Sync + 'static, { async fn get_unseal_keys( &mut self, @@ -102,7 +102,6 @@ where let (parts, body) = self.send_request(req).await?.into_parts(); - let body = hyper::body::to_bytes(body).await?; let body = String::from_utf8(body.to_vec())?; if !(parts.status.is_success()) { @@ -211,9 +210,9 @@ mod tests { use std::str::FromStr; use http::{Method, Request, Response, StatusCode}; - use hyper::Body; + use hyper::body::Bytes; use k8s_openapi::{api::core::v1::Pod, List}; - use kube::{Api, Client}; + use kube::{client::Body, Api, Client}; use secrecy::Secret; use tokio::task::JoinHandle; use tokio_util::sync::CancellationToken; @@ -268,7 +267,7 @@ mod tests { _ => panic!("Unexpected API request {:?} {:?} {:?}", method, uri, query), }; - send.send_response(Response::builder().body(Body::from(body)).unwrap()); + send.send_response(Response::builder().body(Bytes::from(body).into()).unwrap()); } _ = cancel.cancelled() => { return; @@ -316,7 +315,7 @@ mod tests { .await .unwrap(); - let outcome = client.unseal(&vec![]).await; + let outcome = client.unseal(&[]).await; assert!(outcome.is_err()); } @@ -361,7 +360,7 @@ mod tests { .unwrap(); let outcome = client - .unseal(&vec![ + .unseal(&[ Secret::from_str("abc").unwrap(), Secret::from_str("def").unwrap(), Secret::from_str("ghi").unwrap(), @@ -427,7 +426,7 @@ mod tests { let outcome = client .get_unseal_keys( - &uri.path_and_query().unwrap(), + uri.path_and_query().unwrap(), Secret::new("token".to_string()), ) .await; @@ -452,7 +451,7 @@ mod tests { let outcome = client .get_unseal_keys( - &uri.path_and_query().unwrap(), + uri.path_and_query().unwrap(), Secret::new("token".to_string()), ) .await; diff --git a/src/upgrade.rs b/src/upgrade.rs index 06a72a9..8e43999 100644 --- a/src/upgrade.rs +++ b/src/upgrade.rs @@ -224,9 +224,9 @@ mod tests { use std::str::FromStr; use http::{Request, Response, StatusCode}; - use hyper::Body; + use hyper::body::Bytes; use k8s_openapi::{api::core::v1::Pod, List}; - use kube::{Api, Client}; + use kube::{client::Body, Api, Client}; use secrecy::Secret; use serde_yaml::Value; use tokio::task::JoinHandle; @@ -346,12 +346,12 @@ mod tests { if method == "DELETE" { delete_called = true; } - send.send_response(Response::builder().status(StatusCode::NOT_FOUND).body(Body::from("404 not found")).unwrap()); + send.send_response(Response::builder().status(StatusCode::NOT_FOUND).body(Bytes::from("404 not found").into()).unwrap()); continue; }, }; - send.send_response(Response::builder().body(Body::from(body)).unwrap()); + send.send_response(Response::builder().body(Bytes::from(body.to_string()).into()).unwrap()); } _ = cancel.cancelled() => { return delete_called; diff --git a/src/wait.rs b/src/wait.rs index 31b4721..37084d6 100644 --- a/src/wait.rs +++ b/src/wait.rs @@ -141,7 +141,7 @@ pub fn is_pod_standby() -> impl Condition { #[cfg(test)] mod tests { use http::{Request, Response}; - use hyper::Body; + use hyper::body::Bytes; use k8s_openapi::{ api::{ apps::v1::{StatefulSet, StatefulSetStatus}, @@ -150,7 +150,7 @@ mod tests { apimachinery::pkg::apis::meta::v1::WatchEvent, List, }; - use kube::{Api, Client, ResourceExt}; + use kube::{client::Body, Api, Client, ResourceExt}; use serde_json::Value; use tokio_util::sync::CancellationToken; use tower_test::mock::{self, Handle}; @@ -190,7 +190,7 @@ uri.as_str(), _ => panic!("Unexpected API request {:?}", request), }; - send.send_response(Response::builder().body(Body::from(body)).unwrap()); + send.send_response(Response::builder().body(Bytes::from(body).into()).unwrap()); } async fn mock_list_sts( @@ -252,7 +252,7 @@ uri.as_str(), let event = WatchEvent::Modified(sts); list.push_str(&serde_json::to_string(&event).unwrap()); - list.push_str("\n"); + list.push('\n'); } list @@ -260,7 +260,7 @@ uri.as_str(), _ => panic!("Unexpected API request {:?} {:?} {:?}", method, uri, query), }; - send.send_response(Response::builder().body(Body::from(body)).unwrap()); + send.send_response(Response::builder().body(Bytes::from(body).into()).unwrap()); } _ = cancel.cancelled() => { return; @@ -300,7 +300,7 @@ uri.as_str(), mock_list_sts( cloned_token, &mut handle, - &vec![vec![StatefulSetStatus { + &[vec![StatefulSetStatus { replicas: 1, available_replicas: Some(1), ready_replicas: Some(1), @@ -342,7 +342,7 @@ uri.as_str(), mock_list_sts( cloned_token, &mut handle, - &vec![ + &[ vec![StatefulSetStatus { replicas: 1, available_replicas: Some(0), @@ -413,7 +413,7 @@ uri.as_str(), mock_list_sts( cloned_token, &mut handle, - &vec![ + &[ vec![StatefulSetStatus { replicas: 1, available_replicas: Some(0), diff --git a/tests/e2e/helm.rs b/tests/e2e/helm.rs index 29c24d1..6d4e305 100644 --- a/tests/e2e/helm.rs +++ b/tests/e2e/helm.rs @@ -36,6 +36,8 @@ pub async fn install_chart( ) -> anyhow::Result { let helm = which::which("helm")?; + let fullname_override = format!("fullnameOverride={}", name); + let mut args = vec![ "upgrade", "--install", @@ -45,6 +47,8 @@ pub async fn install_chart( namespace, "-f", "-", + "--set", + &fullname_override, ]; let vers; diff --git a/tests/e2e/helm/values.yaml b/tests/e2e/helm/values.yaml index 8e0d45c..c8ff906 100644 --- a/tests/e2e/helm/values.yaml +++ b/tests/e2e/helm/values.yaml @@ -1,3 +1,5 @@ +fullnameOverride: "" # set by tests + server: affinity: "" ha: @@ -33,3 +35,5 @@ server: volumeMounts: - name: data mountPath: /vault/data +injector: + enabled: false diff --git a/tests/e2e/prepare.rs b/tests/e2e/prepare.rs index 6727afb..2f08924 100644 --- a/tests/e2e/prepare.rs +++ b/tests/e2e/prepare.rs @@ -14,7 +14,7 @@ pub async fn init_unseal_cluster( stss: &Api, name: &str, ) -> anyhow::Result { - kube::runtime::wait::await_condition(stss.clone(), &name, |obj: Option<&StatefulSet>| { + kube::runtime::wait::await_condition(stss.clone(), name, |obj: Option<&StatefulSet>| { if let Some(sts) = &obj { if let Some(status) = &sts.status { return status.replicas == 3; @@ -109,7 +109,7 @@ pub async fn init_unseal_cluster( pf.unseal(&init_result.keys).await?; } - kube::runtime::wait::await_condition(stss.clone(), &name, is_statefulset_ready()).await?; + kube::runtime::wait::await_condition(stss.clone(), name, is_statefulset_ready()).await?; Ok(init_result) } diff --git a/tests/e2e/setup.rs b/tests/e2e/setup.rs index d960f31..9dc9ed7 100644 --- a/tests/e2e/setup.rs +++ b/tests/e2e/setup.rs @@ -1,11 +1,91 @@ -use k8s_openapi::api::core::v1::Pod; +use k8s_openapi::api::{apps::v1::StatefulSet, core::v1::Pod}; use kube::{Api, Client}; -use tokio::process::Command; +use secrecy::ExposeSecret; +use tokio::{process::Command, sync::OnceCell}; +use vault_mgmt_lib::{ + raft_configuration_all_voters, GetRaftConfiguration, InitResult, PodApi, VAULT_PORT, +}; -pub fn get_namespace() -> String { +use crate::{helm, prepare}; + +pub(crate) fn get_namespace() -> String { std::env::var("VAULT_MGMT_E2E_NAMESPACE").unwrap_or_else(|_| "vault-mgmt-e2e".to_string()) } +pub(crate) const VAULT_VERSION_OLD: &str = "1.16.0"; +pub(crate) const VAULT_VERSION_CURRENT: &str = "1.17.0"; +pub(crate) const VAULT_IMAGE_NAME: &str = "hashicorp/vault"; + +static ONCE_CRYPTO_SETUP: OnceCell<()> = OnceCell::const_new(); + +pub(crate) async fn setup_crypto_provider() { + ONCE_CRYPTO_SETUP + .get_or_init(|| async { + rustls::crypto::ring::default_provider() + .install_default() + .unwrap(); + }) + .await; +} + +pub(crate) async fn setup( + prefix: &str, + version: &str, +) -> ( + String, + String, + Api, + Api, + InitResult, + PodApi, +) { + setup_crypto_provider().await; + let namespace = get_namespace(); + + let client = Client::try_default().await.unwrap(); + + let suffix = rand::random::(); + let name = dbg!(format!("{}-{}", prefix, suffix)); + + helm::add_repo().await.unwrap(); + helm::install_chart(&namespace, &name, Some(version)) + .await + .unwrap(); + + let pods = Api::namespaced(client.clone(), &namespace); + let stss = Api::namespaced(client.clone(), &namespace); + + let init = prepare::init_unseal_cluster(&pods, &stss, &name) + .await + .unwrap(); + + dbg!( + &init + .keys + .iter() + .map(|k| k.expose_secret()) + .collect::>(), + &init.root_token.expose_secret() + ); + + let pod_api = PodApi::new(pods.clone(), false, "".to_string()); + + let mut pf = pod_api + .http(&format!("{}-0", name), VAULT_PORT) + .await + .unwrap(); + + pf.await_raft_configuration(init.root_token.clone(), raft_configuration_all_voters()) + .await + .unwrap(); + + (namespace, name, pods, stss, init, pod_api) +} + +pub(crate) async fn teardown(namespace: &str, name: &str) { + helm::uninstall_chart(namespace, name).await.unwrap(); +} + #[ignore = "needs a running kubernetes cluster and the helm cli"] #[tokio::test] async fn kube_connection_succeeds() { diff --git a/tests/e2e/show.rs b/tests/e2e/show.rs index 62514fe..8433865 100644 --- a/tests/e2e/show.rs +++ b/tests/e2e/show.rs @@ -1,31 +1,11 @@ -use kube::{Api, Client}; - use vault_mgmt_lib::construct_table; -use crate::{helm, prepare, setup::get_namespace}; +use crate::setup::{setup, teardown, VAULT_VERSION_CURRENT}; #[ignore = "needs a running kubernetes cluster and the helm cli"] #[tokio::test] async fn show_succeeds() { - let client = Client::try_default().await.unwrap(); - - let namespace = &get_namespace(); - - let suffix = rand::random::(); - let name = format!("vault-mgmt-e2e-{}", suffix); - - let version = "1.13.0"; - - helm::add_repo().await.unwrap(); - helm::install_chart(namespace, &name, Some(&version)) - .await - .unwrap(); - - let pods = Api::namespaced(client.clone(), namespace); - - prepare::init_unseal_cluster(&pods, &Api::namespaced(client.clone(), namespace), &name) - .await - .unwrap(); + let (namespace, name, pods, _, _, _) = setup("show", VAULT_VERSION_CURRENT).await; let table = construct_table(&pods).await.unwrap(); @@ -33,11 +13,11 @@ async fn show_succeeds() { table.print(&mut buf).unwrap(); let output = std::str::from_utf8(buf.as_slice()).unwrap().to_string(); - if !output.contains(&version) { + if !output.contains(VAULT_VERSION_CURRENT) { table.printstd(); - assert!(output.contains(&version)); + assert!(output.contains(VAULT_VERSION_CURRENT)); } - helm::uninstall_chart(namespace, &name).await.unwrap(); + teardown(&namespace, &name).await; } diff --git a/tests/e2e/upgrade.rs b/tests/e2e/upgrade.rs index 2326830..e49a55d 100644 --- a/tests/e2e/upgrade.rs +++ b/tests/e2e/upgrade.rs @@ -2,62 +2,20 @@ use std::str::FromStr; use kube::{ api::{entry::Entry, PostParams}, - runtime::{conditions::is_pod_running, wait::Condition}, - Api, Client, + runtime::conditions::is_deleted, + ResourceExt, }; -use secrecy::ExposeSecret; -use vault_mgmt_lib::{ - is_pod_sealed, PodApi, Unseal, VaultVersion, VAULT_PORT, - {raft_configuration_all_voters, GetRaftConfiguration}, -}; +use vault_mgmt_lib::{is_pod_sealed, Unseal, VaultVersion, VAULT_PORT}; -use crate::{helm, prepare, setup::get_namespace}; +use crate::setup::{setup, teardown, VAULT_IMAGE_NAME, VAULT_VERSION_CURRENT, VAULT_VERSION_OLD}; #[ignore = "needs a running kubernetes cluster and the helm cli"] #[tokio::test] async fn upgrade_pod_succeeds_if_already_current() { - let client = Client::try_default().await.unwrap(); - - let namespace = &get_namespace(); - - let suffix = rand::random::(); - let name = format!("vault-mgmt-e2e-{}", suffix); - dbg!(&name); - - let version = "1.13.0"; - - helm::add_repo().await.unwrap(); - helm::install_chart(namespace, &name, Some(&version)) - .await - .unwrap(); - - let pods = Api::namespaced(client.clone(), namespace); - let stss = Api::namespaced(Client::try_default().await.unwrap(), namespace); - - let init = prepare::init_unseal_cluster(&pods, &stss, &name) - .await - .unwrap(); - - dbg!( - &init - .keys - .iter() - .map(|k| k.expose_secret()) - .collect::>(), - &init.root_token.expose_secret() - ); - - let pods = PodApi::new(pods, false, "".to_string()); - - let mut pf = pods.http(&format!("{}-0", name), VAULT_PORT).await.unwrap(); - - pf.await_raft_configuration(init.root_token.clone(), raft_configuration_all_voters()) - .await - .unwrap(); + let (namespace, name, _, stss, init, pods) = setup("upgrade-noop", VAULT_VERSION_CURRENT).await; let sts = stss.get(&name).await.unwrap(); - let pod = pods.api.get(&format!("{}-0", name)).await.unwrap(); pods.upgrade( @@ -71,53 +29,16 @@ async fn upgrade_pod_succeeds_if_already_current() { .await .unwrap(); - helm::uninstall_chart(namespace, &name).await.unwrap(); + teardown(&namespace, &name).await; } #[ignore = "needs a running kubernetes cluster and the helm cli"] #[tokio::test] async fn upgrade_pod_succeeds_if_already_current_with_force_upgrade() { - let client = Client::try_default().await.unwrap(); - - let namespace = &get_namespace(); - - let suffix = rand::random::(); - let name = format!("vault-mgmt-e2e-{}", suffix); - dbg!(&name); - - let version = "1.13.0"; - - helm::add_repo().await.unwrap(); - helm::install_chart(namespace, &name, Some(&version)) - .await - .unwrap(); - - let pods = Api::namespaced(client.clone(), namespace); - let stss = Api::namespaced(Client::try_default().await.unwrap(), namespace); - - let init = prepare::init_unseal_cluster(&pods, &stss, &name) - .await - .unwrap(); - - dbg!( - &init - .keys - .iter() - .map(|k| k.expose_secret()) - .collect::>(), - &init.root_token.expose_secret() - ); - - let pods = PodApi::new(pods, false, "".to_string()); - - let mut pf = pods.http(&format!("{}-0", name), VAULT_PORT).await.unwrap(); - - pf.await_raft_configuration(init.root_token.clone(), raft_configuration_all_voters()) - .await - .unwrap(); + let (namespace, name, _, stss, init, pods) = + setup("upgrade-force", VAULT_VERSION_CURRENT).await; let sts = stss.get(&name).await.unwrap(); - let pod = pods.api.get(&format!("{}-1", name)).await.unwrap(); pods.upgrade( @@ -131,50 +52,13 @@ async fn upgrade_pod_succeeds_if_already_current_with_force_upgrade() { .await .unwrap(); - helm::uninstall_chart(namespace, &name).await.unwrap(); + teardown(&namespace, &name).await; } #[ignore = "needs a running kubernetes cluster and the helm cli"] #[tokio::test] async fn upgrade_pod_succeeds_if_outdated_and_standby() { - let client = Client::try_default().await.unwrap(); - - let namespace = &get_namespace(); - - let suffix = rand::random::(); - let name = format!("vault-mgmt-e2e-{}", suffix); - dbg!(&name); - - let version = "1.12.0"; - - helm::add_repo().await.unwrap(); - helm::install_chart(namespace, &name, Some(&version)) - .await - .unwrap(); - - let pods = Api::namespaced(client.clone(), namespace); - let stss = Api::namespaced(Client::try_default().await.unwrap(), namespace); - - let init = prepare::init_unseal_cluster(&pods, &stss, &name) - .await - .unwrap(); - - dbg!( - &init - .keys - .iter() - .map(|k| k.expose_secret()) - .collect::>(), - &init.root_token.expose_secret() - ); - - let pods = PodApi::new(pods, false, "".to_string()); - - let mut pf = pods.http(&format!("{}-0", name), VAULT_PORT).await.unwrap(); - - pf.await_raft_configuration(init.root_token.clone(), raft_configuration_all_voters()) - .await - .unwrap(); + let (namespace, name, _, stss, init, pods) = setup("upgrade-outdated", VAULT_VERSION_OLD).await; match stss.entry(&name).await.unwrap() { Entry::Occupied(sts) => { @@ -191,7 +75,9 @@ async fn upgrade_pod_succeeds_if_outdated_and_standby() { .iter_mut() { if container.name == "vault" { - container.image = Some("vault:1.13.0".to_string()); + container.image = Some( + format!("{}:{}", VAULT_IMAGE_NAME, VAULT_VERSION_CURRENT).to_string(), + ); } } }) @@ -203,12 +89,11 @@ async fn upgrade_pod_succeeds_if_outdated_and_standby() { } let sts = stss.get(&name).await.unwrap(); - let pod = pods.api.get(&format!("{}-1", name)).await.unwrap(); assert_eq!( VaultVersion::try_from(&pod).unwrap(), - VaultVersion::from_str("1.12.0").unwrap() + VaultVersion::from_str(VAULT_VERSION_OLD).unwrap() ); pods.upgrade( @@ -225,53 +110,16 @@ async fn upgrade_pod_succeeds_if_outdated_and_standby() { let pod = pods.api.get(&format!("{}-1", name)).await.unwrap(); assert_eq!( VaultVersion::try_from(&pod).unwrap(), - VaultVersion::from_str("1.13.0").unwrap() + VaultVersion::from_str(VAULT_VERSION_CURRENT).unwrap() ); - helm::uninstall_chart(namespace, &name).await.unwrap(); + teardown(&namespace, &name).await; } #[ignore = "needs a running kubernetes cluster and the helm cli"] #[tokio::test] async fn upgrade_pod_succeeds_if_outdated_and_active() { - let client = Client::try_default().await.unwrap(); - - let namespace = &get_namespace(); - - let suffix = rand::random::(); - let name = format!("vault-mgmt-e2e-{}", suffix); - dbg!(&name); - - let version = "1.12.0"; - - helm::add_repo().await.unwrap(); - helm::install_chart(namespace, &name, Some(&version)) - .await - .unwrap(); - - let pods = Api::namespaced(client.clone(), namespace); - let stss = Api::namespaced(Client::try_default().await.unwrap(), namespace); - - let init = prepare::init_unseal_cluster(&pods, &stss, &name) - .await - .unwrap(); - - dbg!( - &init - .keys - .iter() - .map(|k| k.expose_secret()) - .collect::>(), - &init.root_token.expose_secret() - ); - - let pods = PodApi::new(pods, false, "".to_string()); - - let mut pf = pods.http(&format!("{}-0", name), VAULT_PORT).await.unwrap(); - - pf.await_raft_configuration(init.root_token.clone(), raft_configuration_all_voters()) - .await - .unwrap(); + let (namespace, name, _, stss, init, pods) = setup("upgrade-outdated", VAULT_VERSION_OLD).await; match stss.entry(&name).await.unwrap() { Entry::Occupied(sts) => { @@ -288,7 +136,9 @@ async fn upgrade_pod_succeeds_if_outdated_and_active() { .iter_mut() { if container.name == "vault" { - container.image = Some("vault:1.13.0".to_string()); + container.image = Some( + format!("{}:{}", VAULT_IMAGE_NAME, VAULT_VERSION_CURRENT).to_string(), + ); } } }) @@ -300,12 +150,11 @@ async fn upgrade_pod_succeeds_if_outdated_and_active() { } let sts = stss.get(&name).await.unwrap(); - let pod = pods.api.get(&format!("{}-0", name)).await.unwrap(); assert_eq!( VaultVersion::try_from(&pod).unwrap(), - VaultVersion::from_str("1.12.0").unwrap() + VaultVersion::from_str(VAULT_VERSION_OLD).unwrap() ); pods.upgrade( @@ -322,53 +171,17 @@ async fn upgrade_pod_succeeds_if_outdated_and_active() { let pod = pods.api.get(&format!("{}-0", name)).await.unwrap(); assert_eq!( VaultVersion::try_from(&pod).unwrap(), - VaultVersion::from_str("1.13.0").unwrap() + VaultVersion::from_str(VAULT_VERSION_CURRENT).unwrap() ); - helm::uninstall_chart(namespace, &name).await.unwrap(); + teardown(&namespace, &name).await; } #[ignore = "needs a running kubernetes cluster and the helm cli"] #[tokio::test] async fn upgrade_pod_succeeds_fails_with_missing_external_unseal() { - let client = Client::try_default().await.unwrap(); - - let namespace = &get_namespace(); - - let suffix = rand::random::(); - let name = format!("vault-mgmt-e2e-{}", suffix); - dbg!(&name); - - let version = "1.12.0"; - - helm::add_repo().await.unwrap(); - helm::install_chart(namespace, &name, Some(&version)) - .await - .unwrap(); - - let pods = Api::namespaced(client.clone(), namespace); - let stss = Api::namespaced(Client::try_default().await.unwrap(), namespace); - - let init = prepare::init_unseal_cluster(&pods, &stss, &name) - .await - .unwrap(); - - dbg!( - &init - .keys - .iter() - .map(|k| k.expose_secret()) - .collect::>(), - &init.root_token.expose_secret() - ); - - let pods = PodApi::new(pods, false, "".to_string()); - - let mut pf = pods.http(&format!("{}-0", name), VAULT_PORT).await.unwrap(); - - pf.await_raft_configuration(init.root_token.clone(), raft_configuration_all_voters()) - .await - .unwrap(); + let (namespace, name, _, stss, init, pods) = + setup("upgrade-miss-ext-unseal", VAULT_VERSION_OLD).await; match stss.entry(&name).await.unwrap() { Entry::Occupied(sts) => { @@ -385,7 +198,9 @@ async fn upgrade_pod_succeeds_fails_with_missing_external_unseal() { .iter_mut() { if container.name == "vault" { - container.image = Some("vault:1.13.0".to_string()); + container.image = Some( + format!("{}:{}", VAULT_IMAGE_NAME, VAULT_VERSION_CURRENT).to_string(), + ); } } }) @@ -397,12 +212,11 @@ async fn upgrade_pod_succeeds_fails_with_missing_external_unseal() { } let sts = stss.get(&name).await.unwrap(); - let pod = pods.api.get(&format!("{}-1", name)).await.unwrap(); assert_eq!( VaultVersion::try_from(&pod).unwrap(), - VaultVersion::from_str("1.12.0").unwrap() + VaultVersion::from_str(VAULT_VERSION_OLD).unwrap() ); tokio::time::timeout( @@ -419,50 +233,14 @@ async fn upgrade_pod_succeeds_fails_with_missing_external_unseal() { .await .expect_err("upgrade should timeout"); - helm::uninstall_chart(namespace, &name).await.unwrap(); + teardown(&namespace, &name).await; } #[ignore = "needs a running kubernetes cluster and the helm cli"] #[tokio::test] async fn upgrade_pod_succeeds_with_external_unseal() { - let client = Client::try_default().await.unwrap(); - - let namespace = &get_namespace(); - - let suffix = rand::random::(); - let name = format!("vault-mgmt-e2e-{}", suffix); - dbg!(&name); - - let version = "1.12.0"; - - helm::add_repo().await.unwrap(); - helm::install_chart(namespace, &name, Some(&version)) - .await - .unwrap(); - - let pods = Api::namespaced(client.clone(), namespace); - let stss = Api::namespaced(Client::try_default().await.unwrap(), namespace); - - let init = prepare::init_unseal_cluster(&pods, &stss, &name) - .await - .unwrap(); - - dbg!( - &init - .keys - .iter() - .map(|k| k.expose_secret()) - .collect::>(), - &init.root_token.expose_secret() - ); - - let pods = PodApi::new(pods, false, "".to_string()); - - let mut pf = pods.http(&format!("{}-0", name), VAULT_PORT).await.unwrap(); - - pf.await_raft_configuration(init.root_token.clone(), raft_configuration_all_voters()) - .await - .unwrap(); + let (namespace, name, _, stss, init, pods) = + setup("upgrade-with-ext-unseal", VAULT_VERSION_OLD).await; match stss.entry(&name).await.unwrap() { Entry::Occupied(sts) => { @@ -479,7 +257,9 @@ async fn upgrade_pod_succeeds_with_external_unseal() { .iter_mut() { if container.name == "vault" { - container.image = Some("vault:1.13.0".to_string()); + container.image = Some( + format!("{}:{}", VAULT_IMAGE_NAME, VAULT_VERSION_CURRENT).to_string(), + ); } } }) @@ -491,23 +271,23 @@ async fn upgrade_pod_succeeds_with_external_unseal() { } let sts = stss.get(&name).await.unwrap(); - let pod = pods.api.get(&format!("{}-1", name)).await.unwrap(); assert_eq!( VaultVersion::try_from(&pod).unwrap(), - VaultVersion::from_str("1.12.0").unwrap() + VaultVersion::from_str(VAULT_VERSION_OLD).unwrap() ); let pods_unseal = pods.clone(); let name_unseal = name.clone(); + let uid = pod.uid().unwrap(); let init_unseal = init.clone(); tokio::spawn(async move { kube::runtime::wait::await_condition( pods_unseal.api.clone(), &format!("{}-1", &name_unseal), - Condition::not(is_pod_running()), + is_deleted(&uid), ) .await .unwrap(); @@ -535,10 +315,10 @@ async fn upgrade_pod_succeeds_with_external_unseal() { init.root_token, false, false, - &vec![], + &[], ) .await .unwrap(); - helm::uninstall_chart(namespace, &name).await.unwrap(); + teardown(&namespace, &name).await; }