Skip to content

WIP: Refactor Rack Attack settings to be more clear, enable whitelist/blacklist

Brian Neel requested to merge upgrade-rack-attack into master

What does this MR do?

Refactor the Rack Attack settings to (hopefully) be more obvious and allow more flexible use of whitelists, blacklists, throttling, and Allow2Ban.

Are there points in the code the reviewer needs to double check?

This is my first attempt at changing application settings.

Why was this MR needed?

Rack Attack settings are not obvious. Enabling the git_basic_auth setting also enables throttling. The git_basic_auth whitelist, limits, and time period only apply to Allow2Ban and not to throttling. There is no way to blacklist.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/24664 https://gitlab.com/gitlab-org/gitlab-ce/issues/17653 https://gitlab.com/gitlab-org/gitlab-ce/issues/17822 https://gitlab.com/gitlab-org/gitlab-ce/issues/26686 (confidential)

Merge request reports