Add streaming audit event for work items deletion
What does this MR do and why?
This MR add a streamed audit event for deleting an issue, epic, merge request or work item.
Screenshots or screen recordings
This is a sample request body sent out when deleting a task
:
Click to see json
{
"id": 1662108106,
"author_id": 1,
"entity_id": 1,
"entity_type": "Project",
"details": {
"author_name": "Administrator",
"author_class": "User",
"target_id": 470,
"target_type": "WorkItem",
"target_details": {
"title": "Task 3",
"iid": 35,
"id": 470,
"type": "Task"
},
"custom_message": "Removed Task(Task 3 with IID: 35 and ID: 470)",
"ip_address": "127.0.0.1",
"entity_path": "gitlab-org/gitlab-test"
},
"ip_address": "127.0.0.1",
"author_name": "Administrator",
"entity_path": "gitlab-org/gitlab-test",
"target_details": "{\"title\"=>\"Task 3\", \"iid\"=>35, \"id\"=>470, \"type\"=>\"Task\"}",
"created_at": "2022-09-02T08:41:46.636Z",
"target_type": "WorkItem",
"target_id": 470,
"event_type": "delete_work_item"
}
How to set up and validate locally
- Add a streaming destination. I followed the documentation we have on that https://docs.gitlab.com/ee/administration/audit_event_streaming.html#add-a-new-streaming-destination
- I used
https://requestbin.com/
to setup an endpoint. - Delete an issue, epic, mr
- Check the endpoing setup at point (2) for the request details.
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.
Edited by Alexandru Croitor