packyan opened a new issue, #3632: URL: https://github.com/apache/incubator-kyuubi/issues/3632
### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) ### Search before asking - [X] I have searched in the [issues](https://github.com/apache/incubator-kyuubi/issues?q=is%3Aissue) and found no similar issues. ### Describe the feature The spark sql AUTHZ in Kyuubi currently supports authorize create function command , drop function command, and refresh function command. But the authentication for function usage is not implemented, anyone can use all permanent functions in hive. This behavior needs to be restricted. ### Motivation _No response_ ### Describe the solution Since function expression may be optimized as constants by catalyst optimization rules, the function usage authorization should be injected before the optimization phase. So before the optimization rules running, perform the collection of permanent function information involved in the logical plan and construct them as functionPrivilegeObjects. I think it's necessary to create a class like RuleAuthorization and inject it as a post-hoc resolution dedicated to the authentication of function usage privileges. ### Additional context According to the idea of [HIVE-18841](https://issues.apache.org/jira/browse/HIVE-18841), we only need to authenticate the usage of permanent functions, as it doesn't make sense to do usage authorization for temporary functions. ### Are you willing to submit PR? - [ ] Yes. I can submit a PR independently to improve. - [X] Yes. I would be willing to submit a PR with guidance from the Kyuubi community to improve. - [ ] No. I cannot submit a PR at this time. -- 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]
