Skip to content

Added Instance scope as valid audit entity type

Hitesh Raghuvanshi requested to merge 468865-fix-entity-type-instance into master

What does this MR do and why?

Users are not able to fetch instance level audit events via api. Following API request is throwing error

curl -s --header "PRIVATE-TOKEN: " 'https://gitlab.com/api/v4/audit_events?entity_type=Gitlab::Audit::InstanceScope'

This MR adds InstanceScope as a valid audit event entity type for the audit events api.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

  1. Make sure you have an Ultimate GitLab license for your instance and have admin access for it.
  2. Run following curl command and you will get a response in json array with all the instance level audit events.
curl --location 'http://gitlab.localdev:3000/api/v4/audit_events?entity_type=Gitlab::Audit::InstanceScope' --header 'PRIVATE-TOKEN: <admin_access_token>'

Related to #468865 (closed)

Edited by Hitesh Raghuvanshi

Merge request reports

Loading