Skip to content

Refactoring audit events for projects

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

What does this MR do and why?

Refactors project services to use Gitlab::Audit::Auditor for creating audit events.

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

The files that are being updated here are mentioned in #374105 (closed).

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

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. Archive a project.
    2. Unarchive a project.
    3. Restore a project.
    4. Download export file of a project.
    5. Import 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