Add a setting for the pipeline trigger token management rate limit
What does this MR do and why?
Adds the application setting that the pipeline trigger token management rate limit reads, so the MR that enforces the limit can focus on the enforcement:
| Setting | Default |
|---|---|
pipeline_trigger_management_limit_per_user |
300 per minute, 0 disables |
The default was sized from GitLab.com traffic with headroom.
It lives in the existing rate_limits JSONB column, so there is no migration.
It appears under Admin > Settings > CI/CD > Continuous Integration and
Deployment and in the application settings API, and the LabKit rate limit
rule pipeline_trigger_management reads it.
There is no per-project limit: with an equal default it could never fire before the per-user one, as found in review of the pipeline schedule limit in !267727 (comment 4204326151).
Nothing calls this rule yet. The pipeline trigger token services start
checking it in !267781 (merged),
behind the rate_limit_pipeline_trigger_management feature flag, and that MR
is stacked on this one.
This mirrors the setting added for pipeline schedules in !267727 (merged).
References
Related to https://gitlab.com/gitlab-org/gitlab/-/work_items/636907
Screenshots or screen recordings
One new field in Admin > Settings > CI/CD > Continuous Integration and Deployment: Maximum pipeline trigger token changes per user.
How to set up and validate locally
-
Go to Admin > Settings > CI/CD, expand Continuous Integration and Deployment, change Maximum pipeline trigger token changes per user, and save. The value persists.
-
Read it back through the API:
curl --header "PRIVATE-TOKEN: <admin token>" "http://gdk.test:3000/api/v4/application/settings" \ | jq '.pipeline_trigger_management_limit_per_user'
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.