Skip to content

Add field authorization to Pipeline fields [RUN ALL RSPEC] [RUN AS-IF-FOSS]

What does this MR do?

This MR addresses the bug seen in #329695 (closed), where we were returning stages and groups to users without jobs in them.

This was due to the fact that we made group-by queries for jobs first, and only later in the GQL query life-cycle (right at the end) do we redact unauthorized information.

Quite apart from the performance benefits of not running queries we know cannot return any results, the current approach runs the risk of exposing data (stage and group names) that is technically unauthorized.

Generally stage and group names are not considered to be security risks, but we should not be exposing them to guest users (which is what we are doing).

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Related to #329695 (closed)

Edited by 🤖 GitLab Bot 🤖

Merge request reports