[ https://issues.apache.org/jira/browse/HIVE-10022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15390390#comment-15390390 ]
Hive QA commented on HIVE-10022: -------------------------------- Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12819683/HIVE-10022.7.patch {color:green}SUCCESS:{color} +1 due to 2 test(s) being added or modified. {color:red}ERROR:{color} -1 due to 14 failed/errored test(s), 10344 tests executed *Failed tests:* {noformat} TestMsgBusConnection - did not produce a TEST-*.xml file org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_acid_globallimit org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_list_bucket_dml_12 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_list_bucket_dml_13 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_stats_list_bucket org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_subquery_multiinsert org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_acid_globallimit org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_authorization_disallow_transform org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_authorization_uri_insert org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_authorization_uri_insert_local org.apache.hadoop.hive.llap.daemon.impl.TestLlapTokenChecker.testCheckPermissions org.apache.hadoop.hive.llap.daemon.impl.TestLlapTokenChecker.testGetToken org.apache.hadoop.hive.llap.tezplugins.TestLlapTaskSchedulerService.testDelayedLocalityNodeCommErrorImmediateAllocation org.apache.hadoop.hive.metastore.TestMetaStoreMetrics.testConnections {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-MASTER-Build/603/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-MASTER-Build/603/console Test logs: http://ec2-204-236-174-241.us-west-1.compute.amazonaws.com/logs/PreCommit-HIVE-MASTER-Build-603/ Messages: {noformat} Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 14 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12819683 - PreCommit-HIVE-MASTER-Build > Authorization checks for non existent file/directory should not be recursive > ---------------------------------------------------------------------------- > > Key: HIVE-10022 > URL: https://issues.apache.org/jira/browse/HIVE-10022 > Project: Hive > Issue Type: Bug > Components: Authorization > Affects Versions: 0.14.0 > Reporter: Pankit Thapar > Assignee: Sushanth Sowmyan > Attachments: HIVE-10022.2.patch, HIVE-10022.3.patch, > HIVE-10022.4.patch, HIVE-10022.5.patch, HIVE-10022.6.patch, > HIVE-10022.7.patch, HIVE-10022.patch > > > I am testing a query like : > set hive.test.authz.sstd.hs2.mode=true; > set > hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactoryForTest; > set > hive.security.authenticator.manager=org.apache.hadoop.hive.ql.security.SessionStateConfigUserAuthenticator; > set hive.security.authorization.enabled=true; > set user.name=user1; > create table auth_noupd(i int) clustered by (i) into 2 buckets stored as orc > location '${OUTPUT}' TBLPROPERTIES ('transactional'='true'); > Now, in the above query, since authorization is true, > we would end up calling doAuthorizationV2() which ultimately ends up calling > SQLAuthorizationUtils.getPrivilegesFromFS() which calls a recursive method : > FileUtils.isActionPermittedForFileHierarchy() with the object or the ancestor > of the object we are trying to authorize if the object does not exist. > The logic in FileUtils.isActionPermittedForFileHierarchy() is DFS. > Now assume, we have a path as a/b/c/d that we are trying to authorize. > In case, a/b/c/d does not exist, we would call > FileUtils.isActionPermittedForFileHierarchy() with say a/b/ assuming a/b/c > also does not exist. > If under the subtree at a/b, we have millions of files, then > FileUtils.isActionPermittedForFileHierarchy() is going to check file > permission on each of those objects. > I do not completely understand why do we have to check for file permissions > in all the objects in branch of the tree that we are not trying to read > from /write to. > We could have checked file permission on the ancestor that exists and if it > matches what we expect, the return true. > Please confirm if this is a bug so that I can submit a patch else let me know > what I am missing ? -- This message was sent by Atlassian JIRA (v6.3.4#6332)