Skip to content

Event type information in deploy key audit event

What does this MR do and why?

Adds event type information in streamed audit events when deploy key is created/deleted on project level. below table list down event type names

action event type
create/enable on project deploy_key_added
remove/disabled on project deploy_key_removed

How to set up and validate locally

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

  1. 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 .
  2. Go to Project -> Repository -> Deploy key
  3. Create deploy key
  4. Check audit event is created and streamed with correct event type. Also check audit event is visible at http://localhost:3000/admin/audit_logs and log is present in audit_json.log
  5. Remove deploy key
  6. repeat step 3
  7. Go to Admin panel and create a deploy key
  8. Enable this deploy key in project from Project -> Repository -> Deploy key
  9. repeat step 3
  10. Disable this deploy key in project from Project -> Repository -> Deploy key
  11. repeat step 3

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

Edited by Harsimar Sandhu

Merge request reports

Loading