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
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import org.apache.kyuubi.plugin.spark.authz.OperationType.OperationType
import org.apache.kyuubi.plugin.spark.authz.PrivilegeObjectActionType._
import org.apache.kyuubi.plugin.spark.authz.rule.Authorization._
import org.apache.kyuubi.plugin.spark.authz.rule.permanentview.PermanentViewMarker
import org.apache.kyuubi.plugin.spark.authz.rule.rowfilter._
import org.apache.kyuubi.plugin.spark.authz.serde._
import org.apache.kyuubi.plugin.spark.authz.util.AuthZUtils._
import org.apache.kyuubi.util.reflect.ReflectUtils._
Expand Down Expand Up @@ -303,6 +304,14 @@ object PrivilegesBuilder {
val inputObjs = new ArrayBuffer[PrivilegeObject]
val outputObjs = new ArrayBuffer[PrivilegeObject]
val opType = plan match {
case ObjectFilterPlaceHolder(child) if child.nodeName == "ShowTables" =>
OperationType.SHOWTABLES
case ObjectFilterPlaceHolder(child) if child.nodeName == "ShowNamespaces" =>
OperationType.SHOWTABLES
AngersZhuuuu marked this conversation as resolved.
Show resolved Hide resolved
case _: FilteredShowTablesCommand => OperationType.SHOWTABLES
case _: FilteredShowFunctionsCommand => OperationType.SHOWFUNCTIONS
case _: FilteredShowColumnsCommand => OperationType.SHOWCOLUMNS

// ExplainCommand run will execute the plan, should avoid check privilege for the plan.
case _: ExplainCommand =>
setExplainCommandExecutionId(spark)
Expand Down
Loading