Emit audit events to instance level destinations
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
- Enable the feature flag
ff_external_audit_events
from rails console by runningFeature.enable(:ff_external_audit_events)
. - Login as an instance admin in the browser on http://localhost:3000.
- Go to http://localhost:3000/-/graphql-explorer.
- 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
}
}
}
- Once the destination is set, create a new group.
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #335176 (closed)
Edited by Hitesh Raghuvanshi