Skip to content

Added audit events for update destroy headers

Hitesh Raghuvanshi requested to merge 417433-update-destroy-audit-events into master

What does this MR do and why?

Adding audit events for updation and deletion of streaming headers for instance level external audit event destinations. Audit events for creation of headers were added in !125870 (merged).

Since streaming headers for instance level destinations is quite similar to group level destinations, most of the code for them is common and hence the common test cases. So, I have also refactored a little bit.

How to set up and validate locally

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

  1. For this you need to have a GitLab instance with Ultimate license and administrator access for that.
  2. Visit http://gitlab.localdev:3000/admin/audit_logs?tab=streams.
  3. Add a new custom HTTP streaming destination and some headers for that and click on Save button.
  4. Then edit one of the added headers, either the key or value or both.
  5. You will receive an audit event at your streaming destination with event_type as audit_events_streaming_instance_headers_update.
  6. And on visiting http://gitlab.localdev:3000/admin/audit_logs?tab=log and refreshing it, you can see a new audit event with something like image
  7. Now again visit http://gitlab.localdev:3000/admin/audit_logs?tab=streams and delete one of the headers.
  8. You will receive an audit event at your streaming destination with event_type as audit_events_streaming_instance_headers_destroy.
  9. And on visiting http://gitlab.localdev:3000/admin/audit_logs?tab=log and refreshing it, you can see a new audit event with something likeimage

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