Define a schema for audit event type definitions
Overview
Use this issue to discuss and define a JSONSchema that will describe each audit event type.
The definition of done for this issue should be:
- Documenting the new schema in our audit event guide.
- Create a few example type definitions.
Initial proposal
I've defined an example first JSON schema. Please give feedback on thoughts/changed/additions/removals!
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$ref": "#/definitions/GitLabAuditEventType",
"definitions": {
"GitLabAuditEventType": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "Unique identifying name for the type of audit event"
},
"description": {
"type": "string",
"description": "A human-readable description of how this event is triggered"
},
"introduced_by_issue": {
"type": "string",
"format": "uri",
"description": "URL to GitLab issue that added this type of audit event",
"qt-uri-protocols": [
"https"
]
},
"introduced_by_mr": {
"type": "string",
"format": "uri",
"description": "URL to GitLab merge request that added this type of audit event",
"qt-uri-protocols": [
"https"
]
},
"engineering_group": {
"type": "string",
"description": "Name of the group that introduced this audit event. e.g. manage::compliance"
},
"milestone": {
"type": "number",
"description": "Milestone that introduced this audit event type, e.g. 15.8"
},
"saved_to_database": {
"type": "boolean",
"description": "Should events of this type be persisted to the database and JSON logs?"
},
"streamed": {
"type": "boolean",
"description": "Should events of this type be streamed to external services? (where configured)"
}
},
"required": [
"description",
"engineering_group",
"introduced_by_issue",
"introduced_by_mr",
"milestone",
"name",
"saved_to_database",
"streamed"
],
"title": "GitLabAuditEventType"
}
}
}
Edited by Max Woolf