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

   ### Why are the changes needed?
   
   Closes #7671, the follow-up @wForget asked for while reviewing #7637.
   
   `AuthzConfigurationChecker` matches 
`org.apache.kyuubi.plugin.spark.authz.ranger` in the effective 
`spark.sql.optimizer.excludedRules`, which was the whole extension when the 
check was written. Most rules live under 
`org.apache.kyuubi.plugin.spark.authz.rule` now, so a rule added there is 
outside the denylist. This matches the extension's own package instead.
   
   It is future-proofing rather than a fix for a live bypass, and worth saying 
why. `spark.sql.optimizer.excludedRules` filters optimizer batches only and 
Spark has no analyzer counterpart, so the resolution rules that apply masking 
and row filtering cannot be excluded at all. Of the four optimizer rules 
`RangerSparkExtension` injects, `RuleAuthorization` is in `…authz.ranger` and 
already covered; the other three — `RuleEliminateMarker`, 
`RuleEliminatePermanentViewMarker`, `RuleEliminateTypeOf` — only strip markers 
after the check has run, and excluding one of them breaks the query instead of 
lifting a check.
   
   The change does reject configurations that are accepted today, which is why 
it is separate from #7637 rather than part of it.
   
   ### How was this patch tested?
   
   A new case in `AuthzConfigurationCheckerSuite` covers the three 
`…authz.rule` rules by their `ruleName`, through both paths the checker guards: 
the value in effect, and the `SET` syntax.
   
   30 tests green across `AuthzConfigurationCheckerSuite`, 
`DataMaskingForInMemoryParquetSuite` and the row filtering suite. With the 
constant reverted to the ranger package the new case fails, so it tests the 
change rather than the code around it.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Assisted-by: Claude Opus 5
   


-- 
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