Skip to content

Commit 367db07

Browse files
authored
collab: Remove unused api_token field from Config (#56098)
This PR removes the `api_token` field from Collab's `Config`, as it is no longer used. Release Notes: - N/A
1 parent 6aca636 commit 367db07

5 files changed

Lines changed: 1 addition & 11 deletions

File tree

crates/collab/.env.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ DATABASE_URL = "postgres://postgres@localhost/zed"
22
# DATABASE_URL = "sqlite:////root/0/zed/db.sqlite3?mode=rwc"
33
DATABASE_MAX_CONNECTIONS = 5
44
HTTP_PORT = 8080
5-
API_TOKEN = "secret"
65
ZED_ENVIRONMENT = "development"
76
LIVEKIT_SERVER = "http://localhost:7880"
87
LIVEKIT_KEY = "devkey"

crates/collab/k8s/collab.template.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,6 @@ spec:
8787
key: url
8888
- name: DATABASE_MAX_CONNECTIONS
8989
value: "${DATABASE_MAX_CONNECTIONS}"
90-
- name: API_TOKEN
91-
valueFrom:
92-
secretKeyRef:
93-
name: api
94-
key: token
9590
- name: ZED_CLIENT_CHECKSUM_SEED
9691
valueFrom:
9792
secretKeyRef:

crates/collab/src/auth.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ use std::sync::Arc;
1111

1212
/// Validates the authorization header and adds an Extension<Principal> to the request.
1313
/// Authorization: <user-id> <token>
14-
/// <token> can be an access_token attached to that user, or an access token of an admin
15-
/// or (in development) the string ADMIN:<config.api_token>.
14+
/// <token> is the access_token attached to that user.
1615
/// Authorization: "dev-server-token" <token>
1716
pub async fn validate_header<B>(mut req: Request<B>, next: Next<B>) -> impl IntoResponse {
1817
let mut auth_header = req

crates/collab/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ pub struct Config {
124124
pub database_url: String,
125125
pub seed_path: Option<PathBuf>,
126126
pub database_max_connections: u32,
127-
pub api_token: String,
128127
pub livekit_server: Option<String>,
129128
pub livekit_key: Option<String>,
130129
pub livekit_secret: Option<String>,
@@ -171,7 +170,6 @@ impl Config {
171170
http_port: 0,
172171
database_url: "".into(),
173172
database_max_connections: 0,
174-
api_token: "".into(),
175173
livekit_server: None,
176174
livekit_key: None,
177175
livekit_secret: None,

crates/collab/tests/integration/test_server.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,6 @@ impl TestServer {
586586
http_port: 0,
587587
database_url: "".into(),
588588
database_max_connections: 0,
589-
api_token: "".into(),
590589
livekit_server: None,
591590
livekit_key: None,
592591
livekit_secret: None,

0 commit comments

Comments
 (0)