You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Fatima Khan <fa...@gmail.com> on 2017/09/14 04:33:45 UTC

Re: Review Request 61553: RANGER-1730 : Utility script that will list the users with a given role

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

(Updated Sept. 14, 2017, 4:33 a.m.)


Review request for ranger, Ankita Sinha, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.


Bugs: RANGER-1730
    https://issues.apache.org/jira/browse/RANGER-1730


Repository: ranger


Description
-------

Actual :
Provide utility to list user according to role.

Expected :
Utility to list users for the given role based on thier authorization


Diffs (updated)
-----

  security-admin/scripts/rolebasedusersearchutil.py PRE-CREATION 
  security-admin/src/main/java/org/apache/ranger/patch/cliutil/RoleBasedUserSearchUtil.java PRE-CREATION 
  security-admin/src/test/java/org/apache/ranger/patch/cliutil/TestRoleBasedUserSearchUtil.java PRE-CREATION 
  src/main/assembly/admin-web.xml cb1aad2 


Diff: https://reviews.apache.org/r/61553/diff/3/

Changes: https://reviews.apache.org/r/61553/diff/2-3/


Testing
-------

Tested on Simple against all roles
Tested on Secure against all roles


Thanks,

Fatima Khan


Re: Review Request 61553: RANGER-1730 : Utility script that will list the users with a given role

Posted by Velmurugan Periasamy <vp...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61553/#review185568
-----------------------------------------------------------


Ship it!




Ship It!

- Velmurugan Periasamy


On Sept. 15, 2017, 10:17 a.m., Fatima Khan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61553/
> -----------------------------------------------------------
> 
> (Updated Sept. 15, 2017, 10:17 a.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1730
>     https://issues.apache.org/jira/browse/RANGER-1730
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Actual :
> Provide utility to list user according to role.
> 
> Expected :
> Utility to list users for the given role based on thier authorization
> 
> 
> Diffs
> -----
> 
>   security-admin/scripts/rolebasedusersearchutil.py PRE-CREATION 
>   security-admin/src/main/java/org/apache/ranger/patch/cliutil/RoleBasedUserSearchUtil.java PRE-CREATION 
>   security-admin/src/test/java/org/apache/ranger/patch/cliutil/TestRoleBasedUserSearchUtil.java PRE-CREATION 
>   src/main/assembly/admin-web.xml cb1aad2 
> 
> 
> Diff: https://reviews.apache.org/r/61553/diff/4/
> 
> 
> Testing
> -------
> 
> Tested on Simple against all roles
> Tested on Secure against all roles
> 
> 
> Thanks,
> 
> Fatima Khan
> 
>


Re: Review Request 61553: RANGER-1730 : Utility script that will list the users with a given role

Posted by Ramesh Mani <rm...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61553/#review185650
-----------------------------------------------------------


Ship it!




Ship It!

- Ramesh Mani


On Sept. 15, 2017, 10:17 a.m., Fatima Khan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61553/
> -----------------------------------------------------------
> 
> (Updated Sept. 15, 2017, 10:17 a.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1730
>     https://issues.apache.org/jira/browse/RANGER-1730
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Actual :
> Provide utility to list user according to role.
> 
> Expected :
> Utility to list users for the given role based on thier authorization
> 
> 
> Diffs
> -----
> 
>   security-admin/scripts/rolebasedusersearchutil.py PRE-CREATION 
>   security-admin/src/main/java/org/apache/ranger/patch/cliutil/RoleBasedUserSearchUtil.java PRE-CREATION 
>   security-admin/src/test/java/org/apache/ranger/patch/cliutil/TestRoleBasedUserSearchUtil.java PRE-CREATION 
>   src/main/assembly/admin-web.xml cb1aad2 
> 
> 
> Diff: https://reviews.apache.org/r/61553/diff/4/
> 
> 
> Testing
> -------
> 
> Tested on Simple against all roles
> Tested on Secure against all roles
> 
> 
> Thanks,
> 
> Fatima Khan
> 
>


Re: Review Request 61553: RANGER-1730 : Utility script that will list the users with a given role

Posted by Fatima Khan <fa...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61553/
-----------------------------------------------------------

(Updated Sept. 15, 2017, 10:17 a.m.)


Review request for ranger, Ankita Sinha, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.


Bugs: RANGER-1730
    https://issues.apache.org/jira/browse/RANGER-1730


Repository: ranger


Description
-------

Actual :
Provide utility to list user according to role.

Expected :
Utility to list users for the given role based on thier authorization


Diffs (updated)
-----

  security-admin/scripts/rolebasedusersearchutil.py PRE-CREATION 
  security-admin/src/main/java/org/apache/ranger/patch/cliutil/RoleBasedUserSearchUtil.java PRE-CREATION 
  security-admin/src/test/java/org/apache/ranger/patch/cliutil/TestRoleBasedUserSearchUtil.java PRE-CREATION 
  src/main/assembly/admin-web.xml cb1aad2 


Diff: https://reviews.apache.org/r/61553/diff/4/

Changes: https://reviews.apache.org/r/61553/diff/3-4/


Testing
-------

Tested on Simple against all roles
Tested on Secure against all roles


Thanks,

Fatima Khan


Re: Review Request 61553: RANGER-1730 : Utility script that will list the users with a given role

Posted by Fatima Khan <fa...@gmail.com>.

> On Sept. 14, 2017, 6:12 a.m., Ramesh Mani wrote:
> > security-admin/src/main/java/org/apache/ranger/patch/cliutil/RoleBasedUserSearchUtil.java
> > Lines 217 (patched)
> > <https://reviews.apache.org/r/61553/diff/3/?file=1820100#file1820100line217>
> >
> >     if UserRole is going to be not null 
> >     do UserRole.equalsIgnoreCase(existingRole.get(0)). Verify similar check and correct it where ever needed.

userRole is a utility parameter and it can be null. In the main method, i have checked it against not null and the flow is different for null and not null. UserRole.equalsIgnoreCase(existingRole.get(0)) will execute only when userRole is not null.


- Fatima


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


On Sept. 14, 2017, 4:33 a.m., Fatima Khan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61553/
> -----------------------------------------------------------
> 
> (Updated Sept. 14, 2017, 4:33 a.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1730
>     https://issues.apache.org/jira/browse/RANGER-1730
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Actual :
> Provide utility to list user according to role.
> 
> Expected :
> Utility to list users for the given role based on thier authorization
> 
> 
> Diffs
> -----
> 
>   security-admin/scripts/rolebasedusersearchutil.py PRE-CREATION 
>   security-admin/src/main/java/org/apache/ranger/patch/cliutil/RoleBasedUserSearchUtil.java PRE-CREATION 
>   security-admin/src/test/java/org/apache/ranger/patch/cliutil/TestRoleBasedUserSearchUtil.java PRE-CREATION 
>   src/main/assembly/admin-web.xml cb1aad2 
> 
> 
> Diff: https://reviews.apache.org/r/61553/diff/3/
> 
> 
> Testing
> -------
> 
> Tested on Simple against all roles
> Tested on Secure against all roles
> 
> 
> Thanks,
> 
> Fatima Khan
> 
>


Re: Review Request 61553: RANGER-1730 : Utility script that will list the users with a given role

Posted by Ramesh Mani <rm...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61553/#review185372
-----------------------------------------------------------




security-admin/src/main/java/org/apache/ranger/patch/cliutil/RoleBasedUserSearchUtil.java
Lines 63 (patched)
<https://reviews.apache.org/r/61553/#comment261695>

    name variables as userRole. Follow this pattern



security-admin/src/main/java/org/apache/ranger/patch/cliutil/RoleBasedUserSearchUtil.java
Lines 133 (patched)
<https://reviews.apache.org/r/61553/#comment261684>

    Please Indent the methods to start at same position, check all the methods



security-admin/src/main/java/org/apache/ranger/patch/cliutil/RoleBasedUserSearchUtil.java
Lines 141 (patched)
<https://reviews.apache.org/r/61553/#comment261686>

    Please use Apache CollectionUtils.isEmpty() if possible. Check all the other occurances of other similar checks



security-admin/src/main/java/org/apache/ranger/patch/cliutil/RoleBasedUserSearchUtil.java
Lines 206 (patched)
<https://reviews.apache.org/r/61553/#comment261690>

    Please check if currentEncryptedPassword can be null?



security-admin/src/main/java/org/apache/ranger/patch/cliutil/RoleBasedUserSearchUtil.java
Lines 209 (patched)
<https://reviews.apache.org/r/61553/#comment261691>

    can existingRole be null? Please verify



security-admin/src/main/java/org/apache/ranger/patch/cliutil/RoleBasedUserSearchUtil.java
Lines 217 (patched)
<https://reviews.apache.org/r/61553/#comment261692>

    if UserRole is going to be not null 
    do UserRole.equalsIgnoreCase(existingRole.get(0)). Verify similar check and correct it where ever needed.



security-admin/src/main/java/org/apache/ranger/patch/cliutil/RoleBasedUserSearchUtil.java
Lines 242 (patched)
<https://reviews.apache.org/r/61553/#comment261682>

    Change this flag variable to "isUserAuthorized"



security-admin/src/main/java/org/apache/ranger/patch/cliutil/RoleBasedUserSearchUtil.java
Lines 247 (patched)
<https://reviews.apache.org/r/61553/#comment261683>

    Authorized?


- Ramesh Mani


On Sept. 14, 2017, 4:33 a.m., Fatima Khan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61553/
> -----------------------------------------------------------
> 
> (Updated Sept. 14, 2017, 4:33 a.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1730
>     https://issues.apache.org/jira/browse/RANGER-1730
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Actual :
> Provide utility to list user according to role.
> 
> Expected :
> Utility to list users for the given role based on thier authorization
> 
> 
> Diffs
> -----
> 
>   security-admin/scripts/rolebasedusersearchutil.py PRE-CREATION 
>   security-admin/src/main/java/org/apache/ranger/patch/cliutil/RoleBasedUserSearchUtil.java PRE-CREATION 
>   security-admin/src/test/java/org/apache/ranger/patch/cliutil/TestRoleBasedUserSearchUtil.java PRE-CREATION 
>   src/main/assembly/admin-web.xml cb1aad2 
> 
> 
> Diff: https://reviews.apache.org/r/61553/diff/3/
> 
> 
> Testing
> -------
> 
> Tested on Simple against all roles
> Tested on Secure against all roles
> 
> 
> Thanks,
> 
> Fatima Khan
> 
>