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

[WIP] [AUTHZ] hive function usage authz plugin #5144

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

packyan
Copy link
Contributor

@packyan packyan commented Aug 8, 2023

Why are the changes needed?

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


object RuleFunctionAuthorization {

private val functionPrivAndOpType = new ThreadLocal[PrivilegesAndOpType]
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be risky to use ThreadLocal as the function privileges holder.
Is it possible to put them in logical plan's tag via setTagValue ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It might be risky to use ThreadLocal as the function privileges holder. Is it possible to put them in logical plan's tag via setTagValue ?

As the LogicalPlan instances between Analyzer Stage and Optimizer Stage could be different, I don't think it is possible to use 'setTagValue' to track them.

Any other ideas?

@bowenliang123 bowenliang123 marked this pull request as draft August 9, 2023 05:32
@bowenliang123 bowenliang123 changed the title [DRAFT] [AUTHZ] hive function usage authz plugin [WIP] [AUTHZ] hive function usage authz plugin Aug 9, 2023
@packyan
Copy link
Contributor Author

packyan commented Aug 10, 2023

Do we need to add a toggle parameter for this feature, and set Disabled as default?

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.

2 participants