Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
collab: Remove unused `api_token` field from `Config` (#56098)
Marshall Bowers367db0706b9c
diff --git a/crates/collab/.env.toml b/crates/collab/.env.tomlindex 8a4c74067a7..1d20a14e2d5 100644--- a/crates/collab/.env.toml+++ b/crates/collab/.env.toml@@ -2,7 +2,6 @@ DATABASE_URL = "postgres://postgres@localhost/zed"# DATABASE_URL = "sqlite:////root/0/zed/db.sqlite3?mode=rwc"DATABASE_MAX_CONNECTIONS = 5HTTP_PORT = 8080-API_TOKEN = "secret"ZED_ENVIRONMENT = "development"LIVEKIT_SERVER = "http://localhost:7880"LIVEKIT_KEY = "devkey"diff --git a/crates/collab/k8s/collab.template.yml b/crates/collab/k8s/collab.template.ymlindex bad3d290d79..f2c2c6ebb48 100644--- a/crates/collab/k8s/collab.template.yml+++ b/crates/collab/k8s/collab.template.yml@@ -87,11 +87,6 @@ spec:key: url- name: DATABASE_MAX_CONNECTIONSvalue: "${DATABASE_MAX_CONNECTIONS}"- - name: API_TOKEN- valueFrom:- secretKeyRef:- name: api- key: token- name: ZED_CLIENT_CHECKSUM_SEEDvalueFrom:secretKeyRef:diff --git a/crates/collab/src/auth.rs b/crates/collab/src/auth.rsindex 629d93388dd..3ea8d839088 100644--- a/crates/collab/src/auth.rs+++ b/crates/collab/src/auth.rs@@ -11,8 +11,7 @@ use std::sync::Arc;/// Validates the authorization header and adds an Extension<Principal> to the request./// Authorization: <user-id> <token>-/// <token> can be an access_token attached to that user, or an access token of an admin-/// or (in development) the string ADMIN:<config.api_token>.+/// <token> is the access_token attached to that user./// Authorization: "dev-server-token" <token>pub async fn validate_header<B>(mut req: Request<B>, next: Next<B>) -> impl IntoResponse {let mut auth_header = reqdiff --git a/crates/collab/src/lib.rs b/crates/collab/src/lib.rsindex 91259b4ce40..041e7461725 100644--- a/crates/collab/src/lib.rs+++ b/crates/collab/src/lib.rs@@ -124,7 +124,6 @@ pub struct Config {pub database_url: String,pub seed_path: Option<PathBuf>,pub database_max_connections: u32,- pub api_token: String,pub livekit_server: Option<String>,pub livekit_key: Option<String>,pub livekit_secret: Option<String>,@@ -171,7 +170,6 @@ impl Config {http_port: 0,database_url: "".into(),database_max_connections: 0,- api_token: "".into(),livekit_server: None,livekit_key: None,livekit_secret: None,diff --git a/crates/collab/tests/integration/test_server.rs b/crates/collab/tests/integration/test_server.rsindex 820bcbd3376..9bfddbca754 100644--- a/crates/collab/tests/integration/test_server.rs+++ b/crates/collab/tests/integration/test_server.rs@@ -586,7 +586,6 @@ impl TestServer {http_port: 0,database_url: "".into(),database_max_connections: 0,- api_token: "".into(),livekit_server: None,livekit_key: None,livekit_secret: None,