Skip to content

Check if user has exceeded git rate limits before forking project

Hinam Mehra requested to merge 384576-add-rate-limiting-to-forking into master

What does this MR do and why?

  • Adds git abuse rate-limiting to forking of projects. We had already implemented this for cloning & downloading of projects.

Screenshots or screen recordings

Screen_Recording_2023-03-24_at_1.25.19_pm

How to set up and validate locally

  1. Log-in as root and create a group with 2 private projects, each with their own repositories
  2. Add another user to that group as a Developer
  3. Configure the git rate limit settings on
  4. Configure the git rate limit settings on <GROUP-PATH>/-/settings/reporting page
  1. Lastly, log-in as the other user and try to fork both projects. You will be able to fork the first one, but you will be rate-limited when you try to fork the 2nd one.
  2. This can also be configured on an application-level, so forking across the entire application can be rate-limited. For this, the exact same settings can be configured on http://localhost:3000/admin/application_settings/reporting

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #384576 (closed)

Edited by Hinam Mehra

Merge request reports

Loading