Skip to content
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

[KYUUBI #5768][AUTHZ] Authz internal place holder should skip privilege check #5769

Closed
wants to merge 3 commits into from

Conversation

AngersZhuuuu
Copy link
Contributor

@AngersZhuuuu AngersZhuuuu commented Nov 24, 2023

🔍 Description

Issue References 🔗

This pull request fixes #5768

Describe Your Solution 🔧

Currently all UT have a ShowNamespace command and wrapped by ObjectFilterPlaceHolder
截屏2023-11-24 下午3 29 53
And ObjectFilterPlaceHolder such command will go through buildQuery(), it's noisy when dev to debug and unnecessary, we should just skip it since we have check privilege when executing.

Types of changes 🔖

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Test Plan 🧪

Behavior Without This Pull Request ⚰️

Behavior With This Pull Request 🎉

Related Unit Tests


Checklists

📝 Author Self Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • This patch was not authored or co-authored using Generative Tooling

📝 Committer Pre-Merge Checklist

  • Pull request title is okay.
  • No license issues.
  • Milestone correctly set?
  • Test coverage is ok
  • Assignees are selected.
  • Minimum number of approvals
  • No changes are requested

Be nice. Be informative.

@AngersZhuuuu
Copy link
Contributor Author

ping @yaooqinn could you take a look?

if (inputs.isEmpty && opType == OperationType.SHOWDATABASES) {
val resource = AccessResource(DATABASE, null, None)
requests += AccessRequest(resource, ugi, opType, AccessType.USE)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need this logical since we do this in FilteredShowNamespaceExec cc @bowenliang123

@codecov-commenter
Copy link

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (1e4d91e) 61.35% compared to head (2018e78) 61.35%.
Report is 2 commits behind head on master.

Files Patch % Lines
.../kyuubi/plugin/spark/authz/PrivilegesBuilder.scala 71.42% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5769      +/-   ##
============================================
- Coverage     61.35%   61.35%   -0.01%     
  Complexity       23       23              
============================================
  Files           607      607              
  Lines         35917    35921       +4     
  Branches       4927     4931       +4     
============================================
+ Hits          22038    22039       +1     
- Misses        11487    11490       +3     
  Partials       2392     2392              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pan3793 pan3793 added this to the v1.9.0 milestone Nov 27, 2023
@pan3793 pan3793 closed this in 7f02809 Nov 27, 2023
@pan3793
Copy link
Member

pan3793 commented Nov 27, 2023

Thanks, merged to master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TASK][EASY] Authz internal place holder should skip privilege check
4 participants