Repository navigation
Conversation
… header x-krishiv-read-only (ON-E1) Signed-off-by: gopal tathe <44522021+techgopal@users.noreply.github.com>
…adonly-connect Signed-off-by: gopal tathe <44522021+techgopal@users.noreply.github.com>
…-session (Analysis::check_read_only, ON-E1 step 4); an aliased Spark key with no Krishiv default answers Spark's default (spark.sql.shuffle.partitions = 200) Signed-off-by: gopal tathe <44522021+techgopal@users.noreply.github.com>
… manager's read-only session and a read-only child session (ON-E1 coverage) Signed-off-by: gopal tathe <44522021+techgopal@users.noreply.github.com>
…adonly-connect Signed-off-by: gopal tathe <44522021+techgopal@users.noreply.github.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
Signed-off-by: gopal tathe <44522021+techgopal@users.noreply.github.com>
…under 2,000 lines (file-size gate on #1162) Signed-off-by: gopal tathe <44522021+techgopal@users.noreply.github.com>
|
Diff review of 1b89271 (full): changes requested.
Nits: use an |
…usals at authorize_statement, path reads refused, the read-only class for the rule's own 42501s, Flight SQL and Connect tests - authorize_statement (Session::sql and the catalog API) refuses a non-READ class or a target outside READ_ONLY_PRIVILEGES; the ran.rs check is gone (finding 3) - ReadOnlyPolicy::for_session also refuses every privilege on a path (finding 2) - Session::read_only_refusal maps the read-only rule's own 42501 to KRISHIV_MCP_STATEMENT_NOT_ALLOWED; a read the inner policy denies stays 42501 (finding 3) - Catalog::drop_global_temp_view refuses in a read-only session before its existence check - which layer covers each condition of the MCP gate's analysis check, in the session CLAUDE.md (finding 4) - tests: Flight SQL statements, updates, prepared statements, path read, SetSessionOptions, cookies both ways (finding 1); Connect path reads, dropGlobalTempView, catalog calls, CreateDataframeView, inline Python UDF, AnalyzePlan persist, AddArtifacts (finding 5); session path read and inner denials - nits: read_only::Asked enum; changelog split into added and fixed Signed-off-by: gopal tathe <44522021+techgopal@users.noreply.github.com>
…adonly-connect Signed-off-by: gopal tathe <44522021+techgopal@users.noreply.github.com> # Conflicts: # crates/krishiv-session/CLAUDE.md # crates/krishiv-session/src/session.rs
|
Diff review of 767db6a (full diff against main): changes requested. The five findings of 1b89271 are closed, and the session cannot be left (flag in every session constructor and in the session owner, header fail closed, every command through
Nits (not blocking): Nothing was built or run for this review. |
…ry's session read-only A read-only session's KRISHIV_MCP_STATEMENT_NOT_ALLOWED now says 'READ, but it needs <privilege>' or 'READ, but it reads by path' instead of the bare class, and an unreadable x-krishiv-read-only header says what the header must be. The header is read after the caller is authenticated. SessionManager applies the caller's read-only flag after any SessionFactory, so a factory that does not read it (an embedder's own) still gives a read-only session; found by the new SetSessionOptions test of catalog and schema. Catalog::drop_temp_view drops nothing in a read-only session. Review of 767db6a (Fable). Signed-off-by: gopal tathe <44522021+techgopal@users.noreply.github.com>
…nly: applied, so a client fails closed on a server that ignored the header AuthLayer stamps the header on the response (initial metadata: streams, replies and refusals) when the caller's read-only header was applied. Tests over Spark Connect and Flight SQL; guide section in docs/guides/access-control.md. Signed-off-by: gopal tathe <44522021+techgopal@users.noreply.github.com>
|
Diff review passed (ffce13d) Scope: the delta since 767db6a (refusal text for a refused read, the |
|
Reviewed-by: Fable Delta since 767db6a: findings none; four nits (record |
… function with a test of its text; SessionFactory says what the read-only copy drops; the path-read and SetSessionOptions tests check the reason Signed-off-by: gopal tathe <44522021+techgopal@users.noreply.github.com>
|
New head e28aba9 (delta since ffce13d, Fable requested):
|
…l metadata only (a status from the trailers does not repeat it; e28aba9 review nit) Signed-off-by: gopal tathe <44522021+techgopal@users.noreply.github.com>
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
@codex review |
|
@coderabbitai review |
Action not completed
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
What
x-krishiv-read-only: truegets a session thatonly reads. The read-only flag is part of the session key, so the same session id without the header is a different
session (a writable request for a read-only id gets
SESSION_NOT_FOUND). An unreadable header value is refused; it isnever read as writable.
Session::new_read_only_session_*,Session::is_read_only,Authenticated::read_only,SessionOwner.read_only;the embedded manager builds read-only sessions too.
KRISHIV_MCP_STATEMENT_NOT_ALLOWED: non-read SQL, non-read commands (write, register, checkpoint),Config
Set/Unset(Getstill works), DataFrame temp views. A read denial from the inner policy is left unchanged.Analysis::check_read_only); theMCP gate calls it (
allows/allows_partsare removed fromkrishiv-mcp/src/gate.rs).(
spark.sql.shuffle.partitions->200for Connect ConfigGetand SQLSET key; it wasSQL_CONF_NOT_FOUND).Tests
krishiv-connect-server/tests/read_only.rs(8 tests: reads pass, every SQL write is refused and changes nothing,write/register/checkpoint are refused, config set/unset are refused and get passes, header handling, session-key
separation, the embedded manager).
krishiv-session/tests/sql_commands.rs: the aliased-key default; a read-only child session only reads.Analysis::check_read_onlyunit tests and a doctest; the krishiv-mcp suite passes.Notes
sqlrelation is lowered as a query, so DDL there is a parse error;Spark runs it.