Update APIs for activate headers
What does this MR do and why?
This MR adds a new boolean attribute active
in the update APIs for streaming headers for group and instance level audit event external destinations.
How to set up and validate locally
- Please note that you need to have an ULTIMATE license for your instance or group and admin/owner access for the same.
- Create a new external audit event destination with at least one streaming header by following steps mentioned in https://docs.gitlab.com/ee/administration/audit_event_streaming/#add-a-new-http-destination-1.
- Visit graphql explorer https://gitlab.localdev:3000/-/graphql-explorer.
- Run following query for listing down all the destinations
query instanceExternalAuditEventDestinations {
instanceExternalAuditEventDestinations {
nodes {
id
name
destinationUrl
verificationToken
headers {
nodes {
id
key
value
active
}
}
eventTypeFilters
}
}
}
- Run following mutation for updating the
active
attribute for the header by using the id obtained in response of query in step 4.
mutation auditEventsStreamingInstanceHeadersUpdate {
auditEventsStreamingInstanceHeadersUpdate(input: { headerId: "gid://gitlab/AuditEvents::Streaming::InstanceHeader/<id>", active: false }) {
errors
header {
id
key
value
active
}
}
}
- You can run the query in step 4 again to check if the header got deactivated or not.
- Similar steps can be performed for group level destinations by following https://docs.gitlab.com/ee/administration/audit_event_streaming/#http-destinations and https://docs.gitlab.com/ee/administration/audit_event_streaming/graphql_api.html#update-streaming-destinations.
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 #367509 (closed)
Edited by Hitesh Raghuvanshi