wangzhigang1999 opened a new pull request, #7530:
URL: https://github.com/apache/kyuubi/pull/7530

   ### Why are the changes needed?
   
   First half of #7458 (the statement hook; the result-set hook is a follow-up 
PR). Kyuubi lacks a gateway-level, per-statement hook before a statement is 
routed to the engine (Spark AuthZ is Spark-specific). This adds a server-side 
`StatementInterceptor` SPI, invoked for each interactive statement before 
operation creation and routing, that can **inspect / rewrite / reject** — one 
stable hook for authorization, risky-SQL interception, and rewriting.
   
   - Lives in the dependency-free `kyuubi-server-plugin` module, JDK types 
only; does not expose session conf/credentials.
   - `kyuubi.operation.statement.interceptors` is `serverOnly` (no session 
bypass); fail-closed on throw/`null`; eager init at startup.
   - Context exposes `statementId()` (the client's operation handle id) to 
correlate a statement with its later operation/result set.
   
   Interactive path only.
   
   ### How was this patch tested?
   
   Unit (`StatementInterceptionSuite`, `PluginLoaderSuite`) and end-to-end 
JDBC→server→engine (`StatementInterceptorSuite`) covering 
proceed/rewrite/reject, the executeOnServer path, fail-closed, concurrency, and 
`statementId`. `spotless`/`scalastyle`/`AllKyuubiConfiguration` pass.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Assisted-by: Claude Opus 4.8
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to