Global User/Project/Group admin searches using the Custom Attributes API

In #281725 (closed) I laid out the case for why having a administrative tagging system would be helpful in the operation of large GitLab instances, such as GitLab.com.

It turned out that much of this functionality was already available, through the Custom Attributes API.

This API will give us everything we need to tag Projects, Groups and Users.

In order to fulfil the requirements laid out in #281725 (closed), there is one additional, critical feature required: the ability for administrative users to search globally across an instance by custom attribute.


This could be done by extending the admin List Users/Projects/Groups API

GET /users
GET /projects
GET /groups
Attribute Type Required Description
custom_attribute_key string no Returns entities which have this custom attribute key
custom_attribute_value string no Returns entities which may on custom_attribute_key=custom_attribute_value

Ideally, we would want to be able to search by existence of a custom key, or by a custom key equalling a specific value.

In order for this to be useful, it would be critical that the search is performant on a large instance such as GitLab.com, across millions of entities.

cc @marin @mushakov @davis_townsend @rostrander @cjdewit @awthomas @albertoramos @nnelson

Edited by Andrew Newdigate