Skip to content

Refactored audit events for project creation and updation

Hitesh Raghuvanshi requested to merge 374105-refactor-project-audit-2 into master

What does this MR do and why?

Refactors project services to use Gitlab::Audit::Auditor for creating audit events for project creation and default branch updation.

  • Adds new audit event types under ee/config/audit_events/types.
  • Adds default options for audit context author + target

How to set up and validate locally

  1. Setup external audit event streaming destination for a group by following steps here. Please note the group must have at least Ultimate licence.
  2. All the audit events related to group will be sent to the endpoint added above.
  3. Perform following actions for the projects of the group and check the respective audit events on the remote destination is the event_type is coming for each one or not:
    1. Create a new project.
    2. Change the default branch of a project.

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 #374105 (closed)

Edited by Hitesh Raghuvanshi

Merge request reports