diff --git a/quickwit/Cargo.lock b/quickwit/Cargo.lock
index f1851bba250..5a90536790e 100644
--- a/quickwit/Cargo.lock
+++ b/quickwit/Cargo.lock
@@ -6559,6 +6559,7 @@ dependencies = [
"mockall",
"once_cell",
"ouroboros",
+ "quickwit-auth",
"quickwit-common",
"quickwit-config",
"quickwit-doc-mapper",
diff --git a/quickwit/Cargo.toml b/quickwit/Cargo.toml
index 082748687a8..12bdd18eae4 100644
--- a/quickwit/Cargo.toml
+++ b/quickwit/Cargo.toml
@@ -36,7 +36,6 @@ members = [
"quickwit-serve",
"quickwit-storage",
"quickwit-telemetry",
- "quickwit-telemetry",
]
# The following list excludes `quickwit-metastore-utils` and `quickwit-lambda`
diff --git a/quickwit/quickwit-auth/Cargo.toml b/quickwit/quickwit-auth/Cargo.toml
new file mode 100644
index 00000000000..ea2013777c5
--- /dev/null
+++ b/quickwit/quickwit-auth/Cargo.toml
@@ -0,0 +1,21 @@
+[package]
+name = "quickwit-auth"
+version.workspace = true
+edition.workspace = true
+homepage.workspace = true
+documentation.workspace = true
+repository.workspace = true
+authors.workspace = true
+license.workspace = true
+
+[dependencies]
+biscuit-auth = { workspace = true, optional=true }
+http = { workspace = true }
+serde = { workspace = true }
+thiserror = { workspace = true }
+tonic = { workspace = true }
+tokio = { workspace = true }
+tracing = { workspace = true }
+
+[features]
+enterprise = ["biscuit-auth"]
diff --git a/quickwit/quickwit-auth/src/community.rs b/quickwit/quickwit-auth/src/community.rs
new file mode 100644
index 00000000000..7be01328fde
--- /dev/null
+++ b/quickwit/quickwit-auth/src/community.rs
@@ -0,0 +1,87 @@
+// Copyright (C) 2024 Quickwit, Inc.
+//
+// Quickwit is offered under the AGPL v3.0 and as commercial software.
+// For commercial licensing, contact us at hello@quickwit.io.
+//
+// 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.
+//
+// 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.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+
+use std::future::Future;
+
+use crate::AuthorizationError;
+
+pub type AuthorizationToken = ();
+
+pub trait Authorization {
+ fn attenuate(
+ &self,
+ _auth_token: AuthorizationToken,
+ ) -> Result {
+ Ok(())
+ }
+}
+
+impl Authorization for T {}
+
+pub trait StreamAuthorization {
+ fn attenuate(
+ _auth_token: AuthorizationToken,
+ ) -> std::result::Result {
+ Ok(())
+ }
+}
+
+impl StreamAuthorization for T {}
+
+pub fn get_auth_token(
+ _req_metadata: &tonic::metadata::MetadataMap,
+) -> Result {
+ Ok(())
+}
+
+pub fn set_auth_token(
+ _auth_token: &AuthorizationToken,
+ _req_metadata: &mut tonic::metadata::MetadataMap,
+) {
+}
+
+pub fn authorize(
+ _req: &R,
+ _auth_token: &AuthorizationToken,
+) -> Result<(), AuthorizationError> {
+ Ok(())
+}
+
+pub fn build_tonic_stream_request_with_auth_token(
+ req: R,
+) -> Result, AuthorizationError> {
+ Ok(tonic::Request::new(req))
+}
+
+pub fn build_tonic_request_with_auth_token(
+ req: R,
+) -> Result, AuthorizationError> {
+ Ok(tonic::Request::new(req))
+}
+
+pub fn authorize_stream(
+ _auth_token: &AuthorizationToken,
+) -> Result<(), AuthorizationError> {
+ Ok(())
+}
+
+pub fn execute_with_authorization(_: AuthorizationToken, f: F) -> impl Future