Skip to content

Commit 860d082

Browse files
committed
feat: split auth feature into auth-jwt + auth-rls
Per SMB session REQUEST at bus e1cf316. The combined auth feature pulled datafusion which triggered xz2 vs liblzma-sys link collision when combined with lance dep in smb-bridge. Split: auth-jwt = serde + serde_json only (JWT extraction, no datafusion) auth-rls = auth-jwt + query (RlsRewriter OptimizerRule, needs datafusion) auth = auth-rls (backward compatible) SMB session can now depend on callcenter[auth-jwt] without pulling datafusion. F8 unblocked. https://claude.ai/code/session_01SbYsmmbPf9YQuYbHZN52Zh
1 parent 060b1b6 commit 860d082

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

crates/lance-graph-callcenter/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ persist = ["dep:arrow", "dep:lance"]
3333
query = ["dep:datafusion", "dep:arrow"]
3434
realtime = ["dep:tokio", "dep:tokio-tungstenite", "dep:serde", "dep:serde_json"]
3535
serve = ["realtime", "query", "dep:axum", "dep:tower-http"]
36-
auth = ["query", "dep:serde", "dep:serde_json"]
36+
auth-jwt = ["dep:serde", "dep:serde_json"]
37+
auth-rls = ["auth-jwt", "query"]
38+
auth = ["auth-rls"]
3739
full = ["persist", "query", "realtime", "serve", "auth"]
3840

3941
[dev-dependencies]

crates/lance-graph-callcenter/src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,12 @@ pub mod drain;
8181
// DM-7 — JwtMiddleware + ActorContext → LogicalPlan RLS rewriter ([auth])
8282
// UNKNOWN-3 resolved: DataFusion LogicalPlan layer (NOT pgwire).
8383
// UNKNOWN-4 resolved: actor_id: String (JWT sub claim flows through unchanged).
84-
#[cfg(any(feature = "auth", feature = "full"))]
84+
// DM-7 JWT extraction: ActorContext from JWT token (auth-jwt — no datafusion dep)
85+
#[cfg(any(feature = "auth-jwt", feature = "auth", feature = "full"))]
8586
pub mod auth;
8687

87-
// DM-7 RLS rewriter: DataFusion OptimizerRule injecting tenant/actor predicates ([auth] + [query])
88-
#[cfg(all(feature = "auth", feature = "query"))]
88+
// DM-7 RLS rewriter: DataFusion OptimizerRule injecting tenant/actor predicates (auth-rls — pulls datafusion)
89+
#[cfg(any(feature = "auth-rls", feature = "auth", feature = "full"))]
8990
pub mod rls;
9091

9192
// DM-8 — PostgRestHandler: query-string → DataFusion SQL → Lance → Arrow ([serve])

0 commit comments

Comments
 (0)