-
Notifications
You must be signed in to change notification settings - Fork 972
[KYUUBI #5475][FOLLOWUP] Authz check permanent view's subquery should check view's correct privilege #5476
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
…ck view's correct privilege
|
ping @yaooqinn |
Codecov Report
@@ Coverage Diff @@
## master #5476 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 588 588
Lines 33480 33479 -1
Branches 4405 4402 -3
======================================
+ Misses 33480 33479 -1
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
Incomplete image link in PR description. |
Yea, changed |
|
ping @yaooqinn @bowenliang123 could you table a look? |
|
Any suggestion? |
|
Can we add some tests for it? |
Existing ut already verified this? Since we skip check the subquery expression's privilege check |
...rc/main/scala/org/apache/kyuubi/plugin/spark/authz/ranger/RuleApplyPermanentViewMarker.scala
Outdated
Show resolved
Hide resolved
|
The existing UT seems insufficient as it only has one col. Let's update the test at least with |
How about current? |
bowenliang123
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
| } | ||
| PermanentViewMarker(resolvedSubquery, resolvedSubquery.desc) | ||
| PermanentViewMarker( | ||
| resolvedSubquery, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: it's not resolvedSubquery but a view?
|
Thanks, merged to master |
Why are the changes needed?
To fix #5475
In issue #5417 we fixed the problem that AUTHZ will still check scalar-subquery/in-subquery in permanent will.
But we just ignore the check, the subquery still will run, in this PR, we record the permanent view's visited column to check the permanent view's privilege to avoid extra execution effort.
For the test

[KYUUBI #5417] should not check scalar-subquery in permanent viewI print all the plan that pass to privilege builder as belowbefore this pr

This two graph shows this pr deny the execution of subquery when we don't have the veiw's privilege
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?