Skip to content

Emit audit events to instance level destinations

Hitesh Raghuvanshi requested to merge 335176-emit-audit-events-lat into master

What does this MR do and why?

In MR !118363 (merged), we added an API for creating instance level external audit event destinations. Now we need to emit instance level audit events to these destinations if atleast one is present.

How to set up and validate locally

  1. Enable the feature flag ff_external_audit_events from rails console by running Feature.enable(:ff_external_audit_events).
  2. Login as an instance admin in the browser on http://localhost:3000.
  3. Go to http://localhost:3000/-/graphql-explorer.
  4. Create an entry for instance level external audit event destination by running following command in graphql-explorer.
mutation {
  instanceExternalAuditEventDestinationCreate(input: { destinationUrl: "https://www.example.com"}) {
    errors
    instanceExternalAuditEventDestination {
      destinationUrl
      id
      verificationToken
    }
  }
}
  1. Once the destination is set, create a new group.
  2. An audit event will get created, which you can check in http://localhost:3000/admin/audit_logs and same will be sent to the external destination(s) added previously.

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

Edited by Hitesh Raghuvanshi

Merge request reports

Loading