diff --git a/.gitignore b/.gitignore index e961bb909e8..5c754cac304 100644 --- a/.gitignore +++ b/.gitignore @@ -4,9 +4,12 @@ **/proptest-regressions **/perf.data* **/flamegraph.svg +**/venv +**/esdata local/** quickwit/quickwit-ui/package-lock.json **/.DS_Store +**/.zed TODO.md QUESTIONS.txt diff --git a/LICENSE.md b/LICENSE.md index e05ee8721cf..0a1e0ee9d27 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,23 +1,18 @@ -Copyright (C) 2024 Quickwit, Inc. +Copyright (C) 2024-Present Quickwit, Inc. -Quickwit is offered under the [GNU Affero General Public License v3.0](https://opensource.org/licenses/AGPL-3.0) -and as commercial software. -A copy of the AGPL license can be found in [LICENSE_AGPLv3.0.txt](LICENSE_AGPLv3.0.txt) +Source code in this directory are licensed either under +- Both the AGPL and the Quickwit Enterprise License. +- the Quickwit Enterprise License -# Commercial Licensing -For commercial licensing, contact us at hello@quickwit.io. +Source files that are license under both the AGPL and the Quickwit enterprise +are prefixed explicitly with the AGPL license header. +Source files that are strictly licensed under the Quickwit Enterprise License +are prefixed by the Quickwit Enterprise License header. -# AGPL -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. +A copy of the AGPL license can be found in [LICENSE_AGPLv3.0.txt](LICENSE_AGPLv3.0.txt) +A copy of the Quickwit Enterprise license can be found in [LICENSE_QUICKWIT_ENTERPRISE.txt](LICENSE_QUICKWIT_ENTERPRISE.txt) -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. +# To purchase a Quickwit Enterprise License -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . +To purchase Quickwit Enteprise License, contact us at hello@quickwit.io. diff --git a/LICENSE_QUICKWIT_ENTERPRISE.txt b/LICENSE_QUICKWIT_ENTERPRISE.txt new file mode 100644 index 00000000000..4ccf95a362b --- /dev/null +++ b/LICENSE_QUICKWIT_ENTERPRISE.txt @@ -0,0 +1,21 @@ +The Quickwit Enterprise Edition (EE) license +Copyright (c) 2024-present Quickwit Inc. + +With regard to the Quickwit Software: + +This software and associated documentation files (the "Software") may only be +used in production, if you (and any entity that you represent) hold a valid +Quickwit Enterprise license corresponding to your usage. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +For all third party components incorporated into the Quickwit Software, those +components are licensed under the original license provided by the owner of the +applicable component. + diff --git a/quickwit/Cargo.lock b/quickwit/Cargo.lock index d39e91442fd..558fe3bdede 100644 --- a/quickwit/Cargo.lock +++ b/quickwit/Cargo.lock @@ -150,9 +150,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.15" +version = "0.6.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +checksum = "23a1e53f0f5d86382dafe1cf314783b2044280f406e7e1506368220ad11b1338" dependencies = [ "anstyle", "anstyle-parse", @@ -165,43 +165,43 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "8365de52b16c035ff4fcafe0092ba9390540e3e352870ac09933bebcaa2c8c56" [[package]] name = "anstyle-parse" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.4" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.89" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" +checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" [[package]] name = "anymap" @@ -270,9 +270,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.13" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e614738943d3f68c628ae3dbce7c3daffb196665f82f8c8ea6b65de73c79429" +checksum = "0cb8f1d480b0ea3783ab015936d2a55c87e219676f0c0b7dec61494043f21857" dependencies = [ "flate2", "futures-core", @@ -314,7 +314,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -325,7 +325,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -345,9 +345,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "aws-config" -version = "1.5.8" +version = "1.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7198e6f03240fdceba36656d8be440297b6b82270325908c7381f37d826a74f6" +checksum = "2d6448cfb224dd6a9b9ac734f58622dd0d4751f3589f3b777345745f46b2eb14" dependencies = [ "aws-credential-types", "aws-runtime", @@ -413,9 +413,9 @@ dependencies = [ [[package]] name = "aws-sdk-kinesis" -version = "1.47.0" +version = "1.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba9516981ddb40ff46df4dbddf6ea3dcfe0a95a06b0bee88cda5a0d129ded773" +checksum = "cf4ef93639f0f66255cabc6430a46ee7de44f1b10182c2f7ab17c998010dcb16" dependencies = [ "aws-credential-types", "aws-runtime", @@ -435,11 +435,10 @@ dependencies = [ [[package]] name = "aws-sdk-s3" -version = "1.54.0" +version = "1.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2f2a62020f3e06f9b352b2a23547f6e1d110b6bf1e18a6b588ae36114eaf6e2" +checksum = "9f883bb1e349fa8343dc46336c252c0f32ceb6e81acb146aeef2e0f8afc9183e" dependencies = [ - "ahash 0.8.11", "aws-credential-types", "aws-runtime", "aws-sigv4", @@ -463,16 +462,16 @@ dependencies = [ "once_cell", "percent-encoding", "regex-lite", - "sha2", + "sha2 0.10.8", "tracing", "url", ] [[package]] name = "aws-sdk-sqs" -version = "1.45.0" +version = "1.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a92759d1d77fbbb99c8077d4cc6ef4e69f559ce3ed9aa41445bff391aa4de4d" +checksum = "2964ce1905daddb62a7e6ceb2865c2e27058b74385fb87e9525037bd1805ca3a" dependencies = [ "aws-credential-types", "aws-runtime", @@ -492,9 +491,9 @@ dependencies = [ [[package]] name = "aws-sdk-sso" -version = "1.45.0" +version = "1.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33ae899566f3d395cbf42858e433930682cc9c1889fa89318896082fef45efb" +checksum = "ded855583fa1d22e88fe39fd6062b062376e50a8211989e07cf5e38d52eb3453" dependencies = [ "aws-credential-types", "aws-runtime", @@ -514,9 +513,9 @@ dependencies = [ [[package]] name = "aws-sdk-ssooidc" -version = "1.46.0" +version = "1.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f39c09e199ebd96b9f860b0fce4b6625f211e064ad7c8693b72ecf7ef03881e0" +checksum = "9177ea1192e6601ae16c7273385690d88a7ed386a00b74a6bc894d12103cd933" dependencies = [ "aws-credential-types", "aws-runtime", @@ -536,9 +535,9 @@ dependencies = [ [[package]] name = "aws-sdk-sts" -version = "1.45.0" +version = "1.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d95f93a98130389eb6233b9d615249e543f6c24a68ca1f109af9ca5164a8765" +checksum = "823ef553cf36713c97453e2ddff1eb8f62be7f4523544e2a5db64caf80100f0a" dependencies = [ "aws-credential-types", "aws-runtime", @@ -559,9 +558,9 @@ dependencies = [ [[package]] name = "aws-sigv4" -version = "1.2.4" +version = "1.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc8db6904450bafe7473c6ca9123f88cc11089e41a025408f992db4e22d3be68" +checksum = "5619742a0d8f253be760bfbb8e8e8368c69e3587e4637af5754e488a611499b1" dependencies = [ "aws-credential-types", "aws-smithy-eventstream", @@ -579,7 +578,7 @@ dependencies = [ "p256", "percent-encoding", "ring 0.17.8", - "sha2", + "sha2 0.10.8", "subtle", "time", "tracing", @@ -599,9 +598,9 @@ dependencies = [ [[package]] name = "aws-smithy-checksums" -version = "0.60.12" +version = "0.60.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598b1689d001c4d4dc3cb386adb07d37786783aee3ac4b324bcadac116bf3d23" +checksum = "ba1a71073fca26775c8b5189175ea8863afb1c9ea2cceb02a5de5ad9dfbaa795" dependencies = [ "aws-smithy-http", "aws-smithy-types", @@ -614,7 +613,7 @@ dependencies = [ "md-5", "pin-project-lite", "sha1", - "sha2", + "sha2 0.10.8", "tracing", ] @@ -690,9 +689,9 @@ dependencies = [ [[package]] name = "aws-smithy-runtime" -version = "1.7.2" +version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a065c0fe6fdbdf9f11817eb68582b2ab4aff9e9c39e986ae48f7ec576c6322db" +checksum = "be28bd063fa91fd871d131fc8b68d7cd4c5fa0869bea68daca50dcb1cbd76be2" dependencies = [ "aws-smithy-async", "aws-smithy-http", @@ -706,7 +705,7 @@ dependencies = [ "http-body 0.4.6", "http-body 1.0.1", "httparse", - "hyper 0.14.30", + "hyper 0.14.31", "hyper-rustls", "indexmap 2.1.0", "once_cell", @@ -739,9 +738,9 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.2.7" +version = "1.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147100a7bea70fa20ef224a6bad700358305f5dc0f84649c53769761395b355b" +checksum = "07c9cdc179e6afbf5d391ab08c85eac817b51c87e1892a5edb5f7bbdc64314b4" dependencies = [ "base64-simd", "bytes", @@ -835,7 +834,7 @@ dependencies = [ "futures-util", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.30", + "hyper 0.14.31", "itoa", "matchit", "memchr", @@ -911,7 +910,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "sha2", + "sha2 0.10.8", "time", "url", "uuid", @@ -1027,9 +1026,9 @@ dependencies = [ [[package]] name = "binggan" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16cf7e26155ca336ba3a7220c817cdfe73a10f867fa352349fd425b43814bd9" +checksum = "64ea3c0d092e5dec38d367b99d4471ac8cb6d9f4c6b835519611cb1af1ff8514" dependencies = [ "alloca", "bpu_trasher", @@ -1042,6 +1041,57 @@ dependencies = [ "yansi", ] +[[package]] +name = "biscuit-auth" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95490f2c91dc452247d00a2fb4779bcedb7693e669354fa1fe2a96679f4950cc" +dependencies = [ + "base64 0.13.1", + "biscuit-parser", + "biscuit-quote", + "ed25519-dalek", + "getrandom 0.1.16", + "hex", + "nom", + "prost 0.10.4", + "prost-types 0.10.1", + "rand 0.8.5", + "rand_core 0.6.4", + "regex", + "sha2 0.9.9", + "thiserror", + "time", + "zeroize", +] + +[[package]] +name = "biscuit-parser" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9fd6da963e73f7e6db729c3bd76784863ba405b15acbbb5cb08ebc2adbd3bf" +dependencies = [ + "hex", + "nom", + "proc-macro2", + "quote", + "thiserror", + "time", +] + +[[package]] +name = "biscuit-quote" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0071fe3634b644a8df1434e3e14841e480c4238059c66a94e479b7eff98c2bd3" +dependencies = [ + "biscuit-parser", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "bit-set" version = "0.5.3" @@ -1093,6 +1143,15 @@ dependencies = [ "wyz", ] +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + [[package]] name = "block-buffer" version = "0.10.4" @@ -1131,7 +1190,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", "syn_derive", ] @@ -1189,9 +1248,9 @@ checksum = "5ce89b21cab1437276d2650d57e971f9d548a2d9037cc231abdc0562b97498ce" [[package]] name = "bytemuck" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae" +checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" [[package]] name = "byteorder" @@ -1201,9 +1260,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.2" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" dependencies = [ "serde", ] @@ -1293,9 +1352,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.28" +version = "1.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e80e3b6a3ab07840e1cae9b0666a63970dc28e8ed5ffbcdacbfc760c281bfc1" +checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" dependencies = [ "jobserver", "libc", @@ -1533,9 +1592,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "colored" @@ -1589,8 +1648,8 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2895653b4d9f1538a83970077cb01dfc77a4810524e51a110944688e916b18e" dependencies = [ - "prost", - "prost-types", + "prost 0.11.9", + "prost-types 0.11.9", "tonic", "tracing-core", ] @@ -1607,7 +1666,7 @@ dependencies = [ "futures", "hdrhistogram", "humantime", - "prost-types", + "prost-types 0.11.9", "serde", "serde_json", "thread_local", @@ -1880,6 +1939,33 @@ dependencies = [ "cipher", ] +[[package]] +name = "curve25519-dalek" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "rustc_version", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.86", +] + [[package]] name = "darling" version = "0.13.4" @@ -1925,7 +2011,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -1947,7 +2033,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core 0.20.10", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -2037,7 +2123,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -2064,13 +2150,22 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + [[package]] name = "digest" version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer", + "block-buffer 0.10.4", "const-oid", "crypto-common", "subtle", @@ -2169,6 +2264,31 @@ dependencies = [ "signature 1.6.4", ] +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8 0.10.2", + "signature 2.2.0", +] + +[[package]] +name = "ed25519-dalek" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +dependencies = [ + "curve25519-dalek", + "ed25519", + "rand_core 0.6.4", + "serde", + "sha2 0.10.8", + "subtle", + "zeroize", +] + [[package]] name = "either" version = "1.13.0" @@ -2199,7 +2319,7 @@ dependencies = [ "base16ct", "crypto-bigint 0.4.9", "der 0.6.1", - "digest", + "digest 0.10.7", "ff", "generic-array", "group", @@ -2336,7 +2456,7 @@ checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -2410,9 +2530,9 @@ dependencies = [ [[package]] name = "fastdivide" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59668941c55e5c186b8b58c391629af56774ec768f73c08bbcd56f09348eb00b" +checksum = "9afc2bd4d5a73106dd53d10d73d3401c2f32730ba2c0b93ddb888a8983680471" [[package]] name = "fastrand" @@ -2439,6 +2559,12 @@ dependencies = [ "subtle", ] +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + [[package]] name = "filetime" version = "0.2.25" @@ -2496,9 +2622,9 @@ dependencies = [ [[package]] name = "flume" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" +checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" dependencies = [ "futures-core", "futures-sink", @@ -2656,7 +2782,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -2786,8 +2912,8 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a3b24a3f57be08afc02344e693afb55e48172c9c2ab86ff3fdb8efff550e4b9" dependencies = [ - "prost", - "prost-types", + "prost 0.11.9", + "prost-types 0.11.9", "tonic", ] @@ -2814,7 +2940,7 @@ dependencies = [ "google-cloud-gax", "google-cloud-googleapis", "google-cloud-token", - "prost-types", + "prost-types 0.11.9", "thiserror", "tokio", "tokio-util", @@ -2998,7 +3124,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest", + "digest 0.10.7", ] [[package]] @@ -3150,9 +3276,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.30" +version = "0.14.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" dependencies = [ "bytes", "futures-channel", @@ -3174,9 +3300,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" dependencies = [ "bytes", "futures-channel", @@ -3199,7 +3325,7 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http 0.2.12", - "hyper 0.14.30", + "hyper 0.14.31", "log", "rustls", "rustls-native-certs", @@ -3213,7 +3339,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ - "hyper 0.14.30", + "hyper 0.14.31", "pin-project-lite", "tokio", "tokio-io-timeout", @@ -3226,7 +3352,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper 0.14.30", + "hyper 0.14.31", "native-tls", "tokio", "tokio-native-tls", @@ -3234,16 +3360,16 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", "futures-util", "http 1.1.0", "http-body 1.0.1", - "hyper 1.4.1", + "hyper 1.5.0", "pin-project-lite", "socket2", "tokio", @@ -3372,7 +3498,7 @@ checksum = "0122b7114117e64a63ac49f752a5ca4624d534c7b1c7de796ac196381cd2d947" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -3482,9 +3608,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.71" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cb94a0ffd3f3ee755c20f7d8752f45cac88605a4dcf808abcff72873296ec7b" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -3585,7 +3711,7 @@ dependencies = [ "futures", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.30", + "hyper 0.14.31", "lambda_runtime 0.8.3", "mime", "percent-encoding", @@ -3609,7 +3735,7 @@ dependencies = [ "http 0.2.12", "http-body 0.4.6", "http-serde 1.1.3", - "hyper 0.14.30", + "hyper 0.14.31", "lambda_runtime_api_client 0.8.0", "serde", "serde_json", @@ -3634,7 +3760,7 @@ dependencies = [ "http-body 1.0.1", "http-body-util", "http-serde 2.1.1", - "hyper 1.4.1", + "hyper 1.5.0", "hyper-util", "lambda_runtime_api_client 0.11.1", "pin-project", @@ -3655,7 +3781,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "690c5ae01f3acac8c9c3348b556fc443054e9b7f1deaf53e9ebab716282bf0ed" dependencies = [ "http 0.2.12", - "hyper 0.14.30", + "hyper 0.14.31", "tokio", "tower-service", ] @@ -3672,7 +3798,7 @@ dependencies = [ "http 1.1.0", "http-body 1.0.1", "http-body-util", - "hyper 1.4.1", + "hyper 1.5.0", "hyper-util", "tokio", "tower", @@ -3698,15 +3824,15 @@ checksum = "0c2cdeb66e45e9f36bfad5bbdb4d2384e70936afbee843c6f6543f0c551ebb25" [[package]] name = "libc" -version = "0.2.159" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "libm" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "libredox" @@ -4065,7 +4191,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ "cfg-if", - "digest", + "digest 0.10.7", ] [[package]] @@ -4123,7 +4249,7 @@ checksum = "f3cd9f9bbedc1b92683a9847b8db12f3203cf32af6a11db085fa007708dc9555" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -4452,7 +4578,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -4495,7 +4621,7 @@ dependencies = [ "serde", "serde_json", "serde_path_to_error", - "sha2", + "sha2 0.10.8", "thiserror", "url", ] @@ -4622,9 +4748,9 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.66" +version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ "bitflags 2.6.0", "cfg-if", @@ -4643,7 +4769,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -4654,18 +4780,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "300.3.2+3.3.2" +version = "300.4.0+3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a211a18d945ef7e648cc6e0058f4c548ee46aab922ea203e0d30e966ea23647b" +checksum = "a709e02f2b4aca747929cca5ed248880847c650233cf8b8cdc48f40aaf4898a6" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.103" +version = "0.9.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", @@ -4711,7 +4837,7 @@ dependencies = [ "opentelemetry-semantic-conventions", "opentelemetry_api", "opentelemetry_sdk", - "prost", + "prost 0.11.9", "reqwest", "thiserror", "tokio", @@ -4726,7 +4852,7 @@ checksum = "b1e3f814aa9f8c905d0ee4bde026afd3b2577a97c10e1699912e3e44f0c4cbeb" dependencies = [ "opentelemetry_api", "opentelemetry_sdk", - "prost", + "prost 0.11.9", "tonic", ] @@ -4798,9 +4924,9 @@ dependencies = [ [[package]] name = "ordered-float" -version = "4.3.0" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d501f1a72f71d3c063a6bbc8f7271fa73aa09fe5d6283b6571e2ed176a2537" +checksum = "83e7ccb95e240b7c9506a3d544f10d935e142cc90b0a1d56954fb44d89ad6b97" dependencies = [ "num-traits", ] @@ -4837,7 +4963,7 @@ dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -4868,7 +4994,7 @@ checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" dependencies = [ "ecdsa", "elliptic-curve", - "sha2", + "sha2 0.10.8", ] [[package]] @@ -4945,10 +5071,10 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ - "digest", + "digest 0.10.7", "hmac", "password-hash", - "sha2", + "sha2 0.10.8", ] [[package]] @@ -4957,7 +5083,7 @@ version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ - "digest", + "digest 0.10.7", "hmac", ] @@ -5028,9 +5154,9 @@ dependencies = [ [[package]] name = "pest" -version = "2.7.13" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdbef9d1d47087a895abd220ed25eb4ad973a5e26f6a4367b038c25e28dfc2d9" +checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" dependencies = [ "memchr", "thiserror", @@ -5039,9 +5165,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.13" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d3a6e3394ec80feb3b6393c725571754c6188490265c61aaf260810d6b95aa0" +checksum = "d214365f632b123a47fd913301e14c946c61d1c183ee245fa76eb752e59a02dd" dependencies = [ "pest", "pest_generator", @@ -5049,26 +5175,26 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.13" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94429506bde1ca69d1b5601962c73f4172ab4726571a59ea95931218cb0e930e" +checksum = "eb55586734301717aea2ac313f50b2eb8f60d2fc3dc01d190eefa2e625f60c4e" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] name = "pest_meta" -version = "2.7.13" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac8a071862e93690b6e34e9a5fb8e33ff3734473ac0245b27232222c4906a33f" +checksum = "b75da2a70cf4d9cb76833c990ac9cd3923c9a8905a8929789ce347c84564d03d" dependencies = [ "once_cell", "pest", - "sha2", + "sha2 0.10.8", ] [[package]] @@ -5130,29 +5256,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.6" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec" +checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.6" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" +checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -5182,7 +5308,7 @@ dependencies = [ "der 0.7.9", "pbkdf2 0.12.2", "scrypt", - "sha2", + "sha2 0.10.8", "spki 0.7.3", ] @@ -5470,12 +5596,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.22" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -5523,9 +5649,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.87" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] @@ -5538,7 +5664,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", "version_check", "yansi", ] @@ -5603,6 +5729,16 @@ dependencies = [ "unarray", ] +[[package]] +name = "prost" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71adf41db68aa0daaefc69bb30bcd68ded9b9abaad5d1fbb6304c4fb390e083e" +dependencies = [ + "bytes", + "prost-derive 0.10.1", +] + [[package]] name = "prost" version = "0.11.9" @@ -5610,7 +5746,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ "bytes", - "prost-derive", + "prost-derive 0.11.9", ] [[package]] @@ -5627,14 +5763,27 @@ dependencies = [ "multimap", "petgraph", "prettyplease 0.1.25", - "prost", - "prost-types", + "prost 0.11.9", + "prost-types 0.11.9", "regex", "syn 1.0.109", "tempfile", "which", ] +[[package]] +name = "prost-derive" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b670f45da57fb8542ebdbb6105a925fe571b67f9e7ed9f47a06a84e72b4e7cc" +dependencies = [ + "anyhow", + "itertools 0.10.5", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "prost-derive" version = "0.11.9" @@ -5648,13 +5797,23 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "prost-types" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d0a014229361011dc8e69c8a1ec6c2e8d0f2af7c91e3ea3f5b2170298461e68" +dependencies = [ + "bytes", + "prost 0.10.4", +] + [[package]] name = "prost-types" version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" dependencies = [ - "prost", + "prost 0.11.9", ] [[package]] @@ -5706,9 +5865,9 @@ dependencies = [ "oauth2", "openidconnect", "pem 1.1.1", - "prost", + "prost 0.11.9", "prost-build", - "prost-derive", + "prost-derive 0.11.9", "rand 0.8.5", "regex", "serde", @@ -5801,7 +5960,7 @@ dependencies = [ "aws-smithy-runtime", "aws-types", "futures", - "hyper 0.14.30", + "hyper 0.14.31", "hyper-rustls", "quickwit-common", "tokio", @@ -5892,12 +6051,12 @@ dependencies = [ "anyhow", "futures", "heck", - "prettyplease 0.2.22", + "prettyplease 0.2.25", "proc-macro2", "prost-build", "quote", "serde", - "syn 2.0.79", + "syn 2.0.86", "tonic-build", ] @@ -5911,7 +6070,7 @@ dependencies = [ "futures", "http 0.2.12", "mockall", - "prost", + "prost 0.11.9", "quickwit-actors", "quickwit-codegen", "quickwit-common", @@ -5941,7 +6100,7 @@ dependencies = [ "home", "hostname", "http 0.2.12", - "hyper 0.14.30", + "hyper 0.14.31", "itertools 0.13.0", "once_cell", "pin-project", @@ -5983,6 +6142,7 @@ dependencies = [ "once_cell", "quickwit-common", "quickwit-doc-mapper", + "quickwit-license", "quickwit-proto", "regex", "serde", @@ -6140,7 +6300,7 @@ dependencies = [ "oneshot", "openssl", "proptest", - "prost", + "prost 0.11.9", "pulsar", "quickwit-actors", "quickwit-aws", @@ -6188,7 +6348,7 @@ dependencies = [ "mockall", "mrecordlog", "once_cell", - "prost", + "prost 0.11.9", "quickwit-actors", "quickwit-cluster", "quickwit-codegen", @@ -6218,7 +6378,7 @@ dependencies = [ "anyhow", "aws-sdk-sqs", "futures-util", - "hyper 0.14.30", + "hyper 0.14.31", "itertools 0.13.0", "quickwit-actors", "quickwit-cli", @@ -6247,8 +6407,8 @@ dependencies = [ "async-trait", "itertools 0.13.0", "once_cell", - "prost", - "prost-types", + "prost 0.11.9", + "prost-types 0.11.9", "quickwit-actors", "quickwit-cluster", "quickwit-common", @@ -6349,13 +6509,23 @@ dependencies = [ "warp", ] +[[package]] +name = "quickwit-license" +version = "0.8.0" +dependencies = [ + "anyhow", + "biscuit-auth", + "thiserror", + "tracing", +] + [[package]] name = "quickwit-macros" version = "0.8.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -6410,7 +6580,7 @@ dependencies = [ "async-trait", "hex", "once_cell", - "prost", + "prost 0.11.9", "quickwit-common", "quickwit-config", "quickwit-ingest", @@ -6439,9 +6609,9 @@ dependencies = [ "http 0.2.12", "mockall", "opentelemetry", - "prost", + "prost 0.11.9", "prost-build", - "prost-types", + "prost-types 0.11.9", "quickwit-actors", "quickwit-codegen", "quickwit-common", @@ -6526,7 +6696,7 @@ dependencies = [ "once_cell", "postcard", "proptest", - "prost", + "prost 0.11.9", "quickwit-common", "quickwit-config", "quickwit-directories", @@ -6570,7 +6740,7 @@ dependencies = [ "hex", "http-serde 1.1.3", "humantime", - "hyper 0.14.30", + "hyper 0.14.31", "itertools 0.13.0", "mime_guess", "mockall", @@ -6578,8 +6748,8 @@ dependencies = [ "opentelemetry", "percent-encoding", "pprof", - "prost", - "prost-types", + "prost 0.11.9", + "prost-types 0.11.9", "quickwit-actors", "quickwit-cluster", "quickwit-common", @@ -6637,7 +6807,7 @@ dependencies = [ "bytesize", "fnv", "futures", - "hyper 0.14.30", + "hyper 0.14.31", "lru", "md5", "mockall", @@ -6872,9 +7042,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -6954,7 +7124,7 @@ dependencies = [ "serde", "serde_json", "sha1", - "sha2", + "sha2 0.10.8", ] [[package]] @@ -6971,7 +7141,7 @@ dependencies = [ "h2", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.30", + "hyper 0.14.31", "hyper-rustls", "hyper-tls", "ipnet", @@ -7114,14 +7284,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" dependencies = [ "const-oid", - "digest", + "digest 0.10.7", "num-bigint-dig", "num-integer", "num-traits", "pkcs1", "pkcs8 0.10.2", "rand_core 0.6.4", - "sha2", + "sha2 0.10.8", "signature 2.2.0", "spki 0.7.3", "subtle", @@ -7148,7 +7318,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.79", + "syn 2.0.86", "walkdir", ] @@ -7158,7 +7328,7 @@ version = "7.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d38ff6bf570dc3bb7100fce9f7b60c33fa71d80e88da3f2580df4ff2bdded74" dependencies = [ - "sha2", + "sha2 0.10.8", "walkdir", ] @@ -7217,9 +7387,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "aa260229e6538e52293eeb577aabd09945a09d6d9cc0fc550ed7529056c2e32a" dependencies = [ "bitflags 2.6.0", "errno", @@ -7289,9 +7459,9 @@ checksum = "0b5a6a926633a8ce739286680df905e1d1d01db609fc0e09d28e9b901ac7b22f" [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "rusty-fork" @@ -7343,9 +7513,9 @@ dependencies = [ [[package]] name = "scc" -version = "2.2.0" +version = "2.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836f1e0f4963ef5288b539b643b35e043e76a32d0f4e47e67febf69576527f50" +checksum = "d8d25269dd3a12467afe2e510f69fb0b46b698e5afb296b59f2145259deaf8e8" dependencies = [ "sdd", ] @@ -7379,7 +7549,7 @@ checksum = "0516a385866c09368f0b5bcd1caff3366aace790fcd46e2bb032697bb172fd1f" dependencies = [ "pbkdf2 0.12.2", "salsa20", - "sha2", + "sha2 0.10.8", ] [[package]] @@ -7394,9 +7564,9 @@ dependencies = [ [[package]] name = "sdd" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a7b59a5d9b0099720b417b6325d91a52cbf5b3dcb5041d864be53eefa58abc" +checksum = "49c1eeaf4b6a87c7479688c6d52b9f1153cedd3c489300564f932b065c6eab95" [[package]] name = "sea-query" @@ -7428,7 +7598,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", "thiserror", ] @@ -7489,9 +7659,9 @@ checksum = "f97841a747eef040fcd2e7b3b9a220a7205926e60488e673d9e4926d27772ce5" [[package]] name = "serde" -version = "1.0.210" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" dependencies = [ "serde_derive", ] @@ -7508,13 +7678,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -7663,7 +7833,7 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -7702,7 +7872,7 @@ checksum = "82fe9db325bcef1fbcde82e078a5cc4efdf787e96b3b9cf45b50b529f2083d67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -7713,7 +7883,7 @@ checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" dependencies = [ "cfg-if", "cpufeatures", - "digest", + "digest 0.10.7", ] [[package]] @@ -7724,7 +7894,20 @@ checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", - "digest", + "digest 0.10.7", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", ] [[package]] @@ -7735,7 +7918,7 @@ checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", - "digest", + "digest 0.10.7", ] [[package]] @@ -7744,7 +7927,7 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" dependencies = [ - "digest", + "digest 0.10.7", "keccak", ] @@ -7794,7 +7977,7 @@ version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ - "digest", + "digest 0.10.7", "rand_core 0.6.4", ] @@ -7804,7 +7987,7 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ - "digest", + "digest 0.10.7", "rand_core 0.6.4", ] @@ -7983,7 +8166,7 @@ dependencies = [ "rustls-pemfile", "serde", "serde_json", - "sha2", + "sha2 0.10.8", "smallvec", "sqlformat", "thiserror", @@ -8023,7 +8206,7 @@ dependencies = [ "quote", "serde", "serde_json", - "sha2", + "sha2 0.10.8", "sqlx-core", "sqlx-mysql", "sqlx-postgres", @@ -8046,7 +8229,7 @@ dependencies = [ "byteorder", "bytes", "crc", - "digest", + "digest 0.10.7", "dotenvy", "either", "futures-channel", @@ -8067,7 +8250,7 @@ dependencies = [ "rsa", "serde", "sha1", - "sha2", + "sha2 0.10.8", "smallvec", "sqlx-core", "stringprep", @@ -8106,7 +8289,7 @@ dependencies = [ "rand 0.8.5", "serde", "serde_json", - "sha2", + "sha2 0.10.8", "smallvec", "sqlx-core", "stringprep", @@ -8245,9 +8428,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.79" +version = "2.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" +checksum = "e89275301d38033efb81a6e60e3497e734dfcc62571f2854bf4b16690398824c" dependencies = [ "proc-macro2", "quote", @@ -8263,7 +8446,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -8523,22 +8706,22 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.64" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "5d171f59dbaa811dbbb1aee1e73db92ec2b122911a48e1390dfe327a821ddede" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.64" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "b08be0f17bd307950653ce45db00cd31200d82b624b36e181337d9c7d92765b5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -8667,9 +8850,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.40.0" +version = "1.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" dependencies = [ "backtrace", "bytes", @@ -8702,7 +8885,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -8851,11 +9034,11 @@ dependencies = [ "h2", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.30", + "hyper 0.14.31", "hyper-timeout", "percent-encoding", "pin-project", - "prost", + "prost 0.11.9", "rustls-pemfile", "tokio", "tokio-rustls", @@ -8953,7 +9136,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] @@ -9114,12 +9297,9 @@ checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" [[package]] name = "unicase" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" [[package]] name = "unicode-bidi" @@ -9273,15 +9453,15 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", "ulid", ] [[package]] name = "uuid" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "getrandom 0.2.15", "rand 0.8.5", @@ -9349,7 +9529,7 @@ dependencies = [ "ofb", "once_cell", "onig", - "ordered-float 4.3.0", + "ordered-float 4.4.0", "paste", "peeking_take_while", "percent-encoding", @@ -9364,7 +9544,7 @@ dependencies = [ "serde", "serde_json", "sha-1", - "sha2", + "sha2 0.10.8", "sha3", "snafu", "strip-ansi-escapes", @@ -9463,7 +9643,7 @@ dependencies = [ "futures-util", "headers", "http 0.2.12", - "hyper 0.14.30", + "hyper 0.14.31", "log", "mime", "mime_guess", @@ -9510,9 +9690,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.94" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef073ced962d62984fb38a36e5fdc1a2b23c9e0e1fa0689bb97afa4202ef6887" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", "once_cell", @@ -9521,24 +9701,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.94" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4bfab14ef75323f4eb75fa52ee0a3fb59611977fd3240da19b2cf36ff85030e" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.44" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65471f79c1022ffa5291d33520cbbb53b7687b01c2f8e83b57d102eed7ed479d" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -9548,9 +9728,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.94" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7bec9830f60924d9ceb3ef99d55c155be8afa76954edffbb5936ff4509474e7" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -9558,28 +9738,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.94" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c74f6e152a76a2ad448e223b0fc0b6b5747649c3d769cc6bf45737bf97d0ed6" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.94" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a42f6c679374623f295a8623adfe63d9284091245c3504bde47c17a3ce2777d9" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-streams" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" dependencies = [ "futures-util", "js-sys", @@ -9590,9 +9770,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.71" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44188d185b5bdcae1052d08bcbcf9091a5524038d4572cc4f4f2bb9d5554ddd9" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -9891,7 +10071,7 @@ dependencies = [ "futures", "futures-timer", "http-types", - "hyper 0.14.30", + "hyper 0.14.31", "log", "once_cell", "regex", @@ -9969,7 +10149,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.86", ] [[package]] diff --git a/quickwit/Cargo.toml b/quickwit/Cargo.toml index 82419148e2f..b91068fe5a3 100644 --- a/quickwit/Cargo.toml +++ b/quickwit/Cargo.toml @@ -34,6 +34,7 @@ members = [ "quickwit-serve", "quickwit-storage", "quickwit-telemetry", + "quickwit-license", ] # The following list excludes `quickwit-metastore-utils` and `quickwit-lambda` @@ -87,6 +88,8 @@ async-speed-limit = "0.4" async-trait = "0.1" base64 = "0.22" binggan = { version = "0.14" } +biscuit-auth = "5.0.0" + bytes = { version = "1", features = ["serde"] } bytesize = { version = "1.3.0", features = ["serde"] } bytestring = "1.3.0" @@ -317,6 +320,7 @@ quickwit-ingest = { path = "quickwit-ingest" } quickwit-integration-tests = { path = "quickwit-integration-tests" } quickwit-jaeger = { path = "quickwit-jaeger" } quickwit-janitor = { path = "quickwit-janitor" } +quickwit-license = { path = "quickwit-license" } quickwit-macros = { path = "quickwit-macros" } quickwit-metastore = { path = "quickwit-metastore" } quickwit-opentelemetry = { path = "quickwit-opentelemetry" } diff --git a/quickwit/deny.toml b/quickwit/deny.toml index 139785b1c9a..f3587b24283 100644 --- a/quickwit/deny.toml +++ b/quickwit/deny.toml @@ -59,6 +59,7 @@ allow = [ "BSD-3-Clause", "CC0-1.0", "ISC", + "LicenseRef-quickwit-enterprise-license", "MIT", "MPL-2.0", "OpenSSL", diff --git a/quickwit/quickwit-cli/Cargo.toml b/quickwit/quickwit-cli/Cargo.toml index d403eef2922..6542536aca1 100644 --- a/quickwit/quickwit-cli/Cargo.toml +++ b/quickwit/quickwit-cli/Cargo.toml @@ -79,6 +79,7 @@ quickwit-metastore = { workspace = true, features = ["testsuite"] } quickwit-storage = { workspace = true, features = ["testsuite"] } [features] +enterprise = ["quickwit-config/enterprise"] jemalloc = ["dep:tikv-jemalloc-ctl", "dep:tikv-jemallocator"] ci-test = [] pprof = ["quickwit-serve/pprof"] diff --git a/quickwit/quickwit-config/Cargo.toml b/quickwit/quickwit-config/Cargo.toml index 7cf75818444..67309baf13c 100644 --- a/quickwit/quickwit-config/Cargo.toml +++ b/quickwit/quickwit-config/Cargo.toml @@ -37,13 +37,16 @@ vrl = { workspace = true, optional = true } quickwit-common = { workspace = true } quickwit-doc-mapper = { workspace = true } +quickwit-license = { workspace = true, optional = true } quickwit-proto = { workspace = true } [dev-dependencies] tokio = { workspace = true } +quickwit-license = {workspace = true, features= ["testsuite"] } quickwit-proto = { workspace = true, features = ["testsuite"] } [features] testsuite = [] vrl = ["dep:vrl"] +enterprise = ["quickwit-license"] diff --git a/quickwit/quickwit-config/src/node_config/serialize.rs b/quickwit/quickwit-config/src/node_config/serialize.rs index 8a1337636cf..2a435ebed01 100644 --- a/quickwit/quickwit-config/src/node_config/serialize.rs +++ b/quickwit/quickwit-config/src/node_config/serialize.rs @@ -213,6 +213,8 @@ struct NodeConfigBuilder { #[serde(rename = "jaeger")] #[serde(default)] jaeger_config: JaegerConfig, + #[serde(default)] + license: Option, } impl NodeConfigBuilder { @@ -305,6 +307,15 @@ impl NodeConfigBuilder { .map(|gossip_interval_ms| Duration::from_millis(gossip_interval_ms as u64)) .unwrap_or(DEFAULT_GOSSIP_INTERVAL); + // Environment variable takes precedence for license too. + #[cfg(feature = "enterprise")] + if let Some(license_str) = env_vars.get("QW_LICENSE").or(self.license.as_ref()) { + if let Err(error) = quickwit_license::set_license(license_str) { + tracing::error!(error=?error, "invalid license"); + std::process::exit(1); + } + } + let node_config = NodeConfig { cluster_id: self.cluster_id.resolve(env_vars)?, node_id, @@ -346,9 +357,24 @@ fn validate(node_config: &NodeConfig) -> anyhow::Result<()> { Ok(()) } +#[cfg(test)] +#[cfg(not(feature = "enterprise"))] +fn get_default_license_opt() -> Option { + None +} + +#[cfg(test)] +#[cfg(feature = "enterprise")] +fn get_default_license_opt() -> Option { + Some(quickwit_license::get_fake_license_for_tests()) +} + #[cfg(test)] impl Default for NodeConfigBuilder { fn default() -> Self { + // This license is only valid for tests: + // it is signed by a different private key that is only used in tests. + let license_opt: Option = get_default_license_opt(); Self { cluster_id: default_cluster_id(), node_id: default_node_id(), @@ -371,6 +397,7 @@ impl Default for NodeConfigBuilder { searcher_config: SearcherConfig::default(), ingest_api_config: IngestApiConfig::default(), jaeger_config: JaegerConfig::default(), + license: license_opt, } } } @@ -1262,4 +1289,16 @@ mod tests { .to_string(); assert!(error_message.contains("replication factor")); } + + #[tokio::test] + #[cfg(feature = "enterprise")] + async fn test_license() { + let _node_config: NodeConfig = NodeConfigBuilder::default() + .build_and_validate(&HashMap::default()) + .await + .unwrap(); + // The license is set silently upon building the node config. + let license_level = quickwit_license::get_license_level(); + assert_eq!(license_level, quickwit_license::LicenseLevel::Gold); + } } diff --git a/quickwit/quickwit-license/Cargo.toml b/quickwit/quickwit-license/Cargo.toml new file mode 100644 index 00000000000..eb3e3c53b14 --- /dev/null +++ b/quickwit/quickwit-license/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "quickwit-license" +version.workspace = true +edition.workspace = true +homepage.workspace = true +documentation.workspace = true +repository.workspace = true +authors.workspace = true +license = "LicenseRef-quickwit-enterprise-license" + +[dependencies] +biscuit-auth = { workspace = true } +anyhow = { workspace = true } +thiserror = { workspace = true } +tracing = { workspace = true } + +[features] +testsuite = [] diff --git a/quickwit/quickwit-license/LICENSE.md b/quickwit/quickwit-license/LICENSE.md new file mode 100644 index 00000000000..aee1609739b --- /dev/null +++ b/quickwit/quickwit-license/LICENSE.md @@ -0,0 +1,20 @@ +The Quickwit Enterprise Edition (EE) license +Copyright (c) 2024-present Quickwit Inc. + +With regard to the Quickwit Software: + +This software and associated documentation files (the "Software") may only be +used in production, if you (and any entity that you represent) hold a valid +Quickwit Enterprise license corresponding to your usage. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +For all third party components incorporated into the Quickwit Software, those +components are licensed under the original license provided by the owner of the +applicable component. diff --git a/quickwit/quickwit-license/src/lib.rs b/quickwit/quickwit-license/src/lib.rs new file mode 100644 index 00000000000..8cd89f3dad3 --- /dev/null +++ b/quickwit/quickwit-license/src/lib.rs @@ -0,0 +1,271 @@ +// The Quickwit Enterprise Edition (EE) license +// Copyright (c) 2024-present Quickwit Inc. +// +// With regard to the Quickwit Software: +// +// This software and associated documentation files (the "Software") may only be +// used in production, if you (and any entity that you represent) hold a valid +// Quickwit Enterprise license corresponding to your usage. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +// For all third party components incorporated into the Quickwit Software, those +// components are licensed under the original license provided by the owner of the +// applicable component. + +use std::str::FromStr; +use std::sync::OnceLock; +use std::time::SystemTime; + +use biscuit_auth::builder::{Predicate, Rule, Term}; +use biscuit_auth::builder_ext::AuthorizerExt; +use biscuit_auth::macros::biscuit; +use biscuit_auth::{Authorizer, Biscuit, KeyPair, PrivateKey, PublicKey}; +use tracing::{error, info}; + +// For tests, we use a different public key, for which the private +// key is shipped in the code, so we can emit licenses. +#[cfg(any(test, feature = "testsuite"))] +const QUICKWIT_PUBLIC_KEY_HEX: &str = + "5a81acfc945c7c64c3e95a0c8ce2caafec7c496e76db9ff528755eca7fc16c25"; + +// This is our actual quickwit license public key. +// The private key is secret. +#[cfg(not(any(test, feature = "testsuite")))] +const QUICKWIT_PUBLIC_KEY_HEX: &str = + "32d02f39dbfcf6e70d0eceae3e4055c82fad8df7c9a062b89b21e3efd05c1d3f"; + +const QUICKWIT_PRIVATE_KEY_HEX_TEST: &str = + "43fec56169112de681ab5935fdda7d589b79ba430bd128bc85d18a592813d0b6"; + +#[derive(thiserror::Error, Debug)] +pub enum Error { + #[error("invalid biscuit")] + Unverified, + #[error("invalid parameter {0}")] + InvalidParameter(String), + #[error("license expired")] + LicenseExpired, +} + +#[derive(Debug)] +pub struct License { + pub license_level: LicenseLevel, + pub licensee: String, +} + +fn extract_single_key_value(authorizer: &mut Authorizer, key: &str) -> Result { + let head_predicate = Predicate::new( + "data".to_string(), + vec![Term::Variable("placeholder".to_string())], + ); + let body_predicate = Predicate::new( + key.to_string(), + vec![Term::Variable("placeholder".to_string())], + ); + let rule = Rule::new(head_predicate, vec![body_predicate], Vec::new(), Vec::new()); + let values: Vec<(String,)> = authorizer + .query(rule) + .map_err(|_| Error::InvalidParameter(key.to_string()))?; //r#"data($license_level) <- license($license_level)"#) + if values.len() != 1 { + return Err(Error::InvalidParameter(key.to_string())); + } + let value_str = values.into_iter().next().unwrap().0; + Ok(value_str) +} + +fn extract_license(license_str: &str) -> Result { + let quickwit_public_key = + PublicKey::from_bytes_hex(QUICKWIT_PUBLIC_KEY_HEX).expect("Invalid public key"); + let biscuit = + Biscuit::from_base64(license_str, quickwit_public_key).map_err(|_| Error::Unverified)?; + let mut authorizer = Authorizer::new(); + authorizer.set_time(); + authorizer + .add_token(&biscuit) + .map_err(|_| Error::Unverified)?; + authorizer.add_allow_all(); + authorizer.authorize().map_err(|_| Error::LicenseExpired)?; + let license_level_str: String = extract_single_key_value(&mut authorizer, "license_level")?; + let licensee: String = extract_single_key_value(&mut authorizer, "licensee")?; + let license_level = LicenseLevel::from_str(&license_level_str) + .map_err(|_| Error::InvalidParameter("license_level".to_string()))?; + Ok(License { + license_level, + licensee, + }) +} + +#[derive(Debug, Eq, PartialEq, Copy, Clone)] +pub enum LicenseLevel { + Community, + Gold, +} + +impl LicenseLevel { + pub fn name(&self) -> &'static str { + match self { + LicenseLevel::Community => "community", + LicenseLevel::Gold => "gold", + } + } +} + +impl FromStr for LicenseLevel { + type Err = anyhow::Error; + + fn from_str(license_str: &str) -> anyhow::Result { + match license_str { + "gold" => Ok(Self::Gold), + _ => Err(anyhow::anyhow!("Unknown license level: {}", license_str)), + } + } +} + +static LICENSE: OnceLock = OnceLock::new(); + +pub fn set_license(license_hex_str: &str) -> Result<(), Error> { + let license = extract_license(license_hex_str)?; + if let Err(_license) = LICENSE.set(license) { + // Someone already set the license. + error!("license already set, this should not happen"); + } + let license = LICENSE.get().unwrap(); + info!( + "enabling {:?} license for {}", + license.license_level, + license.licensee.as_str() + ); + Ok(()) +} + +pub fn get_license_level() -> LicenseLevel { + #[cfg(not(test))] + const DEFAULT_LICENSE_LEVEL: LicenseLevel = LicenseLevel::Community; + #[cfg(test)] + const DEFAULT_LICENSE_LEVEL: LicenseLevel = LicenseLevel::Gold; + LICENSE + .get() + .map(|license| license.license_level) + .unwrap_or(DEFAULT_LICENSE_LEVEL) +} + +use biscuit_auth::builder_ext::BuilderExt; + +pub fn create_license( + license_level: LicenseLevel, + licensee: &str, + expiration_date: SystemTime, +) -> biscuit_auth::builder::BiscuitBuilder { + let license_level_str = license_level.name(); + let mut biscuit_builder = biscuit!( + r#"license_level({license_level_str}); + licensee({licensee}); + "#, + ); + biscuit_builder.check_expiration_date(expiration_date); + biscuit_builder +} + +pub fn get_fake_license_for_tests() -> String { + let private_key: PrivateKey = + PrivateKey::from_bytes_hex(QUICKWIT_PRIVATE_KEY_HEX_TEST).unwrap(); + let key_pair = KeyPair::from(&private_key); + let license_biscuit = create_license( + LicenseLevel::Gold, + "QuickwitTestOnly", + SystemTime::UNIX_EPOCH + std::time::Duration::from_secs(2_077_439_515), + ) + .build(&key_pair) + .unwrap(); + license_biscuit.to_base64().unwrap() +} + +#[cfg(test)] +mod tests { + use std::time::SystemTime; + + use biscuit_auth::macros::biscuit; + use biscuit_auth::{KeyPair, PrivateKey}; + + use super::*; + + const QUICKWIT_INVALID_PRIVATE_KEY_HEX: &str = + "42fec56169112de681ab5935fdda7d589b79ba430bd128bc85d18a592813d0b6"; + + #[test] + fn test_license_success() { + let private_key: PrivateKey = + PrivateKey::from_bytes_hex(QUICKWIT_PRIVATE_KEY_HEX_TEST).unwrap(); + let key_pair = KeyPair::from(&private_key); + let biscuit = super::create_license( + LicenseLevel::Gold, + "LittleBlue Inc.", + SystemTime::UNIX_EPOCH + std::time::Duration::from_secs(2_077_439_515), + ) + .build(&key_pair) + .unwrap(); + let license_str = biscuit.to_base64().unwrap(); + + let license = super::extract_license(&license_str).unwrap(); + assert_eq!(license.license_level, LicenseLevel::Gold); + assert_eq!(&license.licensee, "LittleBlue Inc."); + } + + #[test] + fn test_license_invalid_private_key() { + let private_key: PrivateKey = + PrivateKey::from_bytes_hex(QUICKWIT_INVALID_PRIVATE_KEY_HEX).unwrap(); + let key_pair = KeyPair::from(&private_key); + let biscuit = super::create_license( + LicenseLevel::Gold, + "LittleBlue Inc.", + SystemTime::UNIX_EPOCH + std::time::Duration::from_secs(2_077_439_515), + ) + .build(&key_pair) + .unwrap(); + let license_str = biscuit.to_base64().unwrap(); + let err = super::extract_license(&license_str).unwrap_err(); + assert!(matches!(err, super::Error::Unverified)); + } + + #[test] + fn test_license_expired() { + let private_key: PrivateKey = + PrivateKey::from_bytes_hex(QUICKWIT_PRIVATE_KEY_HEX_TEST).unwrap(); + let key_pair = KeyPair::from(&private_key); + let biscuit = super::create_license( + LicenseLevel::Gold, + "LittleBlue Inc.", + SystemTime::UNIX_EPOCH + std::time::Duration::from_secs(1_730_370_989), + ) + .build(&key_pair) + .unwrap(); + let license_str = biscuit.to_base64().unwrap(); + let err = super::extract_license(&license_str).unwrap_err(); + assert!(matches!(err, super::Error::LicenseExpired)); + } + + #[test] + fn test_missing_licensee() { + let private_key: PrivateKey = + PrivateKey::from_bytes_hex(QUICKWIT_PRIVATE_KEY_HEX_TEST).unwrap(); + let key_pair = KeyPair::from(&private_key); + let biscuit = biscuit!( + r#"license_level("gold"); + check if time($time), $time <= 2035-05-30T20:00:00Z; + "#, + ) + .build(&key_pair) + .unwrap(); + let license_str = biscuit.to_base64().unwrap(); + let err = super::extract_license(&license_str).unwrap_err(); + assert!(matches!(err, super::Error::InvalidParameter(_))); + } +} diff --git a/quickwit/quickwit-proto/src/codegen/jaeger/jaeger.api_v2.rs b/quickwit/quickwit-proto/src/codegen/jaeger/jaeger.api_v2.rs index 42a2f109167..b34d2868413 100644 --- a/quickwit/quickwit-proto/src/codegen/jaeger/jaeger.api_v2.rs +++ b/quickwit/quickwit-proto/src/codegen/jaeger/jaeger.api_v2.rs @@ -92,7 +92,6 @@ pub mod trace { } } /// Note that both Span and Batch may contain a Process. -/// /// This is different from the Thrift model which was only used /// for transport, because Proto model is also used by the backend /// as the domain model, where once a batch is received it is split diff --git a/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.search.rs b/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.search.rs index 473f1ec42f1..189019162f8 100644 --- a/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.search.rs +++ b/quickwit/quickwit-proto/src/codegen/quickwit/quickwit.search.rs @@ -371,7 +371,6 @@ pub struct Hit { pub index_id: ::prost::alloc::string::String, } /// A partial hit, is a hit for which we have not fetch the content yet. -/// /// Instead, it holds a document_uri which is enough information to /// go and fetch the actual document data, by performing a `get_doc(...)` /// request. diff --git a/quickwit/quickwit-serve/src/build_info.rs b/quickwit/quickwit-serve/src/build_info.rs index 229897af996..24efcb3bc03 100644 --- a/quickwit/quickwit-serve/src/build_info.rs +++ b/quickwit/quickwit-serve/src/build_info.rs @@ -32,6 +32,7 @@ pub struct BuildInfo { pub commit_short_hash: &'static str, pub commit_tags: Vec, pub version: String, + pub edition: &'static str, } impl BuildInfo { @@ -68,7 +69,15 @@ impl BuildInfo { .cloned() .unwrap_or_else(|| concat!(env!("CARGO_PKG_VERSION"), "-nightly").to_string()); - Self { + let edition = { + if cfg!(feature = "enterprise") { + "enterprise" + } else { + "community" + } + }; + + BuildInfo { build_date: env!("BUILD_DATE"), build_profile: env!("BUILD_PROFILE"), build_target: env!("BUILD_TARGET"), @@ -78,6 +87,7 @@ impl BuildInfo { commit_short_hash, commit_tags, version, + edition, } }) } @@ -85,7 +95,8 @@ impl BuildInfo { pub fn get_version_text() -> String { let build_info = Self::get(); format!( - "{} ({} {} {})", + "{} {} ({} {} {})", + build_info.edition, build_info.cargo_pkg_version, build_info.build_target, build_info.commit_date, diff --git a/quickwit/.license_header.txt b/quickwit/scripts/.agpl.license_header.txt similarity index 99% rename from quickwit/.license_header.txt rename to quickwit/scripts/.agpl.license_header.txt index 5dcb755bc8a..f77c3c4c9ba 100644 --- a/quickwit/.license_header.txt +++ b/quickwit/scripts/.agpl.license_header.txt @@ -16,4 +16,3 @@ // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . - diff --git a/quickwit/scripts/.ee.license_header.txt b/quickwit/scripts/.ee.license_header.txt new file mode 100644 index 00000000000..9a1485ca763 --- /dev/null +++ b/quickwit/scripts/.ee.license_header.txt @@ -0,0 +1,20 @@ +// The Quickwit Enterprise Edition (EE) license +// Copyright (c) {\d+}-present Quickwit Inc. +// +// With regard to the Quickwit Software: +// +// This software and associated documentation files (the "Software") may only be +// used in production, if you (and any entity that you represent) hold a valid +// Quickwit Enterprise license corresponding to your usage. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +// For all third party components incorporated into the Quickwit Software, those +// components are licensed under the original license provided by the owner of the +// applicable component. diff --git a/quickwit/scripts/check_license_headers.sh b/quickwit/scripts/check_license_headers.sh index d36f24e8aff..6684b2023ba 100755 --- a/quickwit/scripts/check_license_headers.sh +++ b/quickwit/scripts/check_license_headers.sh @@ -2,6 +2,8 @@ RESULT=0 +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + for file in $(git ls-files | \ grep "build\|src\|proto" | \ grep -e "\.proto\|\.rs\|\.ts" | \ @@ -10,9 +12,13 @@ for file in $(git ls-files | \ grep -v "/codegen/" \ ) do - diff <(sed 's/{\\d+}/2024/' .license_header.txt) <(head -n 19 $file) > /dev/null - DIFFRESULT=$? - if [ $DIFFRESULT -ne 0 ]; then + # echo "Checking $file"; + diff <(sed 's/{\\d+}/2024/' "${SCRIPT_DIR}/.agpl.license_header.txt") <(head -n 18 $file) > /dev/null + HAS_AGPL_LICENSE=$? + diff <(sed 's/{\\d+}/2024/' "${SCRIPT_DIR}/.ee.license_header.txt") <(head -n 20 $file) > /dev/null + HAS_EE_LICENSE=$? + HAS_LICENSE_HEADER=$(( $HAS_AGPL_LICENSE ^ $HAS_EE_LICENSE )) + if [ $HAS_LICENSE_HEADER -ne 1 ]; then grep -q -i 'begin quickwit-codegen' $file GREPRESULT=$? if [ $GREPRESULT -ne 0 ]; then