ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pradeep Agrawal (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (RANGER-806) Ranger cli utility to delete users from Ranger DB
Date Wed, 02 Mar 2016 04:18:18 GMT

     [ https://issues.apache.org/jira/browse/RANGER-806?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Pradeep Agrawal updated RANGER-806:
-----------------------------------
    Attachment: RANGER-806-2.patch

Proposed Solution:
This Patch provides a Python utility that users can use to delete list of users or groups
from Ranger database. Utility can accept an input file which should have users or groups need
to be deleted. Utility usages user and group delete Ranger REST APIs.
After Ranger admin is installed successfully, User should be able to execute this command
line utility by following appropriate syntax. 
A sample command need to be provided and documented so that user having admin role can execute
them by changing parameter values according to their environment.
python deleteUserGroupUtil.py -u <user file path> -su <ranger admin user> -h <ranger
host url> -p -f -ssl <cert path> -d
where : 
-g: Enables group delete option
-u: Enables user delete option
-su: Ranger admin login id
-p: Prompts for Ranger admin login password whether this switch is used or not
-f: Enable force delete, default value is disabled
-h: Provide host url
-ssl: Enables ssl mode when Ranger is running on https
-d: Enable debugging
Testing Done :
Steps performed (with patch) :
1. After Ranger installation, started Ranger admin and usersync to sync unix os users.
2. Created one input file and added user names from the list of synced users. 
3. a) Executed below given command to delete users:
python deleteUserGroupUtil.py -u /root/users.txt -su admin -h http://localhost:6080 -p -f
3. b) Executed below given command to delete groups:
python deleteUserGroupUtil.py -g /root/groups.txt -su admin -h http://localhost:6080 -p -f
3. c) Executed below given command to delete users from SSL enabled Ranger:
python deleteUserGroupUtil.py -u /root/user2.txt -su admin -h https://localhost:6182 -p -f
-d -ssl /root/ranger-admin-cert.pem
Result/Behavior:
a) Browsed user/group page in Ranger Admin UI and found that users added in users.txt are
now not appearing in UI.
b) Browsed user/group page in Ranger Admin UI and found that groups added in groups.txt are
now not appearing in UI.
c) Browsed user/group page in Ranger Admin UI and found that users list added in user2.txt
are now not appearing in UI.

> Ranger cli utility to delete users from Ranger DB
> -------------------------------------------------
>
>                 Key: RANGER-806
>                 URL: https://issues.apache.org/jira/browse/RANGER-806
>             Project: Ranger
>          Issue Type: Task
>          Components: admin
>    Affects Versions: 0.6.0
>            Reporter: Gautam Borad
>            Assignee: Pradeep Agrawal
>             Fix For: 0.6.0
>
>         Attachments: RANGER-806-2.patch, RANGER-806.patch
>
>
> *Problem Statement*
> As of now, Delete Users feature is not available in Ranger UI. This JIRA provides, Ranger
utility patch that users can use to delete list of users from Ranger database. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message