----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/68290/#review207069 -----------------------------------------------------------
I don't think, this is a good solution - Hive specific changes shoudn't be added to the generic plugin code. There is already a HiveAccessType.USE, and a RangerHiveAccessRequest is created if hiveOpType == HiveOperationType.SHOWDATABASES. I would rather see this accessType added to the UI, so users can create policies with database=* and accessType=USE. Adding unit test would be nice too. - Zsombor Gegesy On Aug. 10, 2018, 11:14 a.m., dhomme wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/68290/ > ----------------------------------------------------------- > > (Updated Aug. 10, 2018, 11:14 a.m.) > > > Review request for ranger. > > > Bugs: RANGER-2185 > https://issues.apache.org/jira/browse/RANGER-2185 > > > Repository: ranger > > > Description > ------- > > When a user execute 'show databases;' via hive, ranger hive plugin should > check if the user has any databases to access but not all(*). > > > Diffs > ----- > > > agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerAccessResource.java > 2ee616a1b > > agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerAccessResourceImpl.java > 580048627 > > agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerAccessResourceReadOnly.java > 18bb1f44f > > agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyRepository.java > 23d1efa15 > > agents-common/src/main/java/org/apache/ranger/plugin/policyresourcematcher/RangerDefaultPolicyResourceMatcher.java > 415263eef > > hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java > 3ed79df83 > > > Diff: https://reviews.apache.org/r/68290/diff/3/ > > > Testing > ------- > > Tesetd with local env. > > > Thanks, > > dhomme > >