Search project snippets with ES and external authorization
Problem to solve
!18459 (merged) adds support for searching project snippets with ES in a global search, but excludes project snippets when External authorization control is enabled, since we only allow project-level searches in that case, but also don't support snippets yet when searching on the project level.
#18991 and/or #20963 will add support for searching project snippets when searching on the project level. At this point we should revisit the logic in
Elastic::Latest::SnippetClassProxy#filter_project_snippets, and include project snippets when only a single project is selected.
All users on instances with External Authorization enabled.
For non-ES project-level searches through the DB, this might already work as we'll be going through
Include project snippets when searching through ES on the project level with External Authorization enabled.
Permissions and Security
Make sure the External Authorization check for the searched project is performed, this should already happen with the existing code in the
SearchController which authorizes the project in the
For global and group-level ES searches, project snippets should continue to be excluded when External Authorization is enabled.
What does success look like, and how can we measure that?
- Navbar searches are currently tracked through
Gitlab::UsageDataCounters::SearchCounter, this could be extended to include the search level (global/group/project).
- Usage of the External Authorization feature doesn't seem to be tracked at all, this could be added to
What is the type of buyer?
External Authorization is in Core while Elasticsearch is available in Starter and up, so this feature should be implemented for Starter.
External Authorization is not available on gitlab.com.