diff --git a/Cargo.lock b/Cargo.lock index 2ce6ba7..385961c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -54,9 +54,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ "getrandom", "once_cell", @@ -65,14 +65,15 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.3" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" dependencies = [ "cfg-if 1.0.0", "getrandom", "once_cell", "version_check", + "zerocopy", ] [[package]] @@ -140,7 +141,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" dependencies = [ - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -150,7 +151,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -183,31 +184,44 @@ dependencies = [ ] [[package]] -name = "async-executor" -version = "1.6.0" +name = "async-channel" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b0c4a4f319e45986f347ee47fef8bf5e81c9abc3f6f58dc2391439f30df65f0" +checksum = "1ca33f4bc4ed1babef42cad36cc1f51fa88be00420404e5b1e80ab1b18f7678c" dependencies = [ - "async-lock", + "concurrent-queue", + "event-listener 4.0.0", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-executor" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" +dependencies = [ + "async-lock 3.1.2", "async-task", "concurrent-queue", "fastrand 2.0.1", - "futures-lite", + "futures-lite 2.0.1", "slab", ] [[package]] name = "async-global-executor" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776" +checksum = "9b4353121d5644cdf2beb5726ab752e79a8db1ebb52031770ec47db31d245526" dependencies = [ - "async-channel", + "async-channel 2.1.1", "async-executor", - "async-io", - "async-lock", + "async-io 2.2.1", + "async-lock 3.1.2", "blocking", - "futures-lite", + "futures-lite 2.0.1", "once_cell", ] @@ -217,20 +231,39 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ - "async-lock", + "async-lock 2.8.0", "autocfg", "cfg-if 1.0.0", "concurrent-queue", - "futures-lite", + "futures-lite 1.13.0", "log", "parking", - "polling", - "rustix 0.37.26", + "polling 2.8.0", + "rustix 0.37.27", "slab", "socket2 0.4.10", "waker-fn", ] +[[package]] +name = "async-io" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6d3b15875ba253d1110c740755e246537483f152fa334f91abd7fe84c88b3ff" +dependencies = [ + "async-lock 3.1.2", + "cfg-if 1.0.0", + "concurrent-queue", + "futures-io", + "futures-lite 2.0.1", + "parking", + "polling 3.3.1", + "rustix 0.38.25", + "slab", + "tracing", + "windows-sys 0.52.0", +] + [[package]] name = "async-lock" version = "2.8.0" @@ -240,6 +273,17 @@ dependencies = [ "event-listener 2.5.3", ] +[[package]] +name = "async-lock" +version = "3.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dea8b3453dd7cc96711834b75400d671b73e3656975fa68d9f277163b7f7e316" +dependencies = [ + "event-listener 4.0.0", + "event-listener-strategy", + "pin-project-lite", +] + [[package]] name = "async-native-tls" version = "0.3.3" @@ -258,15 +302,15 @@ version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" dependencies = [ - "async-io", - "async-lock", + "async-io 1.13.0", + "async-lock 2.8.0", "async-signal", "blocking", "cfg-if 1.0.0", - "event-listener 3.0.0", - "futures-lite", - "rustix 0.38.20", - "windows-sys", + "event-listener 3.1.0", + "futures-lite 1.13.0", + "rustix 0.38.25", + "windows-sys 0.48.0", ] [[package]] @@ -276,7 +320,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07da4ce523b4e2ebaaf330746761df23a465b951a83d84bbce4233dabedae630" dependencies = [ "anyhow", - "async-lock", + "async-lock 2.8.0", "async-trait", "base64 0.13.1", "bincode", @@ -292,20 +336,20 @@ dependencies = [ [[package]] name = "async-signal" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2a5415b7abcdc9cd7d63d6badba5288b2ca017e3fbd4173b8f405449f1a2399" +checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" dependencies = [ - "async-io", - "async-lock", + "async-io 2.2.1", + "async-lock 2.8.0", "atomic-waker", "cfg-if 1.0.0", "futures-core", "futures-io", - "rustix 0.38.20", + "rustix 0.38.25", "signal-hook-registry", "slab", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -324,16 +368,16 @@ version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" dependencies = [ - "async-channel", + "async-channel 1.9.0", "async-global-executor", - "async-io", - "async-lock", + "async-io 1.13.0", + "async-lock 2.8.0", "async-process", "crossbeam-utils", "futures-channel", "futures-core", "futures-io", - "futures-lite", + "futures-lite 1.13.0", "gloo-timers", "kv-log-macro", "log", @@ -359,7 +403,7 @@ checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -386,6 +430,16 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" +[[package]] +name = "atomic-write-file" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ae364a6c1301604bbc6dfbf8c385c47ff82301dd01eef506195a029196d8d04" +dependencies = [ + "nix", + "rand", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -399,15 +453,49 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" dependencies = [ "async-trait", - "axum-core", - "axum-macros", + "axum-core 0.3.4", + "axum-macros 0.3.8", "bitflags 1.3.2", "bytes", "futures-util", - "headers", - "http", - "http-body", - "hyper", + "headers 0.3.9", + "http 0.2.11", + "http-body 0.4.5", + "hyper 0.14.27", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "810a80b128d70e6ed2bdf3fe8ed72c0ae56f5f5948d01c2753282dd92a84fce8" +dependencies = [ + "async-trait", + "axum-core 0.4.0", + "axum-macros 0.4.0", + "bytes", + "futures-util", + "http 1.0.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.0.1", + "hyper-util", "itoa", "matchit", "memchr", @@ -435,27 +523,47 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http", - "http-body", + "http 0.2.11", + "http-body 0.4.5", "mime", "rustversion", "tower-layer", "tower-service", ] +[[package]] +name = "axum-core" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de0ddc355eab88f4955090a823715df47acf0b7660aab7a69ad5ce6301ee3b73" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http 1.0.0", + "http-body 1.0.0", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper", + "tower-layer", + "tower-service", +] + [[package]] name = "axum-extra" version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a93e433be9382c737320af3924f7d5fc6f89c155cf2bf88949d8f5126fab283f" dependencies = [ - "axum", - "axum-core", + "axum 0.6.20", + "axum-core 0.3.4", "bytes", - "cookie", + "cookie 0.17.0", "futures-util", - "http", - "http-body", + "http 0.2.11", + "http-body 0.4.5", "mime", "pin-project-lite", "serde", @@ -471,13 +579,12 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ab90e7b70bea63a153137162affb6a0bce26b584c24a4c7885509783e2cf30b" dependencies = [ - "axum", - "axum-core", + "axum 0.6.20", + "axum-core 0.3.4", "bytes", - "cookie", "futures-util", - "http", - "http-body", + "http 0.2.11", + "http-body 0.4.5", "mime", "pin-project-lite", "serde", @@ -487,6 +594,29 @@ dependencies = [ "tower-service", ] +[[package]] +name = "axum-extra" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "523ae92256049a3b02d3bb4df80152386cd97ddba0c8c5077619bdc8c4b1859b" +dependencies = [ + "axum 0.7.1", + "axum-core 0.4.0", + "bytes", + "cookie 0.18.0", + "futures-util", + "headers 0.4.0", + "http 1.0.0", + "http-body 1.0.0", + "http-body-util", + "mime", + "pin-project-lite", + "serde", + "tower", + "tower-layer", + "tower-service", +] + [[package]] name = "axum-macros" version = "0.3.8" @@ -496,7 +626,19 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", +] + +[[package]] +name = "axum-macros" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a2edad600410b905404c594e2523549f1bcd4bded1e252c8f74524ccce0b867" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.39", ] [[package]] @@ -506,10 +648,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c84930174d586fdc66a8c317cdf48b8bb487a1d079c38efc67d81a80c11c664f" dependencies = [ "async-session", - "axum", + "axum 0.6.20", "axum-extra 0.7.7", "futures", - "http-body", + "http-body 0.4.5", "tokio", "tower", "tracing", @@ -544,9 +686,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.4" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" [[package]] name = "base64-compat" @@ -568,8 +710,8 @@ name = "basic" version = "0.1.0" dependencies = [ "anyhow", - "axum", - "clap 4.4.7", + "axum 0.7.1", + "clap 4.4.10", "nefarious-login", "tokio", "tracing-subscriber", @@ -634,16 +776,16 @@ dependencies = [ [[package]] name = "blocking" -version = "1.4.1" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c36a4d0d48574b3dd360b4b7d95cc651d2b6557b6402848a27d4b228a473e2a" +checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" dependencies = [ - "async-channel", - "async-lock", + "async-channel 2.1.1", + "async-lock 3.1.2", "async-task", "fastrand 2.0.1", "futures-io", - "futures-lite", + "futures-lite 2.0.1", "piper", "tracing", ] @@ -699,7 +841,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets", + "windows-targets 0.48.5", ] [[package]] @@ -717,8 +859,8 @@ name = "clap" version = "0.1.0" dependencies = [ "anyhow", - "axum", - "clap 4.4.7", + "axum 0.7.1", + "clap 4.4.10", "nefarious-login", "tokio", "tracing-subscriber", @@ -726,9 +868,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.7" +version = "4.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" +checksum = "41fffed7514f420abec6d183b1d3acfd9099c79c3a10a06ade4f8203f1411272" dependencies = [ "clap_builder", "clap_derive", @@ -736,9 +878,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.7" +version = "4.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" +checksum = "63361bae7eef3771745f02d8d892bec2fee5f6e34af316ba556e7f97a7069ff1" dependencies = [ "anstream", "anstyle", @@ -755,7 +897,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -797,8 +939,7 @@ version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7efb37c3e1ccb1ff97164ad95ac1606e8ccd35b3fa0a7d99a304c7f4a428cc24" dependencies = [ - "aes-gcm", - "base64 0.21.4", + "base64 0.21.5", "hmac 0.12.1", "percent-encoding", "rand", @@ -808,6 +949,21 @@ dependencies = [ "version_check", ] +[[package]] +name = "cookie" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cd91cf61412820176e137621345ee43b3f4423e589e7ae4e50d601d93e35ef8" +dependencies = [ + "aes-gcm", + "base64 0.21.5", + "percent-encoding", + "rand", + "subtle", + "time", + "version_check", +] + [[package]] name = "core-foundation" version = "0.9.3" @@ -826,9 +982,9 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpufeatures" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fbc60abd742b35f2492f808e1abbb83d45f72db402e14c55057edc9c7b1e9e4" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ "libc", ] @@ -848,7 +1004,7 @@ version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" dependencies = [ - "crc-catalog 2.2.0", + "crc-catalog 2.4.0", ] [[package]] @@ -859,9 +1015,9 @@ checksum = "ccaeedb56da03b09f598226e25e80088cb4cd25f316e6e4df7d695f0feeb1403" [[package]] name = "crc-catalog" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crossbeam-queue" @@ -884,9 +1040,9 @@ dependencies = [ [[package]] name = "crypto-bigint" -version = "0.5.3" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "740fe28e594155f10cfc383984cbefd529d7396050557148f79cb0f621204124" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", "rand_core", @@ -953,13 +1109,13 @@ dependencies = [ [[package]] name = "curve25519-dalek-derive" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -968,6 +1124,18 @@ version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f8a51dd197fa6ba5b4dc98a990a43cc13693c23eb0089ebb0fcc1f04152bca6" +[[package]] +name = "custom_redirect" +version = "0.1.0" +dependencies = [ + "anyhow", + "axum 0.7.1", + "clap 4.4.10", + "nefarious-login", + "tokio", + "tracing-subscriber", +] + [[package]] name = "darling" version = "0.20.3" @@ -989,7 +1157,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -1000,7 +1168,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -1085,15 +1253,15 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "dyn-clone" -version = "1.0.14" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" [[package]] name = "ecdsa" -version = "0.16.8" +version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ "der", "digest 0.10.7", @@ -1115,14 +1283,15 @@ dependencies = [ [[package]] name = "ed25519-dalek" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" +checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" dependencies = [ "curve25519-dalek", "ed25519", "serde", "sha2 0.10.8", + "subtle", "zeroize", ] @@ -1137,9 +1306,9 @@ dependencies = [ [[package]] name = "elliptic-curve" -version = "0.13.6" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97ca172ae9dc9f9b779a6e3a65d308f2af74e5b8c921299075bdb4a0370e914" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ "base16ct", "crypto-bigint", @@ -1173,12 +1342,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.5" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -1189,7 +1358,7 @@ checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" dependencies = [ "cfg-if 1.0.0", "home", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1200,15 +1369,36 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "event-listener" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29e56284f00d94c1bc7fd3c77027b4623c88c1f53d8d2394c6199f2921dea325" +checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" dependencies = [ "concurrent-queue", "parking", "pin-project-lite", ] +[[package]] +name = "event-listener" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "770d968249b5d99410d61f5bf89057f3199a077a04d087092f58e7d10692baae" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" +dependencies = [ + "event-listener 4.0.0", + "pin-project-lite", +] + [[package]] name = "fastrand" version = "1.9.0" @@ -1236,9 +1426,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.1" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0870c84016d4b481be5c9f323c24f65e31e901ae618f0e80f4308fb00de1d2d" +checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" [[package]] name = "finl_unicode" @@ -1280,9 +1470,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -1295,9 +1485,9 @@ checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" [[package]] name = "futures" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" dependencies = [ "futures-channel", "futures-core", @@ -1310,9 +1500,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" dependencies = [ "futures-core", "futures-sink", @@ -1320,15 +1510,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" dependencies = [ "futures-core", "futures-task", @@ -1359,9 +1549,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" [[package]] name = "futures-lite" @@ -1379,33 +1569,47 @@ dependencies = [ ] [[package]] -name = "futures-macro" -version = "0.3.28" +name = "futures-lite" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "d3831c2651acb5177cbd83943f3d9c8912c5ad03c76afcc0e9511ba568ec5ebb" +dependencies = [ + "fastrand 2.0.1", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite", +] + +[[package]] +name = "futures-macro" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" dependencies = [ "futures-channel", "futures-core", @@ -1432,9 +1636,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -1455,9 +1659,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "gloo-timers" @@ -1484,17 +1688,36 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.21" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" +checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" dependencies = [ "bytes", "fnv", "futures-core", "futures-sink", "futures-util", - "http", - "indexmap 1.9.3", + "http 0.2.11", + "indexmap 2.1.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d308f63daf4181410c242d34c11f928dcb3aa105852019e043c9d1f4e4368a" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 1.0.0", + "indexmap 2.1.0", "slab", "tokio", "tokio-util", @@ -1507,7 +1730,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" dependencies = [ - "ahash 0.7.6", + "ahash 0.7.7", ] [[package]] @@ -1518,11 +1741,11 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "allocator-api2", ] @@ -1541,7 +1764,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "hashbrown 0.14.2", + "hashbrown 0.14.3", ] [[package]] @@ -1550,10 +1773,25 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" dependencies = [ - "base64 0.21.4", + "base64 0.21.5", "bytes", - "headers-core", - "http", + "headers-core 0.2.0", + "http 0.2.11", + "httpdate", + "mime", + "sha1", +] + +[[package]] +name = "headers" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "322106e6bd0cba2d5ead589ddb8150a13d7c4217cf80d7c4f682ca994ccc6aa9" +dependencies = [ + "base64 0.21.5", + "bytes", + "headers-core 0.3.0", + "http 1.0.0", "httpdate", "mime", "sha1", @@ -1565,7 +1803,16 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" dependencies = [ - "http", + "http 0.2.11", +] + +[[package]] +name = "headers-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" +dependencies = [ + "http 1.0.0", ] [[package]] @@ -1623,14 +1870,25 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" dependencies = [ - "windows-sys", + "windows-sys 0.48.0", ] [[package]] name = "http" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" dependencies = [ "bytes", "fnv", @@ -1644,7 +1902,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", - "http", + "http 0.2.11", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +dependencies = [ + "bytes", + "http 1.0.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41cb79eb393015dadd30fc252023adb0b2400a0caee0fa2a077e6e21a551e840" +dependencies = [ + "bytes", + "futures-util", + "http 1.0.0", + "http-body 1.0.0", "pin-project-lite", ] @@ -1676,9 +1957,9 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2", - "http", - "http-body", + "h2 0.3.22", + "http 0.2.11", + "http-body 0.4.5", "httparse", "httpdate", "itoa", @@ -1691,19 +1972,58 @@ dependencies = [ ] [[package]] -name = "hyper-rustls" -version = "0.24.1" +name = "hyper" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" +checksum = "403f9214f3e703236b221f1a9cd88ec8b4adfa5296de01ab96216361f4692f56" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.0", + "http 1.0.0", + "http-body 1.0.0", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http", - "hyper", + "http 0.2.11", + "hyper 0.14.27", "rustls", "tokio", "tokio-rustls", ] +[[package]] +name = "hyper-util" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ca339002caeb0d159cc6e023dff48e199f081e42fa039895c7c6f38b37f2e9d" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.0.0", + "http-body 1.0.0", + "hyper 1.0.1", + "pin-project-lite", + "socket2 0.5.5", + "tokio", + "tower", + "tower-service", + "tracing", +] + [[package]] name = "iana-time-zone" version = "0.1.58" @@ -1735,9 +2055,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -1756,12 +2076,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.2", + "hashbrown 0.14.3", "serde", ] @@ -1791,7 +2111,7 @@ checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ "hermit-abi", "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1826,9 +2146,9 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" dependencies = [ "wasm-bindgen", ] @@ -1839,9 +2159,9 @@ version = "9.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "155c4d7e39ad04c172c5e3a99c434ea3b4a7ba7960b38ecd562b270b097cce09" dependencies = [ - "base64 0.21.4", + "base64 0.21.5", "pem", - "ring 0.17.5", + "ring", "serde", "serde_json", "simple_asn1", @@ -1867,9 +2187,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.149" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "libm" @@ -1878,10 +2198,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] -name = "libsqlite3-sys" -version = "0.26.0" +name = "libredox" +version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc22eff61b133b115c6e8c74e818c628d6d5e7a502afea6f64dee076dd94326" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall 0.4.1", +] + +[[package]] +name = "libsqlite3-sys" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" dependencies = [ "cc", "pkg-config", @@ -1896,9 +2227,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" +checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" [[package]] name = "lock_api" @@ -1973,13 +2304,13 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" dependencies = [ "libc", "wasi", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -2007,17 +2338,17 @@ dependencies = [ "anyhow", "async-sqlx-session", "async-trait", - "axum", - "axum-extra 0.8.0", + "axum 0.7.1", + "axum-extra 0.9.0", "axum-sessions", - "clap 4.4.7", + "clap 4.4.10", "oauth2", "openidconnect", "pretty_assertions", "sealed_test", "serde", "serde_json", - "sqlx 0.7.2", + "sqlx 0.7.3", "tokio", "tower", "tower-http", @@ -2026,6 +2357,17 @@ dependencies = [ "zitadel", ] +[[package]] +name = "nix" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" +dependencies = [ + "bitflags 2.4.1", + "cfg-if 1.0.0", + "libc", +] + [[package]] name = "nom" version = "7.1.3" @@ -2036,6 +2378,18 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "noop" +version = "0.1.0" +dependencies = [ + "anyhow", + "axum 0.7.1", + "clap 4.4.10", + "nefarious-login", + "tokio", + "tracing-subscriber", +] + [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -2124,7 +2478,7 @@ dependencies = [ "base64 0.13.1", "chrono", "getrandom", - "http", + "http 0.2.11", "rand", "reqwest", "serde", @@ -2167,7 +2521,7 @@ dependencies = [ "dyn-clone", "ed25519-dalek", "hmac 0.12.1", - "http", + "http 0.2.11", "itertools 0.10.5", "log", "oauth2", @@ -2190,9 +2544,9 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.57" +version = "0.10.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" +checksum = "79a4c6c3a2b158f7f8f2a2fc5a969fa3a068df6fc9dbb4a43845436e3af7c800" dependencies = [ "bitflags 2.4.1", "cfg-if 1.0.0", @@ -2211,7 +2565,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -2222,9 +2576,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.93" +version = "0.9.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" +checksum = "3812c071ba60da8b5677cc12bcb1d42989a65553772897a7e0355545a819838f" dependencies = [ "cc", "libc", @@ -2322,7 +2676,7 @@ dependencies = [ "libc", "redox_syscall 0.4.1", "smallvec", - "windows-targets", + "windows-targets 0.48.5", ] [[package]] @@ -2337,7 +2691,7 @@ version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3163d2912b7c3b52d651a055f2c7eec9ba5cd22d26ef75b8dd3a59980b185923" dependencies = [ - "base64 0.21.4", + "base64 0.21.5", "serde", ] @@ -2352,9 +2706,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project" @@ -2373,7 +2727,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -2428,9 +2782,9 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "platforms" -version = "3.1.2" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4503fa043bf02cee09a9582e9554b4c6403b2ef55e4612e96561d294419429f8" +checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" [[package]] name = "polling" @@ -2445,7 +2799,21 @@ dependencies = [ "libc", "log", "pin-project-lite", - "windows-sys", + "windows-sys 0.48.0", +] + +[[package]] +name = "polling" +version = "3.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf63fa624ab313c11656b4cda960bfc46c410187ad493c41f6ba2d8c1e991c9e" +dependencies = [ + "cfg-if 1.0.0", + "concurrent-queue", + "pin-project-lite", + "rustix 0.38.25", + "tracing", + "windows-sys 0.52.0", ] [[package]] @@ -2484,18 +2852,18 @@ dependencies = [ [[package]] name = "primeorder" -version = "0.13.2" +version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c2fcef82c0ec6eefcc179b978446c399b3cdf73c392c35604e399eee6df1ee3" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" dependencies = [ "elliptic-curve", ] [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ "unicode-ident", ] @@ -2554,15 +2922,6 @@ dependencies = [ "bitflags 1.3.2", ] -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.4.1" @@ -2574,12 +2933,12 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ "getrandom", - "redox_syscall 0.2.16", + "libredox", "thiserror", ] @@ -2633,15 +2992,15 @@ version = "0.11.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" dependencies = [ - "base64 0.21.4", + "base64 0.21.5", "bytes", "encoding_rs", "futures-core", "futures-util", - "h2", - "http", - "http-body", - "hyper", + "h2 0.3.22", + "http 0.2.11", + "http-body 0.4.5", + "hyper 0.14.27", "hyper-rustls", "ipnet", "js-sys", @@ -2663,7 +3022,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.25.2", + "webpki-roots", "winreg", ] @@ -2677,21 +3036,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin 0.5.2", - "untrusted 0.7.1", - "web-sys", - "winapi", -] - [[package]] name = "ring" version = "0.17.5" @@ -2702,22 +3046,20 @@ dependencies = [ "getrandom", "libc", "spin 0.9.8", - "untrusted 0.9.0", - "windows-sys", + "untrusted", + "windows-sys 0.48.0", ] [[package]] name = "rsa" -version = "0.9.2" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ab43bb47d23c1a631b4b680199a45255dce26fa9ab2fa902581f624ff13e6a8" +checksum = "af6c4b23d99685a1408194da11270ef8e9809aff951cc70ec9b17350b087e474" dependencies = [ - "byteorder", "const-oid", "digest 0.10.7", "num-bigint-dig", "num-integer", - "num-iter", "num-traits", "pkcs1", "pkcs8", @@ -2745,60 +3087,60 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.26" +version = "0.37.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84f3f8f960ed3b5a59055428714943298bf3fa2d4a1d53135084e0544829d995" +checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" dependencies = [ "bitflags 1.3.2", "errno", "io-lifetimes", "libc", "linux-raw-sys 0.3.8", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] name = "rustix" -version = "0.38.20" +version = "0.38.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ce50cb2e16c2903e30d1cbccfd8387a74b9d4c938b6a4c5ec6cc7556f7a8a0" +checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" dependencies = [ "bitflags 2.4.1", "errno", "libc", - "linux-raw-sys 0.4.10", - "windows-sys", + "linux-raw-sys 0.4.11", + "windows-sys 0.48.0", ] [[package]] name = "rustls" -version = "0.21.7" +version = "0.21.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" +checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" dependencies = [ "log", - "ring 0.16.20", + "ring", "rustls-webpki", "sct", ] [[package]] name = "rustls-pemfile" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.4", + "base64 0.21.5", ] [[package]] name = "rustls-webpki" -version = "0.101.6" +version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", + "ring", + "untrusted", ] [[package]] @@ -2831,7 +3173,7 @@ version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -2842,12 +3184,12 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", + "ring", + "untrusted", ] [[package]] @@ -2917,9 +3259,9 @@ checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" [[package]] name = "serde" -version = "1.0.189" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] @@ -2936,13 +3278,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.189" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -2993,11 +3335,11 @@ version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64cd236ccc1b7a29e7e2739f27c0b2dd199804abc4290e32f59f3b68d6405c23" dependencies = [ - "base64 0.21.4", + "base64 0.21.5", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.0.2", + "indexmap 2.1.0", "serde", "serde_json", "serde_with_macros", @@ -3013,7 +3355,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -3082,9 +3424,9 @@ dependencies = [ [[package]] name = "signature" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest 0.10.7", "rand_core", @@ -3113,9 +3455,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.1" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "socket2" @@ -3134,7 +3476,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -3196,12 +3538,12 @@ dependencies = [ [[package]] name = "sqlx" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e50c216e3624ec8e7ecd14c6a6a6370aad6ee5d8cfc3ab30b5162eeeef2ed33" +checksum = "dba03c279da73694ef99763320dea58b51095dfe87d001b1d4b5fe78ba8763cf" dependencies = [ - "sqlx-core 0.7.2", - "sqlx-macros 0.7.2", + "sqlx-core 0.7.3", + "sqlx-macros 0.7.3", "sqlx-mysql", "sqlx-postgres", "sqlx-sqlite", @@ -3213,7 +3555,7 @@ version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48c61941ccf5ddcada342cd59e3e5173b007c509e1e8e990dafc830294d9dc5" dependencies = [ - "ahash 0.7.6", + "ahash 0.7.7", "atoi 0.4.0", "base64 0.13.1", "bitflags 1.3.2", @@ -3258,11 +3600,11 @@ dependencies = [ [[package]] name = "sqlx-core" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d6753e460c998bbd4cd8c6f0ed9a64346fcca0723d6e75e52fdc351c5d2169d" +checksum = "d84b0a3c3739e220d94b3239fd69fb1f74bc36e16643423bd99de3b43c21bfbd" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "atoi 2.0.0", "byteorder", "bytes", @@ -3278,14 +3620,12 @@ dependencies = [ "futures-util", "hashlink 0.8.4", "hex", - "indexmap 2.0.2", + "indexmap 2.1.0", "log", "memchr", "once_cell", "paste", "percent-encoding", - "rustls", - "rustls-pemfile", "serde", "serde_json", "sha2 0.10.8", @@ -3296,7 +3636,6 @@ dependencies = [ "tokio-stream", "tracing", "url", - "webpki-roots 0.24.0", ] [[package]] @@ -3321,23 +3660,24 @@ dependencies = [ [[package]] name = "sqlx-macros" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a793bb3ba331ec8359c1853bd39eed32cdd7baaf22c35ccf5c92a7e8d1189ec" +checksum = "89961c00dc4d7dffb7aee214964b065072bff69e36ddb9e2c107541f75e4f2a5" dependencies = [ "proc-macro2", "quote", - "sqlx-core 0.7.2", + "sqlx-core 0.7.3", "sqlx-macros-core", "syn 1.0.109", ] [[package]] name = "sqlx-macros-core" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4ee1e104e00dedb6aa5ffdd1343107b0a4702e862a84320ee7cc74782d96fc" +checksum = "d0bd4519486723648186a08785143599760f7cc81c52334a55d6a83ea1e20841" dependencies = [ + "atomic-write-file", "dotenvy", "either", "heck", @@ -3348,7 +3688,7 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.8", - "sqlx-core 0.7.2", + "sqlx-core 0.7.3", "sqlx-mysql", "sqlx-postgres", "sqlx-sqlite", @@ -3360,12 +3700,12 @@ dependencies = [ [[package]] name = "sqlx-mysql" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "864b869fdf56263f4c95c45483191ea0af340f9f3e3e7b4d57a61c7c87a970db" +checksum = "e37195395df71fd068f6e2082247891bc11e3289624bbc776a0cdfa1ca7f1ea4" dependencies = [ "atoi 2.0.0", - "base64 0.21.4", + "base64 0.21.5", "bitflags 2.4.1", "byteorder", "bytes", @@ -3393,7 +3733,7 @@ dependencies = [ "sha1", "sha2 0.10.8", "smallvec", - "sqlx-core 0.7.2", + "sqlx-core 0.7.3", "stringprep", "thiserror", "tracing", @@ -3402,12 +3742,12 @@ dependencies = [ [[package]] name = "sqlx-postgres" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb7ae0e6a97fb3ba33b23ac2671a5ce6e3cabe003f451abd5a56e7951d975624" +checksum = "d6ac0ac3b7ccd10cc96c7ab29791a7dd236bd94021f31eec7ba3d46a74aa1c24" dependencies = [ "atoi 2.0.0", - "base64 0.21.4", + "base64 0.21.5", "bitflags 2.4.1", "byteorder", "crc 3.0.1", @@ -3432,7 +3772,7 @@ dependencies = [ "sha1", "sha2 0.10.8", "smallvec", - "sqlx-core 0.7.2", + "sqlx-core 0.7.3", "stringprep", "thiserror", "tracing", @@ -3452,9 +3792,9 @@ dependencies = [ [[package]] name = "sqlx-sqlite" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59dc83cf45d89c555a577694534fcd1b55c545a816c816ce51f20bbe56a4f3f" +checksum = "210976b7d948c7ba9fced8ca835b11cbb2d677c59c79de41ac0d397e14547490" dependencies = [ "atoi 2.0.0", "flume", @@ -3467,9 +3807,10 @@ dependencies = [ "log", "percent-encoding", "serde", - "sqlx-core 0.7.2", + "sqlx-core 0.7.3", "tracing", "url", + "urlencoding", ] [[package]] @@ -3508,9 +3849,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.38" +version = "2.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" dependencies = [ "proc-macro2", "quote", @@ -3546,15 +3887,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.8.0" +version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" +checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" dependencies = [ "cfg-if 1.0.0", "fastrand 2.0.1", - "redox_syscall 0.3.5", - "rustix 0.38.20", - "windows-sys", + "redox_syscall 0.4.1", + "rustix 0.38.25", + "windows-sys 0.48.0", ] [[package]] @@ -3574,7 +3915,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -3633,9 +3974,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.33.0" +version = "1.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" +checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" dependencies = [ "backtrace", "bytes", @@ -3647,18 +3988,18 @@ dependencies = [ "signal-hook-registry", "socket2 0.5.5", "tokio-macros", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -3684,9 +4025,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", @@ -3722,8 +4063,8 @@ dependencies = [ "bytes", "futures-core", "futures-util", - "http", - "http-body", + "http 0.2.11", + "http-body 0.4.5", "http-range-header", "pin-project-lite", "tower-layer", @@ -3763,7 +4104,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -3778,20 +4119,20 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" dependencies = [ - "lazy_static", "log", + "once_cell", "tracing-core", ] [[package]] name = "tracing-subscriber" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ "matchers", "nu-ansi-term", @@ -3860,12 +4201,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - [[package]] name = "untrusted" version = "0.9.0" @@ -3874,9 +4209,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", @@ -3884,6 +4219,12 @@ dependencies = [ "serde", ] +[[package]] +name = "urlencoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" + [[package]] name = "utf8parse" version = "0.2.1" @@ -3892,9 +4233,12 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.5.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc" +checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" +dependencies = [ + "getrandom", +] [[package]] name = "valuable" @@ -3952,9 +4296,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -3962,24 +4306,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -3989,9 +4333,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3999,28 +4343,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" dependencies = [ "js-sys", "wasm-bindgen", @@ -4028,18 +4372,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.24.0" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b291546d5d9d1eab74f069c77749f2cb8504a12caa20f0f2de93ddbf6f411888" -dependencies = [ - "rustls-webpki", -] - -[[package]] -name = "webpki-roots" -version = "0.25.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" [[package]] name = "whoami" @@ -4079,7 +4414,7 @@ version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" dependencies = [ - "windows-targets", + "windows-targets 0.48.5", ] [[package]] @@ -4088,7 +4423,16 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", ] [[package]] @@ -4097,13 +4441,28 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", ] [[package]] @@ -4112,42 +4471,84 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + [[package]] name = "windows_i686_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + [[package]] name = "windows_i686_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + [[package]] name = "winreg" version = "0.50.0" @@ -4155,7 +4556,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ "cfg-if 1.0.0", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -4165,10 +4566,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" [[package]] -name = "zeroize" -version = "1.6.0" +name = "zerocopy" +version = "0.7.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" [[package]] name = "zitadel" @@ -4176,7 +4597,7 @@ version = "3.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aab76990d831d980e72e52f6eed5ef8e4a740ee7ad14c65e1a3374b974f92258" dependencies = [ - "axum", + "axum 0.6.20", "axum-extra 0.8.0", "base64-compat", "custom_error", diff --git a/Cargo.toml b/Cargo.toml index 102dd69..394fa47 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,34 +5,40 @@ resolver = "2" [workspace.dependencies] nefarious-login = { path = "crates/nefarious-login" } -anyhow = { version = "1.0.75" } +anyhow = { version = "1" } tokio = { version = "1", features = ["full"] } tracing = { version = "0.1", features = ["log"] } -tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } +tracing-subscriber = { version = "0.3", features = ["env-filter"] } -clap = {version = "4.4.7", features = ["derive", "env"]} -async-trait = {version = "0.1.74", features = []} +clap = { version = "4", features = ["derive", "env"] } +async-trait = { version = "0.1", features = [] } -axum = {version = "0.6.20", features = []} -axum-extra = {version = "0.8.0", features = ["cookie", "cookie-private"]} -axum-sessions = {version = "0.6.1", features = []} -async-sqlx-session = {version = "0.4.0", features = ["pg"]} +axum = { version = "0.7.1", features = [ + "macros", +] } +axum-extra = { version = "0.9.0", features = [ + "cookie", + "cookie-private", + "typed-header", +] } +axum-sessions = { version = "0.6.1", features = [] } +async-sqlx-session = { version = "0.4.0", features = ["pg"] } -serde = {version = "1.0", features = ["derive"]} -serde_json = {version = "1.0.108"} +serde = { version = "1", features = ["derive"] } +serde_json = { version = "1" } -uuid = {version = "1.5.0", features = []} -sqlx = { version = "0.7.2", features = [ - "runtime-tokio-rustls", - "postgres", +uuid = {version = "1.5.0", features = ["v4"]} +sqlx = { version = "0.7", features = [ + "runtime-tokio", + "postgres", "migrate", ] } -zitadel = { version = "3.4.29", features = ["axum"] } -tower = "0.4.13" -tower-http = { version = "0.4.4", features = ["cors", "trace"] } +zitadel = { version = "3.4", features = ["axum"] } +tower = "0.4" +tower-http = { version = "0.4", features = ["cors", "trace"] } oauth2 = "4.4.2" -openidconnect = "3.4.0" +openidconnect = "3.4" pretty_assertions = "1.4.0" sealed_test = "1.0.0" diff --git a/crates/nefarious-login/Cargo.toml b/crates/nefarious-login/Cargo.toml index a0e09ab..1d83e6d 100644 --- a/crates/nefarious-login/Cargo.toml +++ b/crates/nefarious-login/Cargo.toml @@ -26,4 +26,4 @@ openidconnect.workspace = true [dev-dependencies] tokio.workspace = true pretty_assertions.workspace = true -sealed_test.workspace = true \ No newline at end of file +sealed_test.workspace = true diff --git a/crates/nefarious-login/src/auth.rs b/crates/nefarious-login/src/auth.rs index 024980b..8099610 100644 --- a/crates/nefarious-login/src/auth.rs +++ b/crates/nefarious-login/src/auth.rs @@ -6,17 +6,22 @@ use axum::http::{header::SET_COOKIE, HeaderMap}; use oauth2::url::Url; use crate::{ - introspection::IntrospectionService, + introspection::{IdToken, IntrospectionService}, login::{auth_clap::AuthEngine, config::ConfigClap, AuthClap}, oauth::{zitadel::ZitadelConfig, OAuth}, - session::{SessionService, User}, + session::{AppSession, SessionService, User}, }; #[async_trait] pub trait Auth { - async fn login(&self) -> anyhow::Result; - async fn login_token(&self, user: &str, password: &str) -> anyhow::Result; - async fn login_authorized(&self, code: &str, state: &str) -> anyhow::Result<(HeaderMap, Url)>; + async fn login(&self, return_url: Option) -> anyhow::Result<(HeaderMap, Url)>; + async fn login_token(&self, user: &str, password: &str) -> anyhow::Result; + async fn login_authorized( + &self, + code: &str, + state: &str, + app_session_cookie: Option, + ) -> anyhow::Result<(HeaderMap, Url)>; async fn get_user_from_session(&self, cookie: &str) -> anyhow::Result; } @@ -26,12 +31,17 @@ pub struct AuthService(Arc); impl AuthService { pub async fn new(config: &AuthClap) -> anyhow::Result { match config.engine { - AuthEngine::Noop => Ok(Self::new_noop()), + AuthEngine::Noop => { + let session = SessionService::new(config).await?; + + Ok(Self::new_noop(session, &config.config)) + } AuthEngine::Zitadel => { let session = SessionService::new(config).await?; let oauth: OAuth = ZitadelConfig::try_from(config.zitadel.clone())?.into(); let introspection: IntrospectionService = IntrospectionService::new_zitadel(config).await?; + Ok(Self::new_zitadel( oauth, introspection, @@ -56,8 +66,11 @@ impl AuthService { })) } - pub fn new_noop() -> Self { - Self(Arc::new(NoopAuthService {})) + pub fn new_noop(session: SessionService, config: &ConfigClap) -> Self { + Self(Arc::new(NoopAuthService { + session, + config: config.clone(), + })) } } @@ -76,18 +89,107 @@ pub struct ZitadelAuthService { config: ConfigClap, } pub static COOKIE_NAME: &str = "SESSION"; +pub static COOKIE_APP_SESSION_NAME: &str = "APP_SESSION"; #[async_trait] impl Auth for ZitadelAuthService { - async fn login(&self) -> anyhow::Result { + async fn login(&self, return_url: Option) -> anyhow::Result<(HeaderMap, Url)> { + let mut headers = HeaderMap::new(); + if let Some(return_url) = return_url.clone() { + let cookie_value = self.session.insert(AppSession { return_url }).await?; + + let cookie = format!( + "{}={}; SameSite=Lax; Path=/", + COOKIE_APP_SESSION_NAME, cookie_value + ); + headers.insert(SET_COOKIE, cookie.parse().unwrap()); + } + let authorize_url = self.oauth.authorize_url().await?; - Ok(authorize_url) + Ok((headers, authorize_url)) } - async fn login_authorized(&self, code: &str, _state: &str) -> anyhow::Result<(HeaderMap, Url)> { + async fn login_authorized( + &self, + code: &str, + _state: &str, + app_session_cookie: Option, + ) -> anyhow::Result<(HeaderMap, Url)> { let token = self.oauth.exchange(code).await?; - let user_id = self.introspection.get_id_token(token.as_str()).await?; - let cookie_value = self.session.insert_user("user", user_id.as_str()).await?; + let id_token = self.introspection.get_id_token(token.as_str()).await?; + let cookie_value = self.session.insert_user("user", id_token).await?; + + let cookie = format!("{}={}; SameSite=Lax; Path=/", COOKIE_NAME, cookie_value); + + let mut headers = HeaderMap::new(); + headers.insert(SET_COOKIE, cookie.parse().unwrap()); + + let mut return_url = self.config.return_url.clone(); + if let Some(cookie) = app_session_cookie { + if let Some(session) = self.session.get(&cookie).await? { + if session.return_url.starts_with('/') { + let mut url = Url::parse(&return_url)?; + url.set_path(&session.return_url); + return_url = url.to_string(); + } else { + return_url = session.return_url; + } + } + } + + Ok(( + headers, + Url::parse(&return_url) + .context("failed to parse login_authorized zitadel return url")?, + )) + } + async fn login_token(&self, _user: &str, password: &str) -> anyhow::Result { + self.introspection.get_id_token(password).await + } + async fn get_user_from_session(&self, cookie: &str) -> anyhow::Result { + match self.session.get_user(cookie).await? { + Some(u) => Ok(u), + None => Err(anyhow::anyhow!("failed to find user")), + } + } +} + +pub struct NoopAuthService { + session: SessionService, + config: ConfigClap, +} + +#[async_trait] +impl Auth for NoopAuthService { + async fn login(&self, return_url: Option) -> anyhow::Result<(HeaderMap, Url)> { + let url = Url::parse(&format!( + "{}/auth/authorized?code=noop&state=noop", + self.config + .return_url + .rsplit_once('/') + .map(|(a, _)| a) + .unwrap() + )) + .unwrap(); + Ok((HeaderMap::new(), url)) + } + async fn login_authorized( + &self, + _code: &str, + _state: &str, + _app_session_cookie: Option, + ) -> anyhow::Result<(HeaderMap, Url)> { + let cookie_value = self + .session + .insert_user( + "user", + IdToken { + sub: uuid::Uuid::new_v4().to_string(), + email: format!("{}@kjuulh.io", uuid::Uuid::new_v4()), + name: uuid::Uuid::new_v4().to_string(), + }, + ) + .await?; let cookie = format!("{}={}; SameSite=Lax; Path=/", COOKIE_NAME, cookie_value); @@ -100,37 +202,15 @@ impl Auth for ZitadelAuthService { .context("failed to parse login_authorized zitadel return url")?, )) } - async fn login_token(&self, _user: &str, password: &str) -> anyhow::Result { - self.introspection.get_id_token(password).await + + async fn login_token(&self, _user: &str, _password: &str) -> anyhow::Result { + todo!() } + async fn get_user_from_session(&self, cookie: &str) -> anyhow::Result { match self.session.get_user(cookie).await? { - Some(u) => Ok(User { id: u }), + Some(u) => Ok(u), None => Err(anyhow::anyhow!("failed to find user")), } } } - -pub struct NoopAuthService {} - -#[async_trait] -impl Auth for NoopAuthService { - async fn login(&self) -> anyhow::Result { - todo!() - } - async fn login_authorized( - &self, - _code: &str, - _state: &str, - ) -> anyhow::Result<(HeaderMap, Url)> { - todo!() - } - - async fn login_token(&self, _user: &str, _password: &str) -> anyhow::Result { - todo!() - } - - async fn get_user_from_session(&self, _cookie: &str) -> anyhow::Result { - todo!() - } -} diff --git a/crates/nefarious-login/src/axum.rs b/crates/nefarious-login/src/axum.rs index d624b52..424f067 100644 --- a/crates/nefarious-login/src/axum.rs +++ b/crates/nefarious-login/src/axum.rs @@ -1,25 +1,24 @@ use std::fmt::Display; use axum::extract::{FromRef, FromRequestParts, Query, State}; - -use axum::headers::authorization::Basic; -use axum::headers::{Authorization, Cookie}; use axum::http::request::Parts; use axum::http::StatusCode; - use axum::response::{ErrorResponse, IntoResponse, Redirect}; use axum::routing::get; -use axum::{async_trait, Json, RequestPartsExt, Router, TypedHeader}; +use axum::{async_trait, Json, RequestPartsExt, Router}; +use axum_extra::extract::CookieJar; +use axum_extra::headers::authorization::Basic; +use axum_extra::headers::{Authorization, Cookie}; +use axum_extra::TypedHeader; use serde::Deserialize; use serde_json::json; -use crate::auth::AuthService; +use crate::auth::{AuthService, COOKIE_APP_SESSION_NAME}; use crate::session::User; #[derive(Debug, Deserialize)] pub struct ZitadelAuthParams { - #[allow(dead_code)] return_url: Option, } @@ -52,9 +51,9 @@ where pub async fn zitadel_auth( State(auth_service): State, ) -> Result { - let url = auth_service.login().await.into_response()?; + let (headers, url) = auth_service.login(None).await.into_response()?; - Ok(Redirect::to(url.as_ref())) + Ok((headers, Redirect::to(url.as_ref()))) } #[derive(Debug, Deserialize)] @@ -67,9 +66,14 @@ pub struct AuthRequest { pub async fn login_authorized( Query(query): Query, State(auth_service): State, + cookie_jar: CookieJar, ) -> Result { + let cookie_value = cookie_jar + .get(COOKIE_APP_SESSION_NAME) + .map(|c| c.value().to_string()); + let (headers, url) = auth_service - .login_authorized(&query.code, &query.state) + .login_authorized(&query.code, &query.state, cookie_value) .await .into_response()?; @@ -122,7 +126,11 @@ where })?; return Ok(UserFromSession { - user: User { id: token }, + user: User { + id: token.sub, + email: token.email, + name: token.name, + }, }); } @@ -145,8 +153,6 @@ where ) })?; - Ok(UserFromSession { - user: User { id: user.id }, - }) + Ok(UserFromSession { user }) } } diff --git a/crates/nefarious-login/src/introspection.rs b/crates/nefarious-login/src/introspection.rs index 04fab13..3c1a001 100644 --- a/crates/nefarious-login/src/introspection.rs +++ b/crates/nefarious-login/src/introspection.rs @@ -4,6 +4,7 @@ use async_trait::async_trait; use axum::extract::FromRef; use oauth2::TokenIntrospectionResponse; use openidconnect::IntrospectionUrl; +use serde::{Deserialize, Serialize}; use zitadel::{ axum::introspection::IntrospectionStateBuilderError, credentials::Application, @@ -15,10 +16,17 @@ use zitadel::{ use crate::login::AuthClap; +#[derive(Clone, Serialize, Deserialize)] +pub struct IdToken { + pub sub: String, + pub email: String, + pub name: String, +} + #[async_trait] pub trait Introspection { async fn get_user(&self) -> anyhow::Result<()>; - async fn get_id_token(&self, token: &str) -> anyhow::Result; + async fn get_id_token(&self, token: &str) -> anyhow::Result; } pub struct IntrospectionService(Arc); @@ -61,7 +69,7 @@ impl Introspection for ZitadelIntrospection { async fn get_user(&self) -> anyhow::Result<()> { Ok(()) } - async fn get_id_token(&self, token: &str) -> anyhow::Result { + async fn get_id_token(&self, token: &str) -> anyhow::Result { let config = &self.state.config; let res = introspect( &config.introspection_uri, @@ -71,10 +79,21 @@ impl Introspection for ZitadelIntrospection { ) .await?; - Ok(res + let sub = res .sub() .ok_or(anyhow::anyhow!("could not find a userid (sub) in token"))? - .to_string()) + .to_string(); + + let extra = res.extra_fields(); + let email = extra.email.clone().ok_or(anyhow::anyhow!( + "could not find a email (scope email) in token" + ))?; + + let name = extra.name.clone().ok_or(anyhow::anyhow!( + "could not find a name (scope profile) in token" + ))?; + + Ok(IdToken { sub, email, name }) } } diff --git a/crates/nefarious-login/src/login/auth_clap.rs b/crates/nefarious-login/src/login/auth_clap.rs index 4f2d6e1..5dfa4cd 100644 --- a/crates/nefarious-login/src/login/auth_clap.rs +++ b/crates/nefarious-login/src/login/auth_clap.rs @@ -15,7 +15,7 @@ pub struct AuthConfigFile { zitadel: Option, } -#[derive(clap::Args, Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +#[derive(clap::Args, Clone, Debug, PartialEq, Eq, Serialize, Deserialize, Default)] #[group(requires_all = ["client_id", "client_secret", "redirect_url", "authority_url"])] pub struct ZitadelClap { #[arg(env = "ZITADEL_CLIENT_ID", long = "zitadel-client-id")] diff --git a/crates/nefarious-login/src/oauth/zitadel.rs b/crates/nefarious-login/src/oauth/zitadel.rs index 0226eee..5daf5e8 100644 --- a/crates/nefarious-login/src/oauth/zitadel.rs +++ b/crates/nefarious-login/src/oauth/zitadel.rs @@ -105,12 +105,15 @@ impl OAuthClient for ZitadelOAuthClient { Ok(()) } async fn authorize_url(&self) -> anyhow::Result { - let (auth_url, _csrf_token) = self + let req = self .client .authorize_url(CsrfToken::new_random) .add_scope(Scope::new("identify".to_string())) .add_scope(Scope::new("openid".to_string())) - .url(); + .add_scope(Scope::new("email".to_string())) + .add_scope(Scope::new("profile".to_string())); + + let (auth_url, _csrf_token) = req.url(); Ok(auth_url) } diff --git a/crates/nefarious-login/src/session.rs b/crates/nefarious-login/src/session.rs index c933b3b..86083a5 100644 --- a/crates/nefarious-login/src/session.rs +++ b/crates/nefarious-login/src/session.rs @@ -11,7 +11,7 @@ use async_trait::async_trait; use axum_sessions::async_session::{Session as AxumSession, SessionStore as AxumSessionStore}; use serde::{Deserialize, Serialize}; -use crate::login::AuthClap; +use crate::{introspection::IdToken, login::AuthClap}; #[derive(clap::Args, Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] pub struct SessionClap { @@ -19,7 +19,7 @@ pub struct SessionClap { pub postgresql: PostgresqlSessionClap, } -#[derive(clap::Args, Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +#[derive(clap::Args, Clone, Debug, PartialEq, Eq, Serialize, Deserialize, Default)] pub struct PostgresqlSessionClap { #[arg(env = "SESSION_POSTGRES_CONN", long = "session-postgres-conn")] pub conn: Option, @@ -27,16 +27,17 @@ pub struct PostgresqlSessionClap { #[async_trait] pub trait Session { - async fn insert_user(&self, id: &str, user_id: &str) -> anyhow::Result; - async fn get_user(&self, cookie: &str) -> anyhow::Result>; + async fn insert(&self, app_session: AppSession) -> anyhow::Result; + async fn insert_user(&self, id: &str, id_token: IdToken) -> anyhow::Result; + async fn get_user(&self, cookie: &str) -> anyhow::Result>; + async fn get(&self, cookie: &str) -> anyhow::Result>; } pub struct SessionService(Arc); - impl SessionService { pub async fn new(config: &AuthClap) -> anyhow::Result { match config.session_backend { - SessionBackend::InMemory => Ok(Self(Arc::new(InMemorySessionService {}))), + SessionBackend::InMemory => Ok(Self(Arc::new(InMemorySessionService::default()))), SessionBackend::Postgresql => { let postgres_session = PostgresSessionStore::new( config @@ -48,6 +49,8 @@ impl SessionService { ) .await?; + postgres_session.migrate().await?; + Ok(Self(Arc::new(PostgresSessionService { store: postgres_session, }))) @@ -71,16 +74,38 @@ pub struct PostgresSessionService { #[derive(Serialize, Deserialize, Clone, Debug)] pub struct User { pub id: String, + pub email: String, + pub name: String, +} + +#[derive(Serialize, Deserialize, Clone, Debug)] +pub struct AppSession { + pub return_url: String, } #[async_trait] impl Session for PostgresSessionService { - async fn insert_user(&self, _id: &str, user_id: &str) -> anyhow::Result { + async fn insert(&self, app_session: AppSession) -> anyhow::Result { + let mut session = AxumSession::new(); + session.insert("app_session", app_session)?; + + let cookie = self + .store + .store_session(session) + .await? + .ok_or(anyhow::anyhow!("failed to store app session"))?; + + Ok(cookie) + } + + async fn insert_user(&self, _id: &str, id_token: IdToken) -> anyhow::Result { let mut session = AxumSession::new(); session.insert( "user", User { - id: user_id.to_string(), + id: id_token.sub, + email: id_token.email, + name: id_token.name, }, )?; @@ -92,14 +117,14 @@ impl Session for PostgresSessionService { Ok(cookie) } - async fn get_user(&self, cookie: &str) -> anyhow::Result> { + async fn get_user(&self, cookie: &str) -> anyhow::Result> { if let Some(session) = self.store.load_session(cookie.to_string()).await.unwrap() { if let Some(user) = session.get::("user") { tracing::debug!( "UserFromSession: session decoded success, user_id={:?}", user.id ); - Ok(Some(user.id)) + Ok(Some(user)) } else { Ok(None) } @@ -111,17 +136,50 @@ impl Session for PostgresSessionService { Err(anyhow::anyhow!("No session found for cookie")) } } + + async fn get(&self, cookie: &str) -> anyhow::Result> { + let Some(session) = self.store.load_session(cookie.to_string()).await? else { + return Ok(None); + }; + + let Some(session) = session.get::("app_session") else { + anyhow::bail!("failed to deserialize app_session from cookie"); + }; + + Ok(Some(session)) + } } -pub struct InMemorySessionService {} +#[derive(Default)] +pub struct InMemorySessionService { + store: std::sync::Mutex>, +} #[async_trait] impl Session for InMemorySessionService { - async fn insert_user(&self, _id: &str, _user_id: &str) -> anyhow::Result { + async fn insert(&self, app_session: AppSession) -> anyhow::Result { todo!() } + async fn insert_user(&self, _id: &str, id_token: IdToken) -> anyhow::Result { + let user = User { + id: id_token.sub, + email: id_token.email, + name: id_token.name, + }; - async fn get_user(&self, _cookie: &str) -> anyhow::Result> { + let id = uuid::Uuid::new_v4(); + + self.store.lock().unwrap().insert(id.to_string(), user); + + Ok(id.to_string()) + } + + async fn get_user(&self, cookie: &str) -> anyhow::Result> { + let user = self.store.lock().unwrap().get(cookie).cloned(); + + Ok(user) + } + async fn get(&self, cookie: &str) -> anyhow::Result> { todo!() } } diff --git a/cuddle.yaml b/cuddle.yaml index 246a8fd..7dfc989 100644 --- a/cuddle.yaml +++ b/cuddle.yaml @@ -5,3 +5,9 @@ base: "git@git.front.kjuulh.io:kjuulh/cuddle-base.git" vars: service: "nefarious-login" registry: kasperhermansen + +scripts: + local_up: + type: shell + local_down: + type: shell diff --git a/examples/basic/src/main.rs b/examples/basic/src/main.rs index 1b0ea5b..084bfd1 100644 --- a/examples/basic/src/main.rs +++ b/examples/basic/src/main.rs @@ -1,4 +1,4 @@ -use std::net::SocketAddr; +use std::{net::SocketAddr, str::FromStr}; use axum::{ extract::{FromRef, State}, @@ -60,13 +60,10 @@ async fn main() -> anyhow::Result<()> { .with_state(state) .nest("/auth", AuthController::new_router(auth_service).await?); - let addr = SocketAddr::from(([127, 0, 0, 1], 3001)); - println!("listening on: {addr}"); - println!("open browser at: http://localhost:3001/auth/zitadel"); - axum::Server::bind(&addr) - .serve(app.into_make_service()) - .await - .unwrap(); + let addr = SocketAddr::from_str(&format!("{}:{}", "127.0.0.1", "3000"))?; + let listener = tokio::net::TcpListener::bind(&addr).await?; + + axum::serve(listener, app).await?; Ok(()) } diff --git a/examples/clap/src/main.rs b/examples/clap/src/main.rs index 428197e..84501ca 100644 --- a/examples/clap/src/main.rs +++ b/examples/clap/src/main.rs @@ -1,4 +1,4 @@ -use std::net::SocketAddr; +use std::{net::SocketAddr, str::FromStr}; use axum::{ extract::{FromRef, State}, @@ -58,10 +58,11 @@ async fn main() -> anyhow::Result<()> { let addr = SocketAddr::from(([127, 0, 0, 1], 3001)); println!("listening on: {addr}"); println!("open browser at: http://localhost:3001/auth/zitadel"); - axum::Server::bind(&addr) - .serve(app.into_make_service()) - .await - .unwrap(); + + let addr = SocketAddr::from_str(&format!("{}:{}", "127.0.0.1", "3000"))?; + let listener = tokio::net::TcpListener::bind(&addr).await?; + + axum::serve(listener, app).await?; Ok(()) } diff --git a/examples/custom_redirect/Cargo.toml b/examples/custom_redirect/Cargo.toml new file mode 100644 index 0000000..299c651 --- /dev/null +++ b/examples/custom_redirect/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "custom_redirect" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +nefarious-login.workspace = true + +tokio.workspace = true +anyhow.workspace = true +axum.workspace = true +clap.workspace = true + +tracing-subscriber.workspace = true diff --git a/examples/custom_redirect/src/main.rs b/examples/custom_redirect/src/main.rs new file mode 100644 index 0000000..5ad4d07 --- /dev/null +++ b/examples/custom_redirect/src/main.rs @@ -0,0 +1,94 @@ +use std::{net::SocketAddr, str::FromStr}; + +use axum::{ + extract::{FromRef, State}, + response::{IntoResponse, Redirect}, + routing::get, + Router, +}; +use nefarious_login::{ + auth::AuthService, + axum::{AuthController, UserFromSession}, + login::{ + auth_clap::{AuthEngine, ZitadelClap}, + config::ConfigClap, + AuthClap, + }, + session::{PostgresqlSessionClap, SessionBackend}, +}; +use tracing_subscriber::EnvFilter; + +#[derive(Clone)] +struct AppState { + auth: AuthService, +} + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .init(); + + let auth = AuthClap { + engine: AuthEngine::Zitadel, + session_backend: SessionBackend::Postgresql, + zitadel: ZitadelClap { + authority_url: Some("https://personal-wxuujs.zitadel.cloud".into()), + client_id: Some("237412977047895154@nefarious-test".into()), + client_secret: Some( + "rWwDi8gjNOyuMFKoOjNSlhjcVZ1B25wDh6HsDL27f0g2Hb0xGbvEf0WXFY2akOlL".into(), + ), + redirect_url: Some("http://localhost:3001/auth/authorized".into()), + }, + session: nefarious_login::session::SessionClap { + postgresql: PostgresqlSessionClap { + conn: Some("postgres://nefarious-test:somenotverysecurepassword@localhost:5432/nefarious-test".into()), + }, + }, + config: ConfigClap { return_url: "http://localhost:3001/authed".into() } // this normally has /authed + }; + + let auth_service = AuthService::new(&auth).await?; + + let state = AppState { + auth: auth_service.clone(), + }; + + let app = Router::new() + .route("/unauthed", get(unauthed)) + .route("/authed", get(authed)) + .route("/login", get(login)) + .with_state(state) + .nest("/auth", AuthController::new_router(auth_service).await?); + + let addr = SocketAddr::from_str(&format!("{}:{}", "127.0.0.1", "3000"))?; + let listener = tokio::net::TcpListener::bind(&addr).await?; + + axum::serve(listener, app).await?; + + Ok(()) +} + +impl FromRef for AuthService { + fn from_ref(input: &AppState) -> Self { + input.auth.clone() + } +} + +async fn login(State(auth_service): State) -> impl IntoResponse { + let (headers, url) = auth_service.login(Some("/authed".into())).await.unwrap(); + + (headers, Redirect::to(url.as_ref())) +} + +async fn unauthed() -> String { + "Hello Unauthorized User".into() +} + +#[axum::debug_handler()] +async fn authed( + user: UserFromSession, + State(_auth_service): State, +) -> impl IntoResponse { + format!("Hello authorized user: {:?}", user.user.id) +} diff --git a/examples/noop/Cargo.toml b/examples/noop/Cargo.toml new file mode 100644 index 0000000..7a6de43 --- /dev/null +++ b/examples/noop/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "noop" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +nefarious-login.workspace = true + +tokio.workspace = true +anyhow.workspace = true +axum.workspace = true +clap.workspace = true + +tracing-subscriber.workspace = true diff --git a/examples/noop/src/main.rs b/examples/noop/src/main.rs new file mode 100644 index 0000000..b64e808 --- /dev/null +++ b/examples/noop/src/main.rs @@ -0,0 +1,84 @@ +use std::{net::SocketAddr, str::FromStr}; + +use axum::{ + extract::{FromRef, State}, + response::IntoResponse, + routing::get, + Router, +}; +use nefarious_login::{ + auth::AuthService, + axum::{AuthController, UserFromSession}, + login::{ + auth_clap::{AuthEngine, ZitadelClap}, + config::ConfigClap, + AuthClap, + }, + session::{PostgresqlSessionClap, SessionBackend}, +}; +use tracing_subscriber::EnvFilter; + +#[derive(Clone)] +struct AppState { + auth: AuthService, +} + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .init(); + + let auth = AuthClap { + engine: AuthEngine::Noop, + session_backend: SessionBackend::InMemory, + zitadel: ZitadelClap { + ..Default::default() + }, + session: nefarious_login::session::SessionClap { + postgresql: PostgresqlSessionClap { + ..Default::default() + }, + }, + config: ConfigClap { + return_url: "http://localhost:3000/authed".into(), + }, + }; + + let auth_service = AuthService::new(&auth).await?; + + let state = AppState { + auth: auth_service.clone(), + }; + + let app = Router::new() + .route("/unauthed", get(unauthed)) + .route("/authed", get(authed)) + .with_state(state) + .nest("/auth", AuthController::new_router(auth_service).await?); + + let addr = SocketAddr::from_str(&format!("{}:{}", "127.0.0.1", "3000"))?; + let listener = tokio::net::TcpListener::bind(&addr).await?; + + axum::serve(listener, app).await?; + + Ok(()) +} + +impl FromRef for AuthService { + fn from_ref(input: &AppState) -> Self { + input.auth.clone() + } +} + +async fn unauthed() -> String { + "Hello Unauthorized User".into() +} + +#[axum::debug_handler()] +async fn authed( + user: UserFromSession, + State(_auth_service): State, +) -> impl IntoResponse { + format!("Hello authorized user: {:?}", user.user.id) +} diff --git a/scripts/local_down.sh b/scripts/local_down.sh new file mode 100755 index 0000000..cbb90a3 --- /dev/null +++ b/scripts/local_down.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e + +cuddle render_template --template-file $TMP/docker-compose.local_up.yml.tmpl --dest $TMP/docker-compose.local_up.yml + +docker compose -f $TMP/docker-compose.local_up.yml down -v diff --git a/scripts/local_up.sh b/scripts/local_up.sh new file mode 100755 index 0000000..d215338 --- /dev/null +++ b/scripts/local_up.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -e + +cuddle render_template --template-file $TMP/docker-compose.local_up.yml.tmpl --dest $TMP/docker-compose.local_up.yml + +docker compose -f $TMP/docker-compose.local_up.yml up -d --remove-orphans --build + +sleep 3 diff --git a/templates/docker-compose.local_up.dockerignore b/templates/docker-compose.local_up.dockerignore new file mode 100644 index 0000000..53f730a --- /dev/null +++ b/templates/docker-compose.local_up.dockerignore @@ -0,0 +1,7 @@ +target/ +.git/ +.cuddle/ +scripts/ +cuddle.yaml +local.sh +README.md diff --git a/templates/docker-compose.local_up.yml.tmpl b/templates/docker-compose.local_up.yml.tmpl new file mode 100644 index 0000000..5760c45 --- /dev/null +++ b/templates/docker-compose.local_up.yml.tmpl @@ -0,0 +1,17 @@ +version: '3.7' + +services: + db: + image: bitnami/postgresql:16 + restart: always + environment: + - POSTGRESQL_USERNAME=nefarious-test + - POSTGRESQL_DATABASE=nefarious-test + - POSTGRESQL_PASSWORD=somenotverysecurepassword + ports: + - 5432:5432 + volumes: + - pgdata:/var/lib/postgresql/data + +volumes: + pgdata: