You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Pradeep Agrawal <pr...@gmail.com> on 2020/02/10 17:28:36 UTC
Review Request 72106: RANGER-2718: Utility to update user and group
names in stored policy json
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72106/
-----------------------------------------------------------
Review request for ranger.
Bugs: RANGER-2718
https://issues.apache.org/jira/browse/RANGER-2718
Repository: ranger
Description
-------
**Problem Statement:** When The case conversion property to syncs users/groups is changed then in the ranger admin user/group names get updated but the user/group is not updated in policy json.
**Proposed solution:** A standalone utility can be added to update the users and groups name in the policy json as they(existing user/groups) appear in ranger db.
**Note:**
There could be few other issues while syncing users with diffrent case but the below ones are not covered in this patch.
1) user name case was changed in x_user table but not in the x_portal_user table.
2) user name case may not change if user is added in the security zone.
5) Behaviour might be different in different DB flavours.
6) user/group name in service config may not change
Diffs
-----
security-admin/scripts/updateUserAndGroupNamesInJson.py PRE-CREATION
security-admin/src/main/java/org/apache/ranger/patch/cliutil/UpdateUserAndGroupNamesInJson.java PRE-CREATION
Diff: https://reviews.apache.org/r/72106/diff/1/
Testing
-------
applied the patch in the master branch and built it.
untar the generated ranger-<version>-admin.tar.gz file.
updated install.properties and run the setup.sh with old ranger db name, username and related credentials
run the command 'python updateUserAndGroupNamesInJson.py'
Utility should update the user and groups name in the policy json as they(existing user/groups) appears in UI
Thanks,
Pradeep Agrawal
Re: Review Request 72106: RANGER-2718: Utility to update user and
group names in stored policy json
Posted by Velmurugan Periasamy <vp...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72106/#review219550
-----------------------------------------------------------
Ship it!
Ship It!
- Velmurugan Periasamy
On Feb. 10, 2020, 5:28 p.m., Pradeep Agrawal wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72106/
> -----------------------------------------------------------
>
> (Updated Feb. 10, 2020, 5:28 p.m.)
>
>
> Review request for ranger.
>
>
> Bugs: RANGER-2718
> https://issues.apache.org/jira/browse/RANGER-2718
>
>
> Repository: ranger
>
>
> Description
> -------
>
> **Problem Statement:** When The case conversion property to syncs users/groups is changed then in the ranger admin user/group names get updated but the user/group is not updated in policy json.
>
> **Proposed solution:** A standalone utility can be added to update the users and groups name in the policy json as they(existing user/groups) appear in ranger db.
>
>
> **Note:**
> There could be few other issues while syncing users with diffrent case but the below ones are not covered in this patch.
> 1) user name case was changed in x_user table but not in the x_portal_user table.
> 2) user name case may not change if user is added in the security zone.
> 5) Behaviour might be different in different DB flavours.
> 6) user/group name in service config may not change
>
>
> Diffs
> -----
>
> security-admin/scripts/updateUserAndGroupNamesInJson.py PRE-CREATION
> security-admin/src/main/java/org/apache/ranger/patch/cliutil/UpdateUserAndGroupNamesInJson.java PRE-CREATION
>
>
> Diff: https://reviews.apache.org/r/72106/diff/1/
>
>
> Testing
> -------
>
> applied the patch in the master branch and built it.
>
> untar the generated ranger-<version>-admin.tar.gz file.
>
> updated install.properties and run the setup.sh with old ranger db name, username and related credentials
>
> run the command 'python updateUserAndGroupNamesInJson.py'
>
> Utility should update the user and groups name in the policy json as they(existing user/groups) appears in UI
>
>
> Thanks,
>
> Pradeep Agrawal
>
>