You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "AngersZhuuuu (via GitHub)" <gi...@apache.org> on 2023/11/06 07:27:54 UTC

[PR] [KYUUBI #5628][AUTHZ] Support path privilege check for resource command [kyuubi]

AngersZhuuuu opened a new pull request, #5629:
URL: https://github.com/apache/kyuubi/pull/5629

   ### _Why are the changes needed?_
   To close #5628 
   Support path privilege check for resource command
   
   - AddJarsCommand
   - AddFilesCommand
   - AddArchivesCommand
   - ListFilesCommand
   - ListJarsCommand
   - ListArchivesCommand
   
   
   ### _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](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request
   
   
   ### _Was this patch authored or co-authored using generative AI tooling?_
   No
   


-- 
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


Re: [PR] [KYUUBI #5628][AUTHZ] Support path privilege check for resource command [kyuubi]

Posted by "AngersZhuuuu (via GitHub)" <gi...@apache.org>.
AngersZhuuuu commented on code in PR #5629:
URL: https://github.com/apache/kyuubi/pull/5629#discussion_r1383113692


##########
extensions/spark/kyuubi-spark-authz/src/main/resources/table_command_spec.json:
##########
@@ -626,6 +626,39 @@
   "opType" : "QUERY",
   "queryDescs" : [ ],
   "uriDescs" : [ ]
+}, {
+  "classname" : "org.apache.spark.sql.execution.command.AddArchivesCommand",
+  "tableDescs" : [ ],
+  "opType" : "QUERY",
+  "queryDescs" : [ ],
+  "uriDescs" : [ {
+    "fieldName" : "paths",
+    "fieldExtractor" : "StringSeqURIExtractor",
+    "actionTypeDesc" : null,
+    "isInput" : true
+  } ]
+}, {
+  "classname" : "org.apache.spark.sql.execution.command.AddFilesCommand",
+  "tableDescs" : [ ],
+  "opType" : "QUERY",
+  "queryDescs" : [ ],
+  "uriDescs" : [ {
+    "fieldName" : "paths",
+    "fieldExtractor" : "StringSeqURIExtractor",
+    "actionTypeDesc" : null,
+    "isInput" : true
+  } ]
+}, {
+  "classname" : "org.apache.spark.sql.execution.command.AddJarsCommand",
+  "tableDescs" : [ ],
+  "opType" : "QUERY",

Review Comment:
   > Generally speaking, the side effect of adding a jar to spark is much weightier than reading it. I'm not sure whether we are doing the right things here.
   
   But for some udf jar, transform scrip, we also need privilege control..



-- 
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


Re: [PR] [KYUUBI #5628][AUTHZ] Support path privilege check for resource command [kyuubi]

Posted by "AngersZhuuuu (via GitHub)" <gi...@apache.org>.
AngersZhuuuu commented on code in PR #5629:
URL: https://github.com/apache/kyuubi/pull/5629#discussion_r1384302630


##########
extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/OperationType.scala:
##########
@@ -22,7 +22,7 @@ object OperationType extends Enumeration {
   type OperationType = Value
   // According to https://scalameta.org/scalafmt/docs/known-issues.html
   // format: off
-  val ALTERDATABASE, ALTERDATABASE_LOCATION, ALTERTABLE_ADDCOLS, ALTERTABLE_ADDPARTS,
+  val ADD, ALTERDATABASE, ALTERDATABASE_LOCATION, ALTERTABLE_ADDCOLS, ALTERTABLE_ADDPARTS,

Review Comment:
   Follow hive's code, we add a `ADD` operation type here.
   <img width="1222" alt="截屏2023-11-07 上午11 01 43" src="https://github.com/apache/kyuubi/assets/46485123/974c38e6-3c3e-4af7-a17c-fc2aa8ac33f4">
   



##########
extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/ranger/AccessType.scala:
##########
@@ -25,11 +25,13 @@ object AccessType extends Enumeration {
 
   type AccessType = Value
 
-  val NONE, CREATE, ALTER, DROP, SELECT, UPDATE, USE, READ, WRITE, ALL, ADMIN, INDEX = Value
+  val NONE, CREATE, ALTER, DROP, SELECT, UPDATE, USE, READ, WRITE, ALL, ADMIN, INDEX, TEMPUDFADMIN =
+    Value
 
   def apply(obj: PrivilegeObject, opType: OperationType, isInput: Boolean): AccessType = {
     obj.actionType match {
       case PrivilegeObjectActionType.OTHER => opType match {
+          case ADD => TEMPUDFADMIN

Review Comment:
   According ranger's mapping code, here is `TEMPUDFADMIN `
   <img width="711" alt="截屏2023-11-07 上午10 46 04" src="https://github.com/apache/kyuubi/assets/46485123/d151f18c-391e-45eb-98f1-2c854975c1ce">
   



##########
extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/gen/TableCommands.scala:
##########
@@ -617,7 +617,16 @@ object TableCommands extends CommandSpecs[TableCommandSpec] {
     TableCommandSpec(cmd, Seq(tableDesc), ALTERTABLE_PROPERTIES)
   }
 
+  val AddArchivesCommand = {
+    val cmd = "org.apache.spark.sql.execution.command.AddArchivesCommand"
+    val uriDesc = UriDesc("paths", classOf[StringSeqURIExtractor], isInput = true)
+    TableCommandSpec(cmd, Nil, ADD, uriDescs = Seq(uriDesc))
+  }
+
   override def specs: Seq[TableCommandSpec] = Seq(
+    AddArchivesCommand,
+    AddArchivesCommand.copy(classname = "org.apache.spark.sql.execution.command.AddFilesCommand"),
+    AddArchivesCommand.copy(classname = "org.apache.spark.sql.execution.command.AddJarsCommand"),

Review Comment:
   According to hive code, it only check `ADD`, `DELETE` resource, didn't check `LIST` resource command's privilege.



##########
extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/OperationType.scala:
##########
@@ -22,7 +22,7 @@ object OperationType extends Enumeration {
   type OperationType = Value
   // According to https://scalameta.org/scalafmt/docs/known-issues.html
   // format: off
-  val ALTERDATABASE, ALTERDATABASE_LOCATION, ALTERTABLE_ADDCOLS, ALTERTABLE_ADDPARTS,
+  val ADD, ALTERDATABASE, ALTERDATABASE_LOCATION, ALTERTABLE_ADDCOLS, ALTERTABLE_ADDPARTS,

Review Comment:
   Follow hive's code, we add a `ADD` operation type here.
   <img width="1222" alt="截屏2023-11-07 上午11 01 43" src="https://github.com/apache/kyuubi/assets/46485123/974c38e6-3c3e-4af7-a17c-fc2aa8ac33f4">
   



##########
extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/ranger/AccessType.scala:
##########
@@ -25,11 +25,13 @@ object AccessType extends Enumeration {
 
   type AccessType = Value
 
-  val NONE, CREATE, ALTER, DROP, SELECT, UPDATE, USE, READ, WRITE, ALL, ADMIN, INDEX = Value
+  val NONE, CREATE, ALTER, DROP, SELECT, UPDATE, USE, READ, WRITE, ALL, ADMIN, INDEX, TEMPUDFADMIN =
+    Value
 
   def apply(obj: PrivilegeObject, opType: OperationType, isInput: Boolean): AccessType = {
     obj.actionType match {
       case PrivilegeObjectActionType.OTHER => opType match {
+          case ADD => TEMPUDFADMIN

Review Comment:
   According ranger's mapping code, here is `TEMPUDFADMIN `
   <img width="711" alt="截屏2023-11-07 上午10 46 04" src="https://github.com/apache/kyuubi/assets/46485123/d151f18c-391e-45eb-98f1-2c854975c1ce">
   



-- 
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


Re: [PR] [KYUUBI #5628][AUTHZ] Support path privilege check for resource command [kyuubi]

Posted by "yaooqinn (via GitHub)" <gi...@apache.org>.
yaooqinn commented on code in PR #5629:
URL: https://github.com/apache/kyuubi/pull/5629#discussion_r1382963237


##########
extensions/spark/kyuubi-spark-authz/src/main/resources/table_command_spec.json:
##########
@@ -626,6 +626,39 @@
   "opType" : "QUERY",
   "queryDescs" : [ ],
   "uriDescs" : [ ]
+}, {
+  "classname" : "org.apache.spark.sql.execution.command.AddArchivesCommand",
+  "tableDescs" : [ ],
+  "opType" : "QUERY",
+  "queryDescs" : [ ],
+  "uriDescs" : [ {
+    "fieldName" : "paths",
+    "fieldExtractor" : "StringSeqURIExtractor",
+    "actionTypeDesc" : null,
+    "isInput" : true
+  } ]
+}, {
+  "classname" : "org.apache.spark.sql.execution.command.AddFilesCommand",
+  "tableDescs" : [ ],
+  "opType" : "QUERY",
+  "queryDescs" : [ ],
+  "uriDescs" : [ {
+    "fieldName" : "paths",
+    "fieldExtractor" : "StringSeqURIExtractor",
+    "actionTypeDesc" : null,
+    "isInput" : true
+  } ]
+}, {
+  "classname" : "org.apache.spark.sql.execution.command.AddJarsCommand",
+  "tableDescs" : [ ],
+  "opType" : "QUERY",

Review Comment:
   Generally speaking, the side effect of adding a jar to spark is much weightier than reading it. I'm not sure whether we are doing the right things here.
   
   



-- 
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


Re: [PR] [KYUUBI #5628][AUTHZ] Support path privilege check for resource command [kyuubi]

Posted by "AngersZhuuuu (via GitHub)" <gi...@apache.org>.
AngersZhuuuu commented on PR #5629:
URL: https://github.com/apache/kyuubi/pull/5629#issuecomment-1798289291

    ping @yaooqinn 


-- 
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


Re: [PR] [KYUUBI #5628][AUTHZ] Support path privilege check for resource command [kyuubi]

Posted by "AngersZhuuuu (via GitHub)" <gi...@apache.org>.
AngersZhuuuu commented on PR #5629:
URL: https://github.com/apache/kyuubi/pull/5629#issuecomment-1801188466

   ping @yaooqinn 


-- 
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


Re: [PR] [KYUUBI #5628][AUTHZ] Support path privilege check for resource command [kyuubi]

Posted by "AngersZhuuuu (via GitHub)" <gi...@apache.org>.
AngersZhuuuu commented on PR #5629:
URL: https://github.com/apache/kyuubi/pull/5629#issuecomment-1794223024

   ping @yaooqinn 


-- 
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


Re: [PR] [KYUUBI #5628][AUTHZ] Support path privilege check for resource command [kyuubi]

Posted by "yaooqinn (via GitHub)" <gi...@apache.org>.
yaooqinn commented on code in PR #5629:
URL: https://github.com/apache/kyuubi/pull/5629#discussion_r1382990284


##########
extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/ranger/RangerSparkExtensionSuite.scala:
##########
@@ -1133,4 +1133,21 @@ class HiveCatalogRangerSparkExtensionSuite extends RangerSparkExtensionSuite {
       }
     }
   }
+
+  test("Add/List Jars/Files/Archives command") {
+    withTempDir { path =>
+      withSingleCallEnabled {
+        Seq("JAR", "FILE", "ARCHIVE").foreach { cmd =>
+          doAs(admin, sql(s"ADD $cmd '$path'"))
+          interceptContains[AccessControlException](
+            doAs(someone, sql(s"ADD $cmd '$path'")))(
+            s"does not have [select] privilege on [[$path, $path/]]")
+          doAs(admin, sql(s"LIST $cmd '$path'"))
+          interceptContains[AccessControlException](
+            doAs(someone, sql(s"LIST $cmd '$path'")))(
+            s"does not have [select] privilege on [[$path, $path/]]")

Review Comment:
   These are all wrong. If you use `LIST FILE`, you will get `path` returned, but if you specify `path` to  `LIST FILE`, errored?



-- 
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


Re: [PR] [KYUUBI #5628][AUTHZ] Support path privilege check for resource command [kyuubi]

Posted by "AngersZhuuuu (via GitHub)" <gi...@apache.org>.
AngersZhuuuu commented on PR #5629:
URL: https://github.com/apache/kyuubi/pull/5629#issuecomment-1800937857

   Conflict resolved


-- 
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


Re: [PR] [KYUUBI #5628][AUTHZ] Support path privilege check for resource command [kyuubi]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #5629:
URL: https://github.com/apache/kyuubi/pull/5629#issuecomment-1801359586

   Thanks, merged to master


-- 
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


Re: [PR] [KYUUBI #5628][AUTHZ] Support path privilege check for resource command [kyuubi]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 closed pull request #5629: [KYUUBI #5628][AUTHZ] Support path privilege check for resource command
URL: https://github.com/apache/kyuubi/pull/5629


-- 
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


Re: [PR] [KYUUBI #5628][AUTHZ] Support path privilege check for resource command [kyuubi]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #5629:
URL: https://github.com/apache/kyuubi/pull/5629#issuecomment-1797399968

   ## [Codecov](https://app.codecov.io/gh/apache/kyuubi/pull/5629?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#5629](https://app.codecov.io/gh/apache/kyuubi/pull/5629?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (70f4330) into [master](https://app.codecov.io/gh/apache/kyuubi/commit/e45f4d950bb95841350e23ba1c576d57840e542b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (e45f4d9) will **increase** coverage by `0.01%`.
   > The diff coverage is `100.00%`.
   
   > :exclamation: Current head 70f4330 differs from pull request most recent head 980b551. Consider uploading reports for the commit 980b551 to get more accurate results
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #5629      +/-   ##
   ============================================
   + Coverage     61.40%   61.42%   +0.01%     
     Complexity       23       23              
   ============================================
     Files           603      603              
     Lines         35635    35637       +2     
     Branches       4874     4874              
   ============================================
   + Hits          21883    21890       +7     
   - Misses        11372    11375       +3     
   + Partials       2380     2372       -8     
   ```
   
   
   | [Files](https://app.codecov.io/gh/apache/kyuubi/pull/5629?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...yuubi/plugin/spark/authz/serde/uriExtractors.scala](https://app.codecov.io/gh/apache/kyuubi/pull/5629?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXh0ZW5zaW9ucy9zcGFyay9reXV1Ymktc3BhcmstYXV0aHovc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvcGx1Z2luL3NwYXJrL2F1dGh6L3NlcmRlL3VyaUV4dHJhY3RvcnMuc2NhbGE=) | `100.00% <100.00%> (ø)` | |
   
   ... and [6 files with indirect coverage changes](https://app.codecov.io/gh/apache/kyuubi/pull/5629/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   :mega: Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in [Chrome](https://chrome.google.com/webstore/detail/codecov/gedikamndpbemklijjkncpnolildpbgo) or [Firefox](https://addons.mozilla.org/en-US/firefox/addon/codecov/) today!
   


-- 
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


Re: [PR] [KYUUBI #5628][AUTHZ] Support path privilege check for resource command [kyuubi]

Posted by "AngersZhuuuu (via GitHub)" <gi...@apache.org>.
AngersZhuuuu commented on code in PR #5629:
URL: https://github.com/apache/kyuubi/pull/5629#discussion_r1383109002


##########
extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/ranger/RangerSparkExtensionSuite.scala:
##########
@@ -1133,4 +1133,21 @@ class HiveCatalogRangerSparkExtensionSuite extends RangerSparkExtensionSuite {
       }
     }
   }
+
+  test("Add/List Jars/Files/Archives command") {
+    withTempDir { path =>
+      withSingleCallEnabled {
+        Seq("JAR", "FILE", "ARCHIVE").foreach { cmd =>
+          doAs(admin, sql(s"ADD $cmd '$path'"))
+          interceptContains[AccessControlException](
+            doAs(someone, sql(s"ADD $cmd '$path'")))(
+            s"does not have [select] privilege on [[$path, $path/]]")
+          doAs(admin, sql(s"LIST $cmd '$path'"))
+          interceptContains[AccessControlException](
+            doAs(someone, sql(s"LIST $cmd '$path'")))(
+            s"does not have [select] privilege on [[$path, $path/]]")

Review Comment:
   > These are all wrong. If you use `LIST FILE`, you will get `path` returned, but if you specify `path` to `LIST FILE`, errored?
   
   Yea。。。forgot this...



##########
extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/ranger/RangerSparkExtensionSuite.scala:
##########
@@ -1133,4 +1133,21 @@ class HiveCatalogRangerSparkExtensionSuite extends RangerSparkExtensionSuite {
       }
     }
   }
+
+  test("Add/List Jars/Files/Archives command") {
+    withTempDir { path =>
+      withSingleCallEnabled {
+        Seq("JAR", "FILE", "ARCHIVE").foreach { cmd =>
+          doAs(admin, sql(s"ADD $cmd '$path'"))
+          interceptContains[AccessControlException](
+            doAs(someone, sql(s"ADD $cmd '$path'")))(
+            s"does not have [select] privilege on [[$path, $path/]]")
+          doAs(admin, sql(s"LIST $cmd '$path'"))
+          interceptContains[AccessControlException](
+            doAs(someone, sql(s"LIST $cmd '$path'")))(
+            s"does not have [select] privilege on [[$path, $path/]]")

Review Comment:
   > These are all wrong. If you use `LIST FILE`, you will get `path` returned, but if you specify `path` to `LIST FILE`, errored?
   
   Yea。。。forgot this...



-- 
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