Skip to content

Added audit event for header creation

Hitesh Raghuvanshi requested to merge 417433-audit-events-header-create into master

What does this MR do and why?

In this MR, we are adding audit events whenever a new streaming header is added for an existing instance level external audit event destination.

I have refactored the code slightly so that the same code can be used for streaming headers created for group level external audit event destinations.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Sign in with instance admin credentials on http://gitlab.localdev:3000/.
  2. Visit admin dashboard for audit events: http://gitlab.localdev:3000/admin/audit_logs?tab=streams
  3. Create a new streaming destination by clicking on "Add streaming destination" button, also add atleast 1 header to it. Or you can add header later once the destination is created.
  4. Visit http://gitlab.localdev:3000/admin/audit_logs?tab=log and refresh the page.
  5. You will notice audit event with "Action" field as "Created custom HTTP header with key <name_of_your_header_key>."

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

Edited by Hitesh Raghuvanshi

Merge request reports