Add the verify_secret_detection_raw_token project ability

Problem

The raw-token validity checks endpoint for https://gitlab.com/gitlab-org/gitlab/-/work_items/637856 lets a caller check whether GitLab token values found outside GitLab are still live. The caller names a project it acts for, and that project needs an ability that says who may make the call.

Changes

I added the verify_secret_detection_raw_token permission under config/authz/permissions/secret_detection_raw_token/, granted it to the Developer role in config/authz/roles/developer.yml so Maintainers and Owners inherit it, granted it to the Security Manager role in config/authz/roles/security_manager.yml, and added a prevent rule to the EE project policy when secret_detection_validity_checks is not licensed. Nothing checks the ability yet; the domain module in !268642 (merged) does, and the endpoint in !268618 (merged) exposes it to fine-grained tokens.

Developer is the floor on the Guest-to-Owner ladder because the endpoint answers for any token on the instance and the rollout is gated per project by a feature flag; whether that floor should rise before a wider release is tracked on the work item. Security Manager sits outside that ladder (it inherits from Reporter) and is granted the ability independently because it already holds update_secret_detection_validity_check and update_secret_detection_validity_check_status: verifying a raw token is part of the same secret detection workflow the role exists to operate, so its access to the instance-wide lookup is intentional.

This is the first of a stack of MRs for https://gitlab.com/gitlab-org/gitlab/-/work_items/637856 and depends on nothing else.

Validation

rake gitlab:permissions:validate is clean, the new project policy examples pass locally, and RuboCop reports no offenses on the changed files.

Edited by Jennifer Li

Merge request reports

Loading
Loading