----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/63025/#review188126 -----------------------------------------------------------
Ship it! Ship It! - Velmurugan Periasamy On Oct. 16, 2017, 11:25 a.m., Pradeep Agrawal wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/63025/ > ----------------------------------------------------------- > > (Updated Oct. 16, 2017, 11:25 a.m.) > > > Review request for ranger, Ankita Sinha, Don Bosco Durai, bhavik patel, > Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Ramesh Mani, > Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy. > > > Bugs: RANGER-1832 > https://issues.apache.org/jira/browse/RANGER-1832 > > > Repository: ranger > > > Description > ------- > > **Problem Statement:** Patch submitted in RR: > https://reviews.apache.org/r/62969/ does not cover the change to > distinguish the case of partial or full policy resource match which is the > actual requirement of RANGER-1832. > > **Proposed Solution:** > To address the same I am going to introduce another request param > "resourceMatch" which can have value "partial" or "full". > > > Diffs > ----- > > security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java > 90e5383 > > > Diff: https://reviews.apache.org/r/63025/diff/1/ > > > Testing > ------- > > **Steps Performed (with patch):** > 1. After mvn Build; untar the Ranger module and updated install.properties > for MySQL DB flavor. > 2. Called setup.sh to execute Ranger setup script. > 3. Started Ranger admin. > > **Steps for HDFS service:** > 1. Created a hdfs service 'source_hadoop'. > 2. Created a ranger hdfs policy(hdfs_policy1) with resource path /tmp/abcdefg > 3. Created a ranger hdfs policy(hdfs_policy2) with resource path: /tmp/abcd > 4. Created a ranger hdfs policy(hdfs_policy3) with resource path: > /tmp/abcd/file.txt > 5. Called below given REST API to export policies for resource path: /tmp/abcd > http://localhost:6080/service/plugins/policies/exportJson?serviceName=source_hadoop&polResource=/tmp/abcd&resource:path=/tmp/abcd&serviceType=hdfs&resourceMatchScope=self_or_ancestor&resourceMatch=full" > > **Expected Behavior:** > Above REST should return two policies(hdfs_policy2 and hdfs_policy3) which > are having resource /tmp/abcd and /tmp/abcd/file.txt respectively. > > **Actual Behavior:** > Returned JSON response was having only two policies(hdfs_policy2 and > hdfs_policy3). > > ---- > > **Steps for HIVE service:** > 1. Created a hive service 'source_hive'. > 2. Created a ranger hive policy(hive_policy1) with > resource:database=default123,table=,column= > 3. Created a ranger hive policy(hive_policy2) with > resource:database=default,table=,column= > 4. Created a ranger hive datamask policy(hive_policy3) with > resource:database=default,table=table1,column=column1 > 5. Created a ranger hive rowlevel filter policy(hive_policy4) with > resource:database=default,table=table2 > 6. Called below given REST API to export policies for > resource:database=default > http://localhost:6080/service/plugins/policies/exportJson?serviceName=source_hive&polResource=default&resource:database=default&serviceType=hive&resourceMatchScope=self_or_ancestor&resourceMatch=full" > > **Expected Behavior:** > Above REST should return three policies(hive_policy2, hive_policy3 and > hive_policy4). > > **Actual Behavior:** > Returned JSON response was having only three policies(hive_policy2, > hive_policy3 and hive_policy4). > > > Thanks, > > Pradeep Agrawal > >
