You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/11/24 00:49:28 UTC

[GitHub] [incubator-kyuubi] bowenliang123 commented on issue #3845: [Bug][Authz] `CREATE OR REPLACE` operation requires `ALTER` table privilege instead of `CREATE` table privilege when table exists

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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org