You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Dineshkumar Yadav <di...@outlook.com> on 2020/07/17 13:36:28 UTC

Re: Review Request 72687: RANGER-2913 Import policy fails when policy with same name present in multiple service

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72687/
-----------------------------------------------------------

(Updated July 17, 2020, 1:36 p.m.)


Review request for ranger, Ankita Sinha, Gautam Borad, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Pradeep Agrawal, and Velmurugan Periasamy.


Repository: ranger


Description
-------

Import policy failing when more than one policies present with same name.


Diffs
-----

  security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java c795525f2 


Diff: https://reviews.apache.org/r/72687/diff/1/


Testing
-------

Tested with my patch 
Import policy now getting success even after more than one policies present with same name.


Thanks,

Dineshkumar Yadav


Re: Review Request 72687: RANGER-2913 Import policy fails when policy with same name present in multiple service

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72687/#review221275
-----------------------------------------------------------


Ship it!




Ship It!

- Madhan Neethiraj


On July 21, 2020, 4:45 a.m., Dineshkumar Yadav wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72687/
> -----------------------------------------------------------
> 
> (Updated July 21, 2020, 4:45 a.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Gautam Borad, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Pradeep Agrawal, and Velmurugan Periasamy.
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Import policy failing when more than one policies present with same name.
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/db/XXPolicyDao.java abd8aa6a3 
>   security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java c795525f2 
>   security-admin/src/main/resources/META-INF/jpa_named_queries.xml 22e71e549 
> 
> 
> Diff: https://reviews.apache.org/r/72687/diff/2/
> 
> 
> Testing
> -------
> 
> Tested with my patch 
> Import policy now getting success even after more than one policies present with same name.
> 
> 
> Thanks,
> 
> Dineshkumar Yadav
> 
>


Re: Review Request 72687: RANGER-2913 Import policy fails when policy with same name present in multiple service

Posted by Pradeep Agrawal <pr...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72687/#review221278
-----------------------------------------------------------


Ship it!




Ship It!

- Pradeep Agrawal


On July 21, 2020, 4:45 a.m., Dineshkumar Yadav wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72687/
> -----------------------------------------------------------
> 
> (Updated July 21, 2020, 4:45 a.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Gautam Borad, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Pradeep Agrawal, and Velmurugan Periasamy.
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Import policy failing when more than one policies present with same name.
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/db/XXPolicyDao.java abd8aa6a3 
>   security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java c795525f2 
>   security-admin/src/main/resources/META-INF/jpa_named_queries.xml 22e71e549 
> 
> 
> Diff: https://reviews.apache.org/r/72687/diff/2/
> 
> 
> Testing
> -------
> 
> Tested with my patch 
> Import policy now getting success even after more than one policies present with same name.
> 
> 
> Thanks,
> 
> Dineshkumar Yadav
> 
>


Re: Review Request 72687: RANGER-2913 Import policy fails when policy with same name present in multiple service

Posted by Dineshkumar Yadav <di...@outlook.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72687/
-----------------------------------------------------------

(Updated July 21, 2020, 4:45 a.m.)


Review request for ranger, Ankita Sinha, Gautam Borad, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Pradeep Agrawal, and Velmurugan Periasamy.


Repository: ranger


Description
-------

Import policy failing when more than one policies present with same name.


Diffs (updated)
-----

  security-admin/src/main/java/org/apache/ranger/db/XXPolicyDao.java abd8aa6a3 
  security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java c795525f2 
  security-admin/src/main/resources/META-INF/jpa_named_queries.xml 22e71e549 


Diff: https://reviews.apache.org/r/72687/diff/2/

Changes: https://reviews.apache.org/r/72687/diff/1-2/


Testing
-------

Tested with my patch 
Import policy now getting success even after more than one policies present with same name.


Thanks,

Dineshkumar Yadav


Re: Review Request 72687: RANGER-2913 Import policy fails when policy with same name present in multiple service

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72687/#review221268
-----------------------------------------------------------




security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java
Lines 4295 (patched)
<https://reviews.apache.org/r/72687/#comment310143>

    Instead retrieving List<RangerPolicy> for the given service-name, policy-name and zone-name, (by calling getPolicies(SearchFilter)), consider retrieving a XXPolicy object - it will be quicker. If necessary, add following method in XXPolicyDao:
      XXPolicy findPolicy(String serviceName, String policyName, String zoneName);
    
    Also, XXPolicyDao.findByPolicyName(String policyName) doesn't look a valid method, as it implies a single policy for a given name. Consider removing this method.


- Madhan Neethiraj


On July 17, 2020, 1:36 p.m., Dineshkumar Yadav wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72687/
> -----------------------------------------------------------
> 
> (Updated July 17, 2020, 1:36 p.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Gautam Borad, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, Pradeep Agrawal, and Velmurugan Periasamy.
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Import policy failing when more than one policies present with same name.
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java c795525f2 
> 
> 
> Diff: https://reviews.apache.org/r/72687/diff/1/
> 
> 
> Testing
> -------
> 
> Tested with my patch 
> Import policy now getting success even after more than one policies present with same name.
> 
> 
> Thanks,
> 
> Dineshkumar Yadav
> 
>