> On April 24, 2019, 4:59 p.m., Abhay Kulkarni wrote:
> > security-admin/src/main/java/org/apache/ranger/rest/SecurityZoneREST.java
> > Lines 345 (patched)
> > <https://reviews.apache.org/r/70525/diff/1/?file=2140742#file2140742line345>
> >
> >     Please review RangerSecurityZone.getTagServices() and 
> > RangerSecurityZone.setTagServices(). It seems that setTagServices() if 
> > called with null parameter, does not set tagServices to an empty hashmap. 
> > So, dbTagServices and/or uiTagServices may have a null value, and NPE will 
> > result at line 349. Please review.
> 
> bhavik patel wrote:
>     getTagServices() is type of List<String>. In case of blank or null it 
> will return empty List array.

I am not sure that's how RangerSecurityZone.setTagServices() works. There is a 
difference between implementation of RangerSecurityZone.setServices() and that 
of RangerSecurityZone.setTagServices(). If there is no tag-service in the zone, 
I believe getTagService() call will return null. Can you please double-check on 
it. Ideal fix will be to make RangerSecurityZone.setTagServices() 
implementation similar to that for RangerSecurityZone.setServices(). It should 
be easy to check this scenario  (have a zone with no tag-service). Please 
review.


- Abhay


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


On April 25, 2019, 12:55 p.m., bhavik patel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70525/
> -----------------------------------------------------------
> 
> (Updated April 25, 2019, 12:55 p.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Don Bosco Durai, Gautam Borad, Abhay 
> Kulkarni, Madhan Neethiraj, Oliver Szabo, Pradeep Agrawal, Ramesh Mani, 
> Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-2408
>     https://issues.apache.org/jira/browse/RANGER-2408
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Restriction on CRUD operation of Zone, Policy and service.
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/rest/SecurityZoneREST.java 
> 6ce5365 
>   security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java 
> 6ddb359 
>   security-admin/src/test/java/org/apache/ranger/rest/TestServiceREST.java 
> 8f39607 
> 
> 
> Diff: https://reviews.apache.org/r/70525/diff/2/
> 
> 
> Testing
> -------
> 
> Verfied CRUD operation of Zone, Policy and service for role such as admin, 
> auditor, user, service admin, delegate admin, zone admin and zone auditor.
> 
> 
> Thanks,
> 
> bhavik patel
> 
>

Reply via email to