[ 
https://issues.apache.org/jira/browse/RANGER-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14262160#comment-14262160
 ] 

Shrey Mehrotra commented on RANGER-205:
---------------------------------------

We are also thinking in same way. What we have found is we have 2 types of 
users in ranger, one is portal user created from Ranger portal (External) and 
other (Internal) is inserted by ranger sync service. Please find the comments 
inline:

1.     Should we allow deletion of users? If yes, will it be soft delete or 
hard delete?
It would be better if we have a soft delete so that we would have data in the 
system for audits and reporting. For this, we could change the status of user 
in portal user table and other referenced tables to 0. We also need to change 
the queries to fetch data with status 1 only. As an enhancement, we could give 
option to admin to toggle the status of users between active and inactive. 

2.  We have two types of users ( Internal and External ), should we allow 
deletion of external users also?
      Admin can delete external user or deactivate with the above mentioned 
feature.
      If yes, what will happen when they are re-synced?
      Even if re-synced, the state would be inactive until admin activate the 
particular user from UI.

3. Currently when a group is deleted, all policies that have permissions for 
that group are updated and that group is removed. Is this right? Or should we 
ask throw an error informing user that the group is being used in policies?
We could do it either way, but throwing an error would force user to delete or 
update groups at all places. So we prefer to go with option 1.

4. Currently there is no way to delete user/group from the ui. We need to 
provide this option.
We could write REST APIs for soft delete of user and groups.

Correct me if my understanding is not in accordance with current Ranger 
implementation.


> Delete rest api of User not deleting user completely from system
> ----------------------------------------------------------------
>
>                 Key: RANGER-205
>                 URL: https://issues.apache.org/jira/browse/RANGER-205
>             Project: Ranger
>          Issue Type: Bug
>    Affects Versions: 0.4.0
>            Reporter: Hanish Bansal
>
> Delete rest api of user is removing entry from x_user table of database and 
> not from x_portal_user table so user get invisible from UI and api return 
> success status.
> Due to which if a user is updated to have username/email-id of deleted user, 
> it will error message that this username/email-id already exists.
> Also if a new user is created with user-name of deleted user, user get 
> successfully created but his/her details are mapped with deleted user.
> Rest apis used are:
> {quote}
> DELETE http://<ip>:6080/service/xusers/users/userName/<username>
> DELETE http://<ip>:6080/service/xusers/users/<id>
> {quote}
> Expected result:
> Apis should remove entry from both tables x_user and x_portal_user.



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

Reply via email to