Skip to content
Snippets Groups Projects

Integrate listing of existing custom headers into custom headers form for streaming audit events

All threads resolved!
11 files
+ 278
41
Compare changes
  • Side-by-side
  • Inline
Files
11
  • - Added custom headers to GraphQL query
    - Added new button to streaming items
    - Added editing mode to streaming items to toggle the editor
    - Added streaming destination editor to streaming items and pass the item
    into it as a prop
    - Updated streaming destination editor to be disabled when item is passed
    in
    - Updated streaming destination editor to add values to fields when item
    is passed in
    - Updated streaming destination editor button to say 'Save' rather than
    'Add' when the item is passed in
    - Updated docs to reflect that you can see all the headers in the UI
    - Updated translation file
    - Updated specs
@@ -29,7 +29,7 @@ Event streaming destinations receive **all** audit event data, which could inclu
@@ -29,7 +29,7 @@ Event streaming destinations receive **all** audit event data, which could inclu
Users with at least the Owner role for a group can add event streaming destinations for it:
Users with at least the Owner role for a group can add event streaming destinations for it:
1. On the top bar, select **Menu > Groups** and find your group.
1. On the top bar, select **Menu > Groups** and find your group.
1. On the left sidebar, select **Security & Compliance > Audit events**
1. On the left sidebar, select **Security & Compliance > Audit events**.
1. On the main area, select **Streams** tab.
1. On the main area, select **Streams** tab.
- When the destination list is empty, select **Add stream** to show the section for adding destinations.
- When the destination list is empty, select **Add stream** to show the section for adding destinations.
- When the destination list is not empty, select **{plus}** to show the section for adding destinations.
- When the destination list is not empty, select **{plus}** to show the section for adding destinations.
@@ -76,7 +76,7 @@ Users with at least the Owner role for a group can list event streaming destinat
@@ -76,7 +76,7 @@ Users with at least the Owner role for a group can list event streaming destinat
Users with at least the Owner role for a group can list event streaming destinations:
Users with at least the Owner role for a group can list event streaming destinations:
1. On the top bar, select **Menu > Groups** and find your group.
1. On the top bar, select **Menu > Groups** and find your group.
1. On the left sidebar, select **Security & Compliance > Audit events**
1. On the left sidebar, select **Security & Compliance > Audit events**.
1. On the main area, select **Streams** tab.
1. On the main area, select **Streams** tab.
### Use the API
### Use the API
@@ -115,7 +115,7 @@ When the last destination is successfully deleted, event streaming is disabled f
@@ -115,7 +115,7 @@ When the last destination is successfully deleted, event streaming is disabled f
Users with at least the Owner role for a group can delete event streaming destinations.
Users with at least the Owner role for a group can delete event streaming destinations.
1. On the top bar, select **Menu > Groups** and find your group.
1. On the top bar, select **Menu > Groups** and find your group.
1. On the left sidebar, select **Security & Compliance > Audit events**
1. On the left sidebar, select **Security & Compliance > Audit events**.
1. On the main area, select **Streams** tab.
1. On the main area, select **Streams** tab.
1. Select **{remove}** at the right side of each item.
1. Select **{remove}** at the right side of each item.
@@ -184,7 +184,7 @@ not available. The UI for this feature is not ready for production use.
@@ -184,7 +184,7 @@ not available. The UI for this feature is not ready for production use.
Users with at least the Owner role for a group can add event streaming destinations and custom HTTP headers for it:
Users with at least the Owner role for a group can add event streaming destinations and custom HTTP headers for it:
1. On the top bar, select **Menu > Groups** and find your group.
1. On the top bar, select **Menu > Groups** and find your group.
1. On the left sidebar, select **Security & Compliance > Audit events**
1. On the left sidebar, select **Security & Compliance > Audit events**.
1. On the main area, select **Streams** tab.
1. On the main area, select **Streams** tab.
- When the destination list is empty, select **Add stream** to show the section for adding destinations.
- When the destination list is empty, select **Add stream** to show the section for adding destinations.
- When the destination list is not empty, select **{plus}** to show the section for adding destinations.
- When the destination list is not empty, select **{plus}** to show the section for adding destinations.
@@ -220,7 +220,7 @@ mutation {
@@ -220,7 +220,7 @@ mutation {
### Deleting custom HTTP headers
### Deleting custom HTTP headers
Group owners can remove a HTTP header using the GraphQL `auditEventsStreamingHeadersDestroy` mutation. You can retrieve the header ID
Group owners can remove a HTTP header using the GraphQL `auditEventsStreamingHeadersDestroy` mutation. You can retrieve the header ID
by [listing all the custom headers](#list-all-custom-headers-with-the-api) on the group.
by [listing all the custom headers](#list-all-custom-headers) on the group.
```graphql
```graphql
mutation {
mutation {
@@ -232,7 +232,11 @@ mutation {
@@ -232,7 +232,11 @@ mutation {
The header is deleted if the returned `errors` object is empty.
The header is deleted if the returned `errors` object is empty.
### List all custom headers with the API
### List all custom headers
 
 
List all custom HTTP headers with the API or GitLab UI.
 
 
#### Use the API
You can list all custom headers for a top-level group as well as their value and ID using the GraphQL `externalAuditEventDestinations` query. The ID
You can list all custom headers for a top-level group as well as their value and ID using the GraphQL `externalAuditEventDestinations` query. The ID
value returned by this query is what you need to pass to the `deletion` mutation.
value returned by this query is what you need to pass to the `deletion` mutation.
@@ -258,6 +262,22 @@ query {
@@ -258,6 +262,22 @@ query {
}
}
```
```
 
#### Use the GitLab UI
 
 
FLAG:
 
On self-managed GitLab, by default the UI for this feature is not available. To make it available per group, ask an administrator to
 
[enable the feature flag](../administration/feature_flags.md) named `custom_headers_streaming_audit_events_ui`. On GitLab.com, the UI for this feature is
 
not available. The UI for this feature is not ready for production use.
 
 
Users with at least the Owner role for a group can add event streaming destinations and custom HTTP headers for it:
 
 
1. On the top bar, select **Menu > Groups** and find your group.
 
1. On the left sidebar, select **Security & Compliance > Audit events**.
 
1. On the main area, select **Streams** tab.
 
1. Select **{pencil}** at the right side of an item.
 
1. A read-only view of the items custom headers is shown. To track progress on adding editing functionality, see the [relevant issue](https://gitlab.com/gitlab-org/gitlab/-/issues/361925).
 
1. Select **Cancel** to close the read-only view.
 
## Verify event authenticity
## Verify event authenticity
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/345424) in GitLab 14.8.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/345424) in GitLab 14.8.
Loading