Skip to content

Add project push rules changes auditor

Jay Montal requested to merge 268116_add_project_push_rules_changes_auditor into master

What does this MR do and why?

What

Add project push rules changes auditor

Note: only supports Reject unverified users (next iteration will support other types) as we want to get this out right away to support #268116

Why

  • Audit push rule changes at the project level
  • Setup base push rule changes auditor in preparation for instance level push rule changes auditor

Screenshots or screen recordings

Admin Audit Logs
image
Streaming Audit Logs
image
Streamed JSON Example
{
   "id":152,
   "author_id":1,
   "entity_id":31,
   "entity_type":"Project",
   "details":{
      "change":"reject unverified users",
      "from":true,
      "to":false,
      "target_details":"main-dev-group/push-rules",
      "author_name":"Administrator",
      "author_class":"User",
      "target_id":4,
      "target_type":"PushRule",
      "custom_message":"Changed reject unverified users from true to false",
      "ip_address":"172.16.123.1",
      "entity_path":"main-dev-group/push-rules"
   },
   "ip_address":"172.16.123.1",
   "author_name":"Administrator",
   "entity_path":"main-dev-group/push-rules",
   "target_details":"main-dev-group/push-rules",
   "created_at":"2023-09-20T03:07:19.395Z",
   "target_type":"PushRule",
   "target_id":4,
   "event_type":"project_push_rules_commit_committer_check_updated"
}

How to set up and validate locally

  1. Navigate to a project
  2. Navigate to Settings > Repository > Push rules
  3. Check/uncheck Reject unverified users
  4. Verify that the audit event appears

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 #268116

Edited by Jay Montal

Merge request reports