Improve list role assignments filtering performance

Registered by Samuel de Medeiros Queiroz

When listing role assignments, we have the option to filter them by actor, target and role.
As Henry Nash pointed out at [1] , the current implementation uses the standard filtering the V3.wrap_collection.
Given the large number of individual assignments, this is pretty inefficient.

The controller should pass the filters into the driver call, so that the list size is kept a minimum.
For example, if the user wants to filter role assignments by project X, the driver would query the DB only selecting the role assignments where target_id = X.id, instead of querying everything and returning the result to be filtered by the controller.

In addition, expansion logic should be placed at Manager level, while Controller is charged of validating the provided filter combinations.

[1] https://github.com/openstack/keystone/blob/498a0032db89997244d3dc7e65ce9b37eac84283/keystone/assignment/controllers.py#L860-L864

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
Samuel de Medeiros Queiroz
Direction:
Needs approval
Assignee:
Samuel de Medeiros Queiroz
Definition:
Superseded
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
Samuel de Medeiros Queiroz

Related branches

Sprints

Whiteboard

This BP is marked as Superseded since it was wrongly created on Barbican side.
The right spec is at Keystone side [1].

[1] https://blueprints.launchpad.net/keystone/+spec/list-role-assignments-performance

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.