bowenliang123 commented on issue #3845: URL: https://github.com/apache/incubator-kyuubi/issues/3845#issuecomment-1325811529
Currently the opType for privilege check, soly relies on the node name of the plan, which lacks of detail of plan. 1.see calling `RuleAuthorization` <https://github.com/apache/incubator-kyuubi/blob/master/extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/ranger/RuleAuthorization.scala#L50> 2.see mapping `CreateViewCommand` to `CREATEVIEW` in `OperationType` <https://github.com/apache/incubator-kyuubi/blob/master/extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/OperationType.scala#L73> In order to satisfy determining the opType of command , we have to, 1. modify `OperationType.apply` to make it accept plan detail 2. use the detail of the plan to determine opType, in this case, we may rely on the `allowExisting` attribute of `CreateViewCommand` to check whether the view exsited. -- 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]
