You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Nitin Galave <ni...@gmail.com> on 2017/09/30 11:26:36 UTC

Review Request 62714: RANGER-1819: Not able to delete group that is having special character(ampersand) from ranger admin.

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

Review request for ranger, Gautam Borad, Mehul Parikh, Pradeep Agrawal, and Velmurugan Periasamy.


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


Repository: ranger


Description
-------

Trying to delete some of the group with special character from the ranger admin, but not able to delete.
This issue happens only if there is `&` in the groupname like groupspecial#$@&

Same issue present in case of users.


Solution : Replace currently API (i.e delete by name) call with delete by user id API.So we don't have to do extra handling for special charactes and it also includes best practices for REST API.


Diffs
-----

  security-admin/src/main/java/org/apache/ranger/rest/XUserREST.java 5a58346 
  security-admin/src/main/webapp/scripts/model_bases/VXGroupBase.js b86120b 
  security-admin/src/main/webapp/scripts/model_bases/VXUserBase.js c4a0d6c 
  security-admin/src/main/webapp/scripts/views/users/UserTableLayout.js 65a1d18 


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


Testing
-------

Testing :

1. Verified CRUD for users and groups.
2. Verified delete for users and groups with/without special characters including `#`.


Thanks,

Nitin Galave


Re: Review Request 62714: RANGER-1819: Not able to delete group that is having special character(ampersand) from ranger admin.

Posted by Mehul Parikh <me...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62714/#review186782
-----------------------------------------------------------


Ship it!




Ship It!

- Mehul Parikh


On Sept. 30, 2017, 11:26 a.m., Nitin Galave wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62714/
> -----------------------------------------------------------
> 
> (Updated Sept. 30, 2017, 11:26 a.m.)
> 
> 
> Review request for ranger, Gautam Borad, Mehul Parikh, Pradeep Agrawal, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1819
>     https://issues.apache.org/jira/browse/RANGER-1819
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Trying to delete some of the group with special character from the ranger admin, but not able to delete.
> This issue happens only if there is `&` in the groupname like groupspecial#$@&
> 
> Same issue present in case of users.
> 
> 
> Solution : Replace currently API (i.e delete by name) call with delete by user id API.So we don't have to do extra handling for special charactes and it also includes best practices for REST API.
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/rest/XUserREST.java 5a58346 
>   security-admin/src/main/webapp/scripts/model_bases/VXGroupBase.js b86120b 
>   security-admin/src/main/webapp/scripts/model_bases/VXUserBase.js c4a0d6c 
>   security-admin/src/main/webapp/scripts/views/users/UserTableLayout.js 65a1d18 
> 
> 
> Diff: https://reviews.apache.org/r/62714/diff/1/
> 
> 
> Testing
> -------
> 
> Testing :
> 
> 1. Verified CRUD for users and groups.
> 2. Verified delete for users and groups with/without special characters including `#`.
> 
> 
> Thanks,
> 
> Nitin Galave
> 
>


Re: Review Request 62714: RANGER-1819: Not able to delete group that is having special character(ampersand) from ranger admin.

Posted by Nitin Galave <ni...@gmail.com>.

> On Oct. 2, 2017, 3:27 p.m., Velmurugan Periasamy wrote:
> > security-admin/src/main/java/org/apache/ranger/rest/XUserREST.java
> > Line 1094 (original), 1094 (patched)
> > <https://reviews.apache.org/r/62714/diff/1/?file=1841325#file1841325line1094>
> >
> >     Would it not be better to add additional method using ID instead of replacing method using name? This way, clients using name based methods don't have to change.

Yes, adding additional API make sense.


- Nitin


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


On Sept. 30, 2017, 11:26 a.m., Nitin Galave wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62714/
> -----------------------------------------------------------
> 
> (Updated Sept. 30, 2017, 11:26 a.m.)
> 
> 
> Review request for ranger, Gautam Borad, Mehul Parikh, Pradeep Agrawal, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1819
>     https://issues.apache.org/jira/browse/RANGER-1819
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Trying to delete some of the group with special character from the ranger admin, but not able to delete.
> This issue happens only if there is `&` in the groupname like groupspecial#$@&
> 
> Same issue present in case of users.
> 
> 
> Solution : Replace currently API (i.e delete by name) call with delete by user id API.So we don't have to do extra handling for special charactes and it also includes best practices for REST API.
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/rest/XUserREST.java 5a58346 
>   security-admin/src/main/webapp/scripts/model_bases/VXGroupBase.js b86120b 
>   security-admin/src/main/webapp/scripts/model_bases/VXUserBase.js c4a0d6c 
>   security-admin/src/main/webapp/scripts/views/users/UserTableLayout.js 65a1d18 
> 
> 
> Diff: https://reviews.apache.org/r/62714/diff/1/
> 
> 
> Testing
> -------
> 
> Testing :
> 
> 1. Verified CRUD for users and groups.
> 2. Verified delete for users and groups with/without special characters including `#`.
> 
> 
> Thanks,
> 
> Nitin Galave
> 
>


Re: Review Request 62714: RANGER-1819: Not able to delete group that is having special character(ampersand) from ranger admin.

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


Fix it, then Ship it!





security-admin/src/main/java/org/apache/ranger/rest/XUserREST.java
Line 1094 (original), 1094 (patched)
<https://reviews.apache.org/r/62714/#comment263691>

    Would it not be better to add additional method using ID instead of replacing method using name? This way, clients using name based methods don't have to change.



security-admin/src/main/java/org/apache/ranger/rest/XUserREST.java
Line 1111 (original), 1110 (patched)
<https://reviews.apache.org/r/62714/#comment263692>

    Would it not be better to add additional method using ID instead of replacing method using name? This way, clients using name based methods don't have to change.


- Velmurugan Periasamy


On Sept. 30, 2017, 11:26 a.m., Nitin Galave wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62714/
> -----------------------------------------------------------
> 
> (Updated Sept. 30, 2017, 11:26 a.m.)
> 
> 
> Review request for ranger, Gautam Borad, Mehul Parikh, Pradeep Agrawal, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1819
>     https://issues.apache.org/jira/browse/RANGER-1819
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Trying to delete some of the group with special character from the ranger admin, but not able to delete.
> This issue happens only if there is `&` in the groupname like groupspecial#$@&
> 
> Same issue present in case of users.
> 
> 
> Solution : Replace currently API (i.e delete by name) call with delete by user id API.So we don't have to do extra handling for special charactes and it also includes best practices for REST API.
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/rest/XUserREST.java 5a58346 
>   security-admin/src/main/webapp/scripts/model_bases/VXGroupBase.js b86120b 
>   security-admin/src/main/webapp/scripts/model_bases/VXUserBase.js c4a0d6c 
>   security-admin/src/main/webapp/scripts/views/users/UserTableLayout.js 65a1d18 
> 
> 
> Diff: https://reviews.apache.org/r/62714/diff/1/
> 
> 
> Testing
> -------
> 
> Testing :
> 
> 1. Verified CRUD for users and groups.
> 2. Verified delete for users and groups with/without special characters including `#`.
> 
> 
> Thanks,
> 
> Nitin Galave
> 
>


Re: Review Request 62714: RANGER-1819: Not able to delete group that is having special character(ampersand) from ranger admin.

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62714/#review186858
-----------------------------------------------------------




security-admin/src/main/java/org/apache/ranger/rest/XUserREST.java
Line 1094 (original), 1094 (patched)
<https://reviews.apache.org/r/62714/#comment263699>

    Does this have to remain backward compatible?
    +1 for adding new APIs instead.


- Alejandro Fernandez


On Sept. 30, 2017, 11:26 a.m., Nitin Galave wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62714/
> -----------------------------------------------------------
> 
> (Updated Sept. 30, 2017, 11:26 a.m.)
> 
> 
> Review request for ranger, Gautam Borad, Mehul Parikh, Pradeep Agrawal, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1819
>     https://issues.apache.org/jira/browse/RANGER-1819
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Trying to delete some of the group with special character from the ranger admin, but not able to delete.
> This issue happens only if there is `&` in the groupname like groupspecial#$@&
> 
> Same issue present in case of users.
> 
> 
> Solution : Replace currently API (i.e delete by name) call with delete by user id API.So we don't have to do extra handling for special charactes and it also includes best practices for REST API.
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/rest/XUserREST.java 5a58346 
>   security-admin/src/main/webapp/scripts/model_bases/VXGroupBase.js b86120b 
>   security-admin/src/main/webapp/scripts/model_bases/VXUserBase.js c4a0d6c 
>   security-admin/src/main/webapp/scripts/views/users/UserTableLayout.js 65a1d18 
> 
> 
> Diff: https://reviews.apache.org/r/62714/diff/1/
> 
> 
> Testing
> -------
> 
> Testing :
> 
> 1. Verified CRUD for users and groups.
> 2. Verified delete for users and groups with/without special characters including `#`.
> 
> 
> Thanks,
> 
> Nitin Galave
> 
>


Re: Review Request 62714: RANGER-1819: Not able to delete group that is having special character(ampersand) from ranger admin.

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62714/#review187111
-----------------------------------------------------------


Fix it, then Ship it!





security-admin/src/main/java/org/apache/ranger/rest/XUserREST.java
Line 373 (original), 373 (patched)
<https://reviews.apache.org/r/62714/#comment264040>

    Should use StringUtils.isNotBlank(userName)


- Alejandro Fernandez


On Oct. 4, 2017, 10:38 a.m., Nitin Galave wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62714/
> -----------------------------------------------------------
> 
> (Updated Oct. 4, 2017, 10:38 a.m.)
> 
> 
> Review request for ranger, Gautam Borad, Mehul Parikh, Pradeep Agrawal, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1819
>     https://issues.apache.org/jira/browse/RANGER-1819
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Trying to delete some of the group with special character from the ranger admin, but not able to delete.
> This issue happens only if there is `&` in the groupname like groupspecial#$@&
> 
> Same issue present in case of users.
> 
> 
> Solution : Replace currently API (i.e delete by name) call with delete by user id API.So we don't have to do extra handling for special charactes and it also includes best practices for REST API.
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/rest/XUserREST.java 5a58346 
>   security-admin/src/main/webapp/scripts/model_bases/VXGroupBase.js b86120b 
>   security-admin/src/main/webapp/scripts/model_bases/VXUserBase.js c4a0d6c 
>   security-admin/src/main/webapp/scripts/views/users/UserTableLayout.js 65a1d18 
>   unixauthservice/src/main/java/org/apache/ranger/authentication/PasswordValidator.java d3e25fe 
> 
> 
> Diff: https://reviews.apache.org/r/62714/diff/2/
> 
> 
> Testing
> -------
> 
> Testing :
> 
> 1. Verified CRUD for users and groups.
> 2. Verified delete for users and groups with/without special characters including `#`.
> 
> 
> Thanks,
> 
> Nitin Galave
> 
>


Re: Review Request 62714: RANGER-1819: Not able to delete group that is having special character(ampersand) from ranger admin.

Posted by Nitin Galave <ni...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62714/
-----------------------------------------------------------

(Updated Oct. 4, 2017, 10:38 a.m.)


Review request for ranger, Gautam Borad, Mehul Parikh, Pradeep Agrawal, and Velmurugan Periasamy.


Changes
-------

Added new API i.e delete user by ID and done some clean up.


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


Repository: ranger


Description
-------

Trying to delete some of the group with special character from the ranger admin, but not able to delete.
This issue happens only if there is `&` in the groupname like groupspecial#$@&

Same issue present in case of users.


Solution : Replace currently API (i.e delete by name) call with delete by user id API.So we don't have to do extra handling for special charactes and it also includes best practices for REST API.


Diffs (updated)
-----

  security-admin/src/main/java/org/apache/ranger/rest/XUserREST.java 5a58346 
  security-admin/src/main/webapp/scripts/model_bases/VXGroupBase.js b86120b 
  security-admin/src/main/webapp/scripts/model_bases/VXUserBase.js c4a0d6c 
  security-admin/src/main/webapp/scripts/views/users/UserTableLayout.js 65a1d18 
  unixauthservice/src/main/java/org/apache/ranger/authentication/PasswordValidator.java d3e25fe 


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

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


Testing
-------

Testing :

1. Verified CRUD for users and groups.
2. Verified delete for users and groups with/without special characters including `#`.


Thanks,

Nitin Galave