Authorize 17 Pipeline Authoring GraphQL types for fine-grained tokens
Summary
A fine-grained personal access token is denied the Pipeline Authoring GraphQL types below: they declare no authorize_granular_token directive and are still listed in config/authz/graphql/authorization_todo.txt, so the fields that return them give the token null, an empty list or an error. A legacy token can use them.
As agreed in !267273 (comment 4195231927), this domain's types go in one merge request, which closes this issue. Those already in an open merge request stay there.
Already in an open merge request
- !267264 (merged):
CiCatalogResourceComponentUsage.
Proposal
- Returned by the
CiLintmutation, which already checks the token withvalidate_ci_config, so each relies on that check (parent_authorizes: :validate_ci_config):CiConfigGroupV2,CiConfigInclude,CiConfigJobRestriction,CiConfigJobV2,CiConfigNeed,CiConfigStageV2,CiConfigV2. - The deprecated
CiConfig,CiConfigGroup,CiConfigJobandCiConfigStagesubclass the V2 types and inherit their declaration, so the deprecatedQuery.ciConfigchecksvalidate_ci_configtoo. - With the existing
read_variablepermission:CiGroupEnvironmentScope,CiGroupVariable,CiProjectVariableandInheritedCiVariablethrough the fields that return them, on their project or group, andCiInstanceVariableon the instance.
This uses the existing validate_ci_config and read_variable permissions and adds none.
Related to #593878.
I found this while working on gitlab-mcp-server.
Edited by José M. Requena Plens