Event type information in MR approval rule audit event streaming
What does this MR do and why?
Adds event type information in streaming audit events when merge approval rule is created or updated. I have also updated audit changes concern, and now it has option to use Auditor class instead of AuditEventService.
Note: currently creation/deletion of approval rule and only update on number of required approvals and add/remove approvers produces audit events.
How to set up and validate locally
- Setup external destination using https://docs.gitlab.com/ee/administration/audit_event_streaming.html#use-the-gitlab-ui or https://docs.gitlab.com/ee/administration/audit_event_streaming.html#use-the-api .
- Go to Project -> Settings -> General -> Expand Merge request approvals.
- Create Merge request approval rule.
- Check streamed payload and headers contain event type
approval_rule_created
and audit event is also visible under admin {{gdk_host_url}}/admin/audit_logs. - Edit Merge request approval rule.
- Check streamed payload and headers contain event type
approval_rule_updated
and audit event is also visible under admin {{gdk_host_url}}/admin/audit_logs. - Delete Merge request approval rule.
- Check streamed payload and headers contain event type
approval_rule_deleted
and audit event is also visible under admin {{gdk_host_url}}/admin/audit_logs.
MR acceptance checklist
-
I have evaluated the MR acceptance checklist for this MR.
Related to #363092 (closed)
Edited by Harsimar Sandhu