Skip to content
代码片段 群组 项目
未验证 提交 232f84d2 编辑于 作者: Evan Read's avatar Evan Read 提交者: GitLab
浏览文件

Merge branch 'nrosandich-master-patch-649f' into 'master'

Remove unneeded version history

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/143289



Merged-by: default avatarEvan Read <eread@gitlab.com>
Approved-by: default avatarEvan Read <eread@gitlab.com>
Co-authored-by: default avatarNate Rosandich <nrosandich@gitlab.com>
No related branches found
No related tags found
无相关合并请求
......@@ -12,23 +12,21 @@ info: To determine the technical writer assigned to the Stage/Group associated w
Audit events have a predictable schema in the body of the response.
| Field | Description | Notes |
Streaming Only Field |
|------------------|------------------------------------------------------------|-----------------------------------------------------------------------------------|
-----------------------------------------------------------------------------------|
| `author_id` | User ID of the user who triggered the event | | |
| `author_name` | Human-readable name of the author that triggered the event | Helpful when the author no longer exists | :white_check_mark: |
| `created_at` | Timestamp when event was triggered | | |
| `details` | JSON object containing additional metadata | Has no defined schema but often contains additional information about an event | |
| `entity_id` | ID of the audit event's entity | | |
| `entity_path` | Full path of the entity affected by the auditable event | | :white_check_mark: |
| `entity_type` | String representation of the type of entity | Acceptable values include `User`, `Group`, and `Key`. This list is not exhaustive | |
| `event_type` | String representation of the type of audit event | | :white_check_mark: |
| `id` | Unique identifier for the audit event | Can be used for deduplication if required | |
| `ip_address` | IP address of the host used to trigger the event | | :white_check_mark: |
| `target_details` | Additional details about the target | | :white_check_mark: |
| `target_id` | ID of the audit event's target | | :white_check_mark: |
| `target_type` | String representation of the target's type | | :white_check_mark: |
| Field | Description | Notes | Streaming Only Field |
|------------------|------------------------------------------------------------|-----------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|
| `author_id` | User ID of the user who triggered the event | | **{dotted-circle}** No |
| `author_name` | Human-readable name of the author that triggered the event | Helpful when the author no longer exists | **{check-circle}** Yes |
| `created_at` | Timestamp when event was triggered | | **{dotted-circle}** No |
| `details` | JSON object containing additional metadata | Has no defined schema but often contains additional information about an event | **{dotted-circle}** No |
| `entity_id` | ID of the audit event's entity | | **{dotted-circle}** No |
| `entity_path` | Full path of the entity affected by the auditable event | | **{check-circle}** Yes |
| `entity_type` | String representation of the type of entity | Acceptable values include `User`, `Group`, and `Key`. This list is not exhaustive | **{dotted-circle}** No |
| `event_type` | String representation of the type of audit event | | **{check-circle}** Yes |
| `id` | Unique identifier for the audit event | Can be used for deduplication if required | **{dotted-circle}** No |
| `ip_address` | IP address of the host used to trigger the event | | **{check-circle}** Yes |
| `target_details` | Additional details about the target | | **{check-circle}** Yes |
| `target_id` | ID of the audit event's target | | **{check-circle}** Yes |
| `target_type` | String representation of the target's type | | **{check-circle}** Yes |
### Audit Event JSON schema
......@@ -74,25 +72,9 @@ Streaming Only Field
}
```
## Example: audit event streaming on Git operations
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/332747) in GitLab 14.9 [with a flag](feature_flags.md) named `audit_event_streaming_git_operations`. Disabled by default.
> - [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/357211) in GitLab 15.0.
> - [Enabled on self-managed](https://gitlab.com/gitlab-org/gitlab/-/issues/357211) in GitLab 15.1 by default.
> - `details.author_class` field [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/363876) in GitLab 15.3.
> - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/101583) in GitLab 15.6. Feature flag `audit_event_streaming_git_operations` removed.
Streaming audit events can be sent when authenticated users push, pull, or clone a project's remote Git repositories:
- [Using SSH](../user/ssh.md).
- Using HTTP or HTTPS.
- Using **Download** (**{download}**) in GitLab UI.
Audit events are not captured for users that are not signed in. For example, when downloading a public project.
### Headers
> `X-Gitlab-Audit-Event-Type` [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/86881) in GitLab 15.0.
> - `X-Gitlab-Audit-Event-Type` [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/86881) in GitLab 15.0.
Headers are formatted as follows:
......@@ -104,9 +86,17 @@ X-Gitlab-Event-Streaming-Token: <DESTINATION_TOKEN>
X-Gitlab-Audit-Event-Type: repository_git_operation
```
### Example payloads for Git over SSH events with Deploy Key
## Example: audit event streaming on Git operations
Streaming audit events can be sent when authenticated users push, pull, or clone a project's remote Git repositories:
- [Using SSH](../user/ssh.md).
- Using HTTP or HTTPS.
- Using **Download** (**{download}**) in GitLab UI.
Audit events are not captured for users that are not signed in. For example, when downloading a public project.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/363876) in GitLab 15.3.
### Example: audit event payloads for Git over SSH events with Deploy Key
Fetch:
......
......@@ -69,7 +69,7 @@ As with all sensitive information, you should ensure only those who need access
For human interactions, use credentials tied to users such as Personal Access Tokens.
To help detect a potential secret leak, you can use the
[Audit Event](../../../administration/audit_event_schema.md#example-payloads-for-git-over-ssh-events-with-deploy-key) feature.
[Audit Event](../../../administration/audit_event_schema.md#example-audit-event-payloads-for-git-over-ssh-events-with-deploy-key) feature.
## View deploy keys
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册