----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/72957/#review222035 -----------------------------------------------------------
security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java Line 1747 (original), 1747 (patched) <https://reviews.apache.org/r/72957/#comment311102> I suggest to consider the following: - check if 'policiesWithMatchingSignature' has a policy having same name as 'policy' - if one exists, pick that policy for update - if not, create a new policy - Madhan Neethiraj On Oct. 13, 2020, 4:01 p.m., Dineshkumar Yadav wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/72957/ > ----------------------------------------------------------- > > (Updated Oct. 13, 2020, 4:01 p.m.) > > > Review request for ranger, Ankita Sinha, Gautam Borad, Kishor Gollapalliwar, > Abhay Kulkarni, Mehul Parikh, Pradeep Agrawal, and Velmurugan Periasamy. > > > Repository: ranger > > > Description > ------- > > If updateifexist/mergeIfExist parameter passed while importing the ranger > policies then additional policies are created for disabled policy with same > resource. > > Solution: 1. New disabled policy will be created only if no > resource-signature matching policy found in ranger. > 2. If policy with same resource-signature found in Ranger then > policy get merged or updated according to parameter passed during import. > 3. If multiple disabled policy with same resource-signature found > the any random policy will be selected for update/merge. > > > Diffs > ----- > > security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java > 4ef9abeb8 > > > Diff: https://reviews.apache.org/r/72957/diff/1/ > > > Testing > ------- > > Tested for below scenario > 1. With no disable policy > 2. With single disable policy > 3. With multiple disable policy > > > Thanks, > > Dineshkumar Yadav > >
