Loading
Rate limit the DAST configuration page
What does this MR do and why?
Adds a rate limit to the DAST configuration page (Projects::Security::DastConfigurationController#show). Each view expands the project's CI config, including remote includes, in the web request, and nothing limits how often a user can do that.
Behind the dast_configuration_rate_limit feature flag (disabled by default):
- Rate limit.
dast_configuration_show: 10 views per minute per user, counted across all of the user's projects. Requests over the limit return429before the CI config is read.
The limit is a fixed value. It's explained in https://gitlab.com/gitlab-org/gitlab/-/work_items/637251#note_4197362844. It's documented as a non-configurable rate limit.
Related to https://gitlab.com/gitlab-org/gitlab/-/work_items/637251
How to set up and validate locally
- Enable the flag:
Feature.enable(:dast_configuration_rate_limit). - As a Developer on an Ultimate project, open Secure > Security configuration and select Configure DAST. The page loads as normal.
- Reload the page 11 times within a minute. The 11th returns
429.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist.