Added audit events for update and destroy destinations
What does this MR do and why?
Adding audit events for updation and deletion of instance level external audit event destinations.
How to set up and validate locally
- Login as instance administrator on gitlab instance, http://gitlab.localdev:3000 .
- Open http://gitlab.localdev:3000/admin/audit_logs?tab=log in one browser tab.
- Open http://gitlab.localdev:3000/admin/audit_logs?tab=streams in another browser tab and add a new streaming destination.
- Open http://gitlab.localdev:3000/-/graphql-explorer for running graphql queries as update is not available on UI currently.
- Run following query in graphql explorer for listing down all the destinations and note down the gid of the destination you want to update:
query {
instanceExternalAuditEventDestinations {
nodes {
id
destinationUrl
verificationToken
headers {
nodes {
id
key
value
}
}
}
}
}
- Run following mutation to update the destination, replace the gid with one obtained in step 5
mutation {
instanceExternalAuditEventDestinationUpdate(input: {
id: "gid://gitlab/AuditEvents::InstanceExternalAuditEventDestination/<id>",
destinationUrl: "https://www.newexample.com"
}) {
errors
instanceExternalAuditEventDestination {
destinationUrl
id
verificationToken
}
}
}
- In http://gitlab.localdev:3000/admin/audit_logs?tab=log, there will be a new audit event related to this update. Please note you might need to refresh the page once.
- Now visit http://gitlab.localdev:3000/admin/audit_logs?tab=streams and delete the destination.
- In http://gitlab.localdev:3000/admin/audit_logs?tab=log, there will be a new audit event related to destination being deleted. Please note you might need to refresh the page once.
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 #404730 (closed)
Edited by Hitesh Raghuvanshi