Bug 1252817 - [RFE][keystone] Tool needed to manipulate the assignments directly
Summary: [RFE][keystone] Tool needed to manipulate the assignments directly
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-keystone
Version: 6.0 (Juno)
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 8.0 (Liberty)
Assignee: Nathan Kinder
QA Contact: Shai Revivo
URL:
Whiteboard:
: 1252816 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-12 09:46 UTC by Eduard Barrera
Modified: 2019-11-14 06:51 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-30 17:49:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Eduard Barrera 2015-08-12 09:46:38 UTC
Description of problem:

When a user is deleted in a LDAP or AD backend it happens that some leftover information remains in the assignments table. When it happens we can see in the project the user uuid but we are not able to delete it.

We would like to have a tool to manipulate the assignments directly without having to go to the database in order to achieve this task, for example

# keystone assignment-delete <tenant> <user>

or a way to resync the current assignment with the backend and remove from the database the deleted users

Version-Release number of selected component (if applicable):
OSP 6

How reproducible:
always

Steps to Reproduce:
 
Starting from a keystone using AD backend:

1. Give a role in a project to the user
2. Delete the user from the backend
3.

Actual results:
A uuid is displayed in the project users
It is not possible to delete it manually


Expected results:
- uuid not displayed in the project users
- a way to delete the assignement when it happens



Additional info:

Comment 5 Nathan Kinder 2015-08-31 20:49:16 UTC
*** Bug 1252816 has been marked as a duplicate of this bug. ***

Comment 6 Adam Young 2015-08-31 21:09:31 UTC
You should be able to use the V3 API to delete a role from a user:


http://git.openstack.org/cgit/openstack/keystone-specs/tree/api/v3/identity-api-v3.rst#n5023

DELETE /domains/{domain_id}/users/{user_id}/roles/{role_id}

Looking through the code, I do not think that it does any check for the user in the identity backend.

The Openstack common Client with OS_IDENTITY_API_VERSION=3 should be making that call.


Note You need to log in before you can comment on or make changes to this bug.