Audit changes to per-project Git rate limit overrides

What does this MR do and why?

Project Owners can override three Git rate limits per project (throttle_unauthenticated_git_http_requests_per_period, throttle_authenticated_git_http_requests_per_period, throttle_authenticated_git_lfs_requests_per_period on project_settings, behind the project_git_throttle_overrides flag). Projects::ProjectSettingChangesAuditor only audits the columns it lists, so changing a limit left no record of who changed it.

This MR:

  • Audits each of the three columns through audit_changes, iterating ProjectSetting::GIT_THROTTLE_COLUMNS so the auditor and the model cannot drift. Each event records the old and new value.
  • Adds three audit event type definitions under ee/config/audit_events/types/, named <column>_updated, scope Project, saved and streamed.
  • Adds the three rows to doc/user/compliance/audit_event_types.md.
  • Adds specs covering setting an override, changing it, and clearing it back to nil for each column.

Reviewer note: the docs table was edited by hand. If bundle exec rake gitlab:audit_event_types:compile_docs orders the rows differently, I will regenerate it. The introduced_by_mr links will be updated to this MR in a follow-up commit.

References

Resolves #633619

Follow-up from !259138 (merged)

Screenshots or screen recordings

Not applicable. Backend only.

How to set up and validate locally

  1. Enable the feature flag: Feature.enable(:project_git_throttle_overrides).
  2. As a project Owner, go to Settings > General, expand the Git rate limits section, set an override for authenticated Git HTTP requests and save.
  3. Go to Secure > Audit events for the project. An event throttle_authenticated_git_http_requests_per_period_updated is listed with the previous and new value.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist.

Merge request reports

Loading
Loading