Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
5901fd7
session: server authentication core, static tokens, failure throttle …
techgopal Nov 12, 2026
9baf777
session: public-api snapshot for the auth module
techgopal Nov 12, 2026
6adc781
session: auth review fixes (one role per principal, bounded throttle,…
techgopal Nov 12, 2026
7d728e7
plan, sql, session: ADR 0046 role matrix (RolePolicy), Browse/Operate…
techgopal Nov 12, 2026
288129e
session: public-api snapshot for RolePolicy and the new privileges
techgopal Nov 12, 2026
28875e6
plan, sql, session: roles review fixes (view text and partitions need…
techgopal Nov 12, 2026
e686721
session: refuse auth secrets over 16 KiB and secret files that are no…
techgopal Nov 12, 2026
a6c2c7b
session: DESCRIBE and SHOW COLUMNS of a system table need Browse, not…
techgopal Nov 12, 2026
c29f223
Merge remote-tracking branch 'origin/p3/t002-auth-core' into p3/t002-…
techgopal Nov 12, 2026
e169b22
session: a secret file longer than a token and one line break is refu…
techgopal Nov 12, 2026
eff5375
session, mcp: ReadOnlyPolicy forwards Browse as well as Select, so a …
techgopal Nov 12, 2026
4e22d65
Merge remote-tracking branch 'origin/p3/t002-auth-core' into p3/t002-…
techgopal Nov 12, 2026
dabbc03
session: server TLS and client certificates, part 1 (P3-T002 PR-14c):…
techgopal Nov 12, 2026
8666850
session: PR-14c review fixes (TLS settings refused without the tls fe…
techgopal Nov 12, 2026
d1e7323
sql: statement_targets expects Browse for SHOW TABLES (metadata at Br…
techgopal Nov 12, 2026
bdc1ac4
Merge remote-tracking branch 'origin/p3/t002-roles' into p3/t002-auth…
techgopal Nov 13, 2026
2e60237
session: the TLS startup test resets the copied key's mode, so it doe…
techgopal Nov 13, 2026
c845cde
session: OIDC access tokens (P3-T002 PR-14d): JWT verifier on aws-lc-…
techgopal Nov 13, 2026
c617385
session, common: path confinement (P3-T002, ADR 0046 §3a): PathPrefix…
techgopal Nov 13, 2026
07d1bea
session, io: path confinement review fixes (P3-T002, ADR 0046 §3a): A…
techgopal Nov 13, 2026
40e7b88
store, io, plan, session, common: server-mode egress and credential d…
techgopal Nov 13, 2026
4875d05
session, docs: public-api snapshot (OIDC, path confinement) and the c…
techgopal Nov 13, 2026
b4c150c
store, io, plan, session: T067b re-review fixes: every fs.* key but a…
techgopal Nov 13, 2026
43ab2bd
store, session: T067b verification fixes: the inline GCS key JSON is …
techgopal Nov 13, 2026
9c1a4a1
Merge origin/main into p3/t002-auth-rest (#708 squash: auth files kee…
techgopal Nov 13, 2026
dffcb5e
server, cli: admin listener auth: /metrics and the UI behind ServerAu…
techgopal Nov 13, 2026
cd23d19
Merge remote-tracking branch 'origin/main' into p3/t002-auth-rest
techgopal Nov 13, 2026
ca8af0b
session: the SET store-key check moves to session/ops.rs (command.rs …
techgopal Nov 13, 2026
6895824
server, cli, ci: review fixes: metrics always guarded with auth on, C…
techgopal Nov 13, 2026
017f48c
Merge remote-tracking branch 'origin/p3/t002-connect-wiring' into p3/…
techgopal Nov 13, 2026
5b2581c
connect-server, session, cli: Spark Connect authentication and reques…
techgopal Nov 13, 2026
f362935
connect-server, cli: review fixes for Connect authentication (P3-T002…
techgopal Nov 13, 2026
354563f
common, docs: config docs name no internal ADR or task; regenerate th…
techgopal Nov 13, 2026
0359d96
Merge remote-tracking branch 'origin/main' into p3/t002-auth-rest
techgopal Nov 13, 2026
b988de8
changelog: fragment for server TLS, mTLS, OIDC and path confinement
techgopal Nov 13, 2026
e4d5878
session: check a write's store options before its target store is bui…
techgopal Nov 13, 2026
0ac755b
server, connect-server, cli: TLS on both listeners, client certificat…
techgopal Nov 13, 2026
0524e13
Merge remote-tracking branch 'origin/main' into p3/t002-auth-rest
techgopal Nov 13, 2026
2187e1c
common: an Azure container@account URL is a path, not a credential, s…
techgopal Nov 14, 2026
1810d87
session, server, connect-server, exec, cli: krishiv_auth_failed_total…
techgopal Nov 14, 2026
9e32fff
Merge remote-tracking branch 'origin/main' into p3/t002-auth-rest
techgopal Nov 14, 2026
0f35328
session, connect-server, exec: S4 review fixes: a denial is counted o…
techgopal Nov 14, 2026
b5f28de
Merge remote-tracking branch 'origin/p3/t002-auth-rest' into p3/t002-…
techgopal Nov 14, 2026
a2145b3
session, connect-server: the client's user_id recorded unverified in …
techgopal Nov 14, 2026
354c36d
docs: deploy guide: server authentication, roles, TLS, startup refusa…
techgopal Nov 14, 2026
c31bfc0
session, connect-server: SET and RESET of a key settable by admin nee…
techgopal Nov 14, 2026
62a8a76
Merge remote-tracking branch 'origin/main' into p3/t002-connect-grpc
techgopal Nov 14, 2026
89c7c3e
connect-server: a session or operation id another principal holds is …
techgopal Nov 14, 2026
e722ec5
common: krishiv.connect.handshakeTimeout also bounds the TLS handshak…
techgopal Nov 14, 2026
c9ebefb
connect-server, session: review fixes: ReleaseExecute and Interrupt r…
techgopal Nov 14, 2026
cd1249d
Merge origin/main into p3/t002-connect-grpc
techgopal Nov 14, 2026
44048cb
connect-server, session: tests for the foreign-id audit paths (review…
techgopal Nov 14, 2026
6161092
Merge remote-tracking branch 'origin/main' into p3/t002-connect-grpc
techgopal Nov 14, 2026
487bff2
changelog: 769 added
techgopal Nov 14, 2026
9643852
session: RESET key authorization moves to Session::unset_key
techgopal Nov 14, 2026
c31d121
docs: regenerate the configuration reference (krishiv.connect.handsha…
techgopal Nov 14, 2026
9fe4ebf
connect-server: Config set and unset ask the session's policy as SQL …
techgopal Nov 14, 2026
8f28f65
ci: the test job drops the workspace test executables before the feat…
techgopal Nov 15, 2026
55716b0
connect-server: Config set and unset are decided by the session's pol…
techgopal Nov 15, 2026
7cb082f
connect-server: test that the local user sets admin keys through Conf…
techgopal Nov 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,14 @@ jobs:
KRISHIV_TEST_UDF_PYTHON: ${{ runner.temp }}/udf-python/bin/python
KRISHIV_UDF_POOL_REQUIRED: "1"
- run: cargo test --workspace --doc --locked
# The feature-gated runs below rebuild their crates' test executables beside the workspace's, which
# have already run: drop those first, or the krishiv-server link runs out of disk (ld Bus error, #769).
# Libraries (`.rlib`, `.rmeta`, `.so`) stay, so nothing is compiled again.
- name: Drop the workspace's test executables
run: |
df -h /
find target/debug/deps -maxdepth 1 -type f -perm -u+x ! -name '*.so' ! -name '*.d' -delete
df -h /
- run: cargo nextest run -p krishiv-session --features telemetry-otlp --test otlp_collector --locked
# Server TLS (`tls`) and OIDC (`oidc`), both off by default: the in-memory rustls handshakes,
# and the JWT verifier against keys generated per run.
Expand Down
5 changes: 5 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,14 @@ rdkafka = { version = "0.39", default-features = false }
wasmtime = { version = "49", default-features = false }
axum = { version = "0.8.9", default-features = false }
tower = { version = "0.5.3", default-features = false }
# Test clients only: `TokioIo` for a tonic channel over a TLS stream.
hyper-util = { version = "0.1.21", default-features = false }
rust-embed = { version = "8.13", default-features = false }
utoipa = { version = "6.0", default-features = false }
rmcp = { version = "3.5.1", default-features = false }
rustls = { version = "0.23", default-features = false }
# Server TLS on the listeners (P3-T002 design §3.5): the async acceptor over `rustls`.
tokio-rustls = { version = "0.26.6", default-features = false }
# OIDC JWT signatures (krishiv-session `oidc`); already in the tree as rustls's crypto provider.
aws-lc-rs = { version = "1.18.2", default-features = false, features = ["aws-lc-sys"] }
tracing = { version = "0.1.44", default-features = false }
Expand Down
1 change: 1 addition & 0 deletions changelog.d/769.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`krishiv server` authenticates every Spark Connect RPC once authentication is configured (static tokens, client certificates or OIDC): each session belongs to its caller, Connect requests follow the viewer/operator/admin role matrix, both ports serve TLS, and refusals are counted on `/metrics` (`krishiv_auth_failed_total`, `krishiv_auth_denied_total`).
2 changes: 1 addition & 1 deletion crates/krishiv-cli/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The `krishiv` binary: sql, server, coordinator, worker, mcp, ui, doctor, migrate
Paths are relative to this crate.
- `src/main.rs` subcommand dispatch and the allocator/memory hook set-up
- `src/sql.rs` the `krishiv sql` subcommand: input (`-e`, `-f`, stdin), output (`-o`), `--conf`, `--table`, `--timing`, `--agent`, `--max-rows`, `--max-seconds`
- `src/server.rs` `krishiv server` (feature `server`; `ui` implies it; design P3-T001): host checks before binding (non-loopback refused until P3-T002, root refused without `--allow-root`, core dumps off unless `krishiv.server.allowCoreDumps`), one tokio runtime for the Spark Connect listener (`krishiv-connect-server`, `--connect-port`, default 15002) and the admin listener (`--port` 8080: `/healthz`, `/readyz`, `/metrics` and the UI with `ui`; with `krishiv.auth.*` tokens configured they are guarded by `SessionGuard` over one `ServerAuth`, else by a random token printed once; `krishiv.auth.*` settings never reach the engine configuration), SIGTERM/SIGINT drain then exit 0 after the engine runtime is dropped, a second signal exits 130; `tests/server.rs`
- `src/server.rs` `krishiv server` (feature `server`; `ui` implies it; design P3-T001): host checks before binding (`check_listener`: non-loopback needs `krishiv.auth.*`, bearer methods there need TLS, client certificates need TLS; root refused without `--allow-root`, core dumps off unless `krishiv.server.allowCoreDumps`), one tokio runtime for the Spark Connect listener (`krishiv-connect-server`, `--connect-port`, default 15002) and the admin listener (`--port` 8080: `/healthz`, `/readyz`, `/metrics` and the UI with `ui`; with `krishiv.auth.*` tokens configured they are guarded by `SessionGuard` over one `ServerAuth`, else by a random token printed once; `krishiv.auth.*` and `krishiv.server.tls.*` settings never reach the engine configuration; with `krishiv.server.tls.certFile`/`keyFile` both listeners speak TLS through one `ServerTls`, reloaded on SIGHUP (handler installed before the addresses print), and the printed addresses are `sc://...;use_ssl=true` / `https://`). With authentication on, the same `ServerAuth` authenticates every Connect RPC (`ConnectAuth`) and each caller's session is `Session::new_session_as(principal, PathPrefixPolicy(RolePolicy(role)))` (`krishiv_connect_server::role_sessions`; client code admin-only until T014b, ADR 0046 N1; the path confinement is checked at startup; a caller with no role is refused before any session), SIGTERM/SIGINT drain then exit 0 after the engine runtime is dropped, a second signal exits 130; `tests/server.rs`
- `src/check_compat/` (P3-T029) `krishiv check-compat <paths>`: `mod.rs` args, file walk, exit codes (0 none, 1 findings, 2 read errors), JSON/text report; `scan.rs` SQL / Python / notebook-cell scanners; `alternatives.json` workarounds for not-yet functions (names only supported functions; a unit test checks), `functions.json` the function matrix (generated from the SQL reference pages by `tests/scripts/gen_compat_matrix.py`); corpus `tests/check_compat_corpus/` (`handwritten/` with a hand-checked `expected.json`, `supported_only/` must give no findings, `generated/` from `tests/scripts/gen_check_compat_corpus.py`); JSON report is `{schema_version, files_scanned, findings, errors}`
- `src/repl.rs` the interactive loop (no `-e`/`-f` on a terminal): `.timer`, `.format`, `.complete`, `.history`, history persistence
- `src/complete.rs` completion sources (keywords, function registry, session catalog, config registry)
Expand Down
3 changes: 3 additions & 0 deletions crates/krishiv-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ serde_json = { workspace = true }
mimalloc = { workspace = true, optional = true }

[dev-dependencies]
rustls = { workspace = true, features = ["aws_lc_rs", "std", "tls12"] }
tempfile.workspace = true
libmimalloc-sys = { workspace = true, features = ["extended"] }

Expand All @@ -62,7 +63,9 @@ server = [
"dep:krishiv-server",
"krishiv-server/session",
"krishiv-server/metrics-prometheus",
"krishiv-server/tls",
"dep:krishiv-session",
"krishiv-session/tls",
"dep:krishiv-connect-server",
"dep:axum",
"dep:tokio",
Expand Down
Loading
Loading