-
Notifications
You must be signed in to change notification settings - Fork 982
[KYUUBI #5417] Authz should not check dependent subquery plan privilege #5418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…view contains a subquery
...z/src/test/scala/org/apache/kyuubi/plugin/spark/authz/ranger/RangerSparkExtensionSuite.scala
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #5418 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 588 588
Lines 33423 33435 +12
Branches 4391 4399 +8
======================================
- Misses 33423 33435 +12
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
Last year, I have done this PR #3326 for skipping shadowed source tables of the permanent view. The Could you have a deep look at this and tell the difference before further implementations? Skipping all the subqueries may be risky and not robust. |
...rc/main/scala/org/apache/kyuubi/plugin/spark/authz/ranger/RuleApplyPermanentViewMarker.scala
Show resolved
Hide resolved
...ark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/ranger/RuleAuthorization.scala
Outdated
Show resolved
Hide resolved
...rc/main/scala/org/apache/kyuubi/plugin/spark/authz/ranger/RuleApplyPermanentViewMarker.scala
Show resolved
Hide resolved
...rc/main/scala/org/apache/kyuubi/plugin/spark/authz/ranger/RuleApplyPermanentViewMarker.scala
Show resolved
Hide resolved
...rc/main/scala/org/apache/kyuubi/plugin/spark/authz/ranger/RuleApplyPermanentViewMarker.scala
Show resolved
Hide resolved
|
Please fix the PR title and description according to the latest updates. Thanks. LGTM overall. |
...rc/main/scala/org/apache/kyuubi/plugin/spark/authz/ranger/RuleApplyPermanentViewMarker.scala
Outdated
Show resolved
Hide resolved
|
Thank you @AngersZhuuuu Merged to master |
Why are the changes needed?
Fix #5417
If there is is a view with subquery, authz will still request this subquery's interval privilege, it's not we want.
For view
When we query the view
Before this pr, since spark will first execute subquery, it will first request
[default/table1/scope]then request[default/view1/new_id]after this pr, it only request
[default/view1/new_id]How was this patch tested?
Add some test cases that check the changes thoroughly including negative and positive cases if possible
Add screenshots for manual tests if appropriate
Run test locally before make a pull request
Was this patch authored or co-authored using generative AI tooling?
No