Adds audit event for audit event filter creation
What does this MR do and why?
Creates audit event when event type filter is created.
How to set up and validate locally
- create event type filters https://docs.gitlab.com/ee/administration/audit_event_streaming.html#event-type-filters
mutation createEventTypeFilter {
auditEventsStreamingDestinationEventsAdd(input: {
destinationId: "GID",
eventTypeFilters: ["filter_1", "filter_2"]
}){
errors
eventTypeFilters
}
}
- Check
gdk_host/admin/audit_logs
for audit events created. - verify audit event is created with correct attributes.
Sample audit event
{
:id => 564377,
:author_id => 1,
:entity_id => 31,
:entity_type => "Group",
:details => {
:author_name => "Administrator",
:author_class => "User",
:target_id => 1,
:target_type => "AuditEvents::ExternalAuditEventDestination",
:target_details => "https://hsandhu.requestcatcher.com/",
:custom_message => "Created audit event type filter(s): filter1 and filter2",
:ip_address => "127.0.0.1",
:entity_path => "flightjs"
},
:ip_address => "127.0.0.1",
:author_name => "Administrator",
:entity_path => "flightjs",
:target_details => "https://hsandhu.requestcatcher.com/",
:created_at => Tue, 28 Feb 2023 12:31:24.985605000 UTC +00:00,
:target_type => "AuditEvents::ExternalAuditEventDestination",
:target_id => 1
}
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 #344848 (closed)
Edited by Harsimar Sandhu