Skip to content

Commit

Permalink
Add ticket events
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Brennan <[email protected]>
  • Loading branch information
sbrennan4 committed Mar 14, 2024
1 parent 87c9290 commit fb9dda6
Show file tree
Hide file tree
Showing 8 changed files with 697 additions and 13 deletions.
1 change: 1 addition & 0 deletions .spellcheck-en-custom.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Tekton
URI
UUID
american
assignees
br
cardpane
cdevent
Expand Down
120 changes: 107 additions & 13 deletions continuous-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,54 @@ description: >
-->
# Continuous Operations Events

Continuous Operations events are related to the operation of services deployed in target environments, tracking of incidents and their resolution. Incidents, and their resolution, can be detected by a number of different actors, like the end-user, a quality gate, a monitoring system, an SRE through a ticketing system or even the service itself.
Continuous Operations events are related to the operation of services deployed in target environments.

## Subjects

This specification defines one subject in this stage, the [`incident`](#incident). To quote the definition of the term from the NIST glossary, and [incident][] is:

> An occurrence that actually or potentially jeopardizes the confidentiality, integrity, or availability of an information system or the information the system processes, stores, or transmits or that constitutes a violation or imminent threat of violation of security policies, security procedures, or acceptable use policies.
This specification defines two subjects in this stage: [`incident`](#incident) and [`ticket`](#ticket). Events associated to these subjects can be generated by a number of different actors, such as the end-user, an SRE, a quality gate, a monitoring system, or the service itself.

| Subject | Description | Predicates |
|---------|-------------|------------|
| [`incident`](#incident) | A problem in a production environment | [`detected`](#incident-detected), [`reported`](#incident-reported), [`resolved`](#incident-resolved)|
| [`incident`](#incident) | A problem in a production environment | [`detected`](#incident-detected), [`reported`](#incident-reported), [`resolved`](#incident-resolved) |
| [`ticket`](#ticket) | A ticket in a ticketing system | [`created`](#ticket-created), [`updated`](#ticket-updated), [`closed`](#ticket-closed) |

### `incident`

An `incident` represents a problem in a production environment.
An `incident` represents a problem in a production environment. To quote the definition of the term from the NIST glossary, an [incident][] is:

> An occurrence that actually or potentially jeopardizes the confidentiality, integrity, or availability of an information system or the information the system processes, stores, or transmits or that constitutes a violation or imminent threat of violation of security policies, security procedures, or acceptable use policies.
| Field | Type | Description | Examples |
|-------|------|-------------|----------|
| id | `String` | See [id](spec.md#id-subject)| `04896C75-F34D-40FF-A584-3F2B71CB9D47`, `issue123`, `risk-CVE123` |
| source | `URI-Reference` | See [source](spec.md#source-subject) | `region1/production`, `monitoring-system/metricA`|
| source | `URI-Reference` | See [source](spec.md#source-subject) | `region1/production`, `monitoring-system/metricA` |
| type | `String` | See [type](spec.md#type-subject) | `incident` |
| description | `String` | Short, free style description of the incident | "Response time above 10ms", "New CVE-123 detected" |
| description | `String` | Short, free style description of the incident | `Response time above 10ms`, `New CVE-123 detected` |
| environment | `Object` ([`environment`](./continuous-deployment.md#environment)) | Reference to the environment | `{"id": "production"}`, `{"id": "staging"}`, `{"id": "prod123", "source": "iaas-region-1"}` |
| service | `Object` ([`service`](./continuous-deployment.md#service)) | Reference to the service | `{"id": "service123"}`, `{"id": "service123", "source": "region1/k8s/namespace"}` |
| artifactId | `Purl` | Identifier of the artifact deployed with this service | `0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427`, `927aa808433d17e315a258b98e2f1a55f8258e0cb782ccb76280646d0dbe17b5`, `six-1.14.0-py2.py3-none-any.whl` |

### `ticket`

A ticket can request a change, report a problem, or document an [`incident`](#incident). Any fields not defined by this spec may be included as `customData`.

| Field | Type | Description | Examples |
|-------|------|-------------|----------|
| id | `String` | See [id](spec.md#id-subject)| `04896C75-F34D-40FF-A584-3F2B71CB9D47`, `ticket123`, `risk-CVE123` |
| source | `URI-Reference` | See [source](spec.md#source-subject) | `ticketing-system` |
| type | `String` | See [type](spec.md#type-subject) | `ticket` |
| summary | `String` | The summary provided on the ticket | `Implement feature xyz`, `New CVE-123 detected` |
| ticketType | `Enum or String` | The ticket type | `bug`, `enhancement`, `incident`, `task`, `question`, `custom-value` |
| group | `String` | The group or project the ticket is currently assigned to | `backend` |
| creator | `String` | The ticket author | `Alice` |
| assignees | `List (string)` | Who is currently investigating the ticket | `[Bob]` |
| priority | `Enum or String` | An indicator of the importance of the ticket | `high`, `medium`, `low`, `custom-value` |
| labels | `List (string)` | Labels associated to the ticket | `[productxyz, bug]` |
| milestone | `String` | An ID that represents a goal for when this ticket is to be completed | `123`, `sprint-123`, `Q1` |
| uri | `URI-Reference` | A link to the ticket itself | `https://example.issues.com/ticket123` |
| resolution | `Enum or String` | Indicates the closing status of the ticket | `completed`, `withdrawn`, `custom-value` |
| updatedBy | `String` | The person who updated the ticket | `Bob` |

## Events

### [`incident detected`](examples/incident_detected.json)
Expand All @@ -46,10 +68,10 @@ This event represents an incident that has been detected by a system or human.

| Field | Type | Description | Examples | Mandatory ✅ |
|-------|------|-------------|----------|----------------------------|
| id | `String` | See [id](spec.md#id-subject)| `04896C75-F34D-40FF-A584-3F2B71CB9D47`, `issue123`, `risk-CVE123` ||
| id | `String` | See [id](spec.md#id-subject)| `04896C75-F34D-40FF-A584-3F2B71CB9D47`, `ticket123`, `risk-CVE123` ||
| source | `URI-Reference` | See [source](spec.md#source-subject) | `region1/production`, `monitoring-system/metricA`| |
| type | `String` | See [type](spec.md#type-subject) | `incident` | |
| description | `String` | Short, free style description of the incident | "Response time above 10ms", "New CVE-123 detected" | |
| description | `String` | Short, free style description of the incident | `Response time above 10ms`, `New CVE-123 detected` | |
| environment | `Object` ([`environment`](./continuous-deployment.md#environment)) | Reference to the environment | `{"id": "production"}`, `{"id": "staging"}`, `{"id": "prod123", "source": "iaas-region-1"}` ||
| service | `Object` ([`service`](./continuous-deployment.md#service)) | Reference to the service | `{"id": "service123"}`, `{"id": "service123", "source": "region1/k8s/namespace"}` | |
| artifactId | `Purl` | Identifier of the artifact deployed with this service | `0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427`, `927aa808433d17e315a258b98e2f1a55f8258e0cb782ccb76280646d0dbe17b5`, `six-1.14.0-py2.py3-none-any.whl` | |
Expand All @@ -64,10 +86,10 @@ This event represents an incident that has been reported through a ticketing sys

| Field | Type | Description | Examples | Mandatory ✅ |
|-------|------|-------------|----------|----------------------------|
| id | `String` | See [id](spec.md#id-subject)| `04896C75-F34D-40FF-A584-3F2B71CB9D47`, `issue123`, `risk-CVE123` ||
| id | `String` | See [id](spec.md#id-subject)| `04896C75-F34D-40FF-A584-3F2B71CB9D47`, `ticket123`, `risk-CVE123` ||
| source | `URI-Reference` | See [source](spec.md#source-subject) | `region1/production`, `monitoring-system/metricA`| |
| type | `String` | See [type](spec.md#type-subject) | `incident` | |
| description | `String` | Short, free style description of the incident | "Response time above 10ms", "New CVE-123 detected" | |
| description | `String` | Short, free style description of the incident | `Response time above 10ms`, `New CVE-123 detected` | |
| environment | `Object` ([`environment`](./continuous-deployment.md#environment)) | Reference to the environment | `{"id": "production"}`, `{"id": "staging"}`, `{"id": "prod123", "source": "iaas-region-1"}` ||
| ticketURI | `URI` | URI of the ticket | `example.issues.com/ticket123` ||
| service | `Object` ([`service`](./continuous-deployment.md#service)) | Reference to the service | `{"id": "service123"}`, `{"id": "service123", "source": "region1/k8s/namespace"}` | |
Expand All @@ -86,9 +108,81 @@ This event represents an incident that has been resolved, meaning that the probl
| id | `String` | See [id](spec.md#id-subject)| `04896C75-F34D-40FF-A584-3F2B71CB9D47`, `issue123`, `risk-CVE123` ||
| source | `URI-Reference` | See [source](spec.md#source-subject) | `region1/production`, `monitoring-system/metricA`| |
| type | `String` | See [type](spec.md#type-subject) | `incident` | |
| description | `String` | Short, free style description of the incident resolution | "Response time restored below 10ms", "CVE-123 acknowledged as non-exploitable" | |
| description | `String` | Short, free style description of the incident resolution | `Response time restored below 10ms`, `CVE-123 acknowledged as non-exploitable` | |
| environment | `Object` ([`environment`](./continuous-deployment.md#environment)) | Reference to the environment | `{"id": "production"}`, `{"id": "staging"}`, `{"id": "prod123", "source": "iaas-region-1"}` ||
| service | `Object` ([`service`](./continuous-deployment.md#service)) | Reference to the service | `{"id": "service123"}`, `{"id": "service123", "source": "region1/k8s/namespace"}` | |
| artifactId | `Purl` | Identifier of the artifact deployed with this service | `0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427`, `927aa808433d17e315a258b98e2f1a55f8258e0cb782ccb76280646d0dbe17b5`, `six-1.14.0-py2.py3-none-any.whl` | |

### [`ticket created`](examples/ticket_created.json)

This event represents a ticket that has been created within some ticketing system.

- Event Type: __`dev.cdevents.ticket.created.0.1.0-draft`__
- Predicate: created
- Subject: [`ticket`](#ticket)

| Field | Type | Description | Examples | Mandatory ✅ |
| ------|----- | ----------- | ---------| ------------ |
| id | `String`| See [id](spec.md#id-subject) | `ticket-123` ||
| source | `URI-Reference` | See [source](spec.md#source-subject) | `ticketing-system` | |
| type | `String` | See [type](spec.md#type-subject) | `ticket` | |
| summary | `String` | The summary provided on the ticket | `Implement feature xyz`, `New CVE-123 detected` ||
| ticketType | `Enum or String` | The ticket type | `bug`, `enhancement`, `incident`, `task`, `question`, `custom-value` | |
| creator | `String` | The ticket author | `Alice` ||
| group | `String` | The group the ticket is currently assigned to | `backend` | |
| assignees | `List (string)` | Who is currently investigating the ticket | `[Bob]` | |
| priority | `Enum or String` | An indicator of the importance of the ticket | `high`, `medium`, `low`, `custom-value` | |
| labels | `List (string)` | Labels associated to the ticket | `[productxyz, bug]` | |
| milestone | `String` | An ID that represents a goal for when this ticket is to be completed | `123`, `sprint-123`, `Q1` | |
| uri | `URI-Reference` | A link to the ticket itself | `https://example.issues.com/ticket123` ||

### [`ticket updated`](examples/ticket_updated.json)

This event represents a ticket that has been created within some ticketing system.

- Event Type: __`dev.cdevents.ticket.updated.0.1.0-draft`__
- Predicate: updated
- Subject: [`ticket`](#ticket)

| Field | Type | Description | Examples | Mandatory ✅ |
| ------|----- | ----------- | ---------| ------------ |
| id | `String`| See [id](spec.md#id-subject) | `ticket-123` ||
| source | `URI-Reference` | See [source](spec.md#source-subject) | `ticketing-system` | |
| type | `String` | See [type](spec.md#type-subject) | `ticket` | |
| summary | `String` | The summary provided on the ticket | `Implement feature xyz`, `New CVE-123 detected` | |
| ticketType | `Enum or String` | The ticket type | `bug`, `enhancement`, `incident`, `task`, `question`, `custom-value` | |
| creator | `String` | The ticket author | `Alice` | |
| group | `String` | The group the ticket is currently assigned to | `backend` | |
| assignees | `List (string)` | Who is currently investigating the ticket | `[Bob]` | |
| priority | `Enum or String` | An indicator of the importance of the ticket | `high`, `medium`, `low`, `custom-value` | |
| labels | `List (string)` | Labels associated to the ticket | `[productxyz, bug]` | |
| milestone | `String` | An ID that represents a goal for when this ticket is to be completed | `123`, `sprint-123`, `Q1` | |
| uri | `URI-Reference` | A link to the ticket itself | `https://example.issues.com/ticket123` ||
| updatedBy | `String` | The person who authored the updates | `Bob` | |

### [`ticket closed`](examples/ticket_closed.json)

This event represents a ticket that has been created within some ticketing system.

- Event Type: __`dev.cdevents.ticket.closed.0.1.0-draft`__
- Predicate: closed
- Subject: [`ticket`](#ticket)

| Field | Type | Description | Examples | Mandatory ✅ |
| ------|----- | ----------- | ---------| ------------ |
| id | `String`| See [id](spec.md#id-subject) | `ticket-123` ||
| source | `URI-Reference` | See [source](spec.md#source-subject) | `ticketing-system` | |
| type | `String` | See [type](spec.md#type-subject) | `ticket` | |
| summary | `String` | The summary provided on the ticket | `Implement feature xyz`, `New CVE-123 detected` | |
| ticketType | `Enum or String` | The ticket type | `bug`, `enhancement`, `incident`, `task`, `question`, `custom-value` | |
| creator | `String` | The ticket author | `Alice` | |
| group | `String` | The group the ticket is currently assigned to | `backend` | |
| assignees | `List (string)` | Who is currently investigating the ticket | `[Bob]` | |
| priority | `Enum or String` | An indicator of the importance of the ticket | `high`, `medium`, `low`, `custom-value` | |
| labels | `List (string)` | Labels associated to the ticket | `[productxyz, bug]` | |
| milestone | `String` | An ID that represents a goal for when this ticket is to be completed | `123`, `sprint-123`, `Q1` | |
| uri | `URI-Reference` | A link to the ticket itself | `https://example.issues.com/ticket123` ||
| updatedBy | `String` | The person who authored the updates | `Bob` | |
| resolution | `Enum or String` | Indicates the closing status of the ticket | `completed`, `withdrawn`, `duplicate`, `custom-value` ||

[incident]: https://csrc.nist.gov/glossary/term/incident
27 changes: 27 additions & 0 deletions examples/ticket_closed.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"context": {
"version": "0.4.0-draft",
"id": "F4BD2B55-B6F6-4F44-AF72-BD2D0E7A8708",
"source": "/ticketing/system",
"type": "dev.cdevents.ticket.closed.0.1.0-draft",
"timestamp": "2022-11-11T13:52:20.079Z"
},
"subject": {
"id": "ticket-123",
"source": "/ticketing/system",
"type": "ticket",
"content": {
"summary": "New CVE-123 detected",
"ticketType": "task",
"group": "security",
"creator": "Alice",
"assignees": ["Bob"],
"priority": "high",
"labels": ["bug"],
"milestone": "123",
"uri": "https://example.issues.com/ticket123",
"resolution": "completed",
"updatedBy": "Bob"
}
}
}
25 changes: 25 additions & 0 deletions examples/ticket_created.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"context": {
"version": "0.4.0-draft",
"id": "F4BD2B55-B6F6-4F44-AF72-BD2D0E7A8708",
"source": "/ticketing/system",
"type": "dev.cdevents.ticket.created.0.1.0-draft",
"timestamp": "2022-11-11T13:52:20.079Z"
},
"subject": {
"id": "ticket-123",
"source": "/ticketing/system",
"type": "ticket",
"content": {
"summary": "New CVE-123 detected",
"ticketType": "task",
"group": "security",
"creator": "Alice",
"assignees": ["Bob"],
"priority": "high",
"labels": ["bug"],
"milestone": "123",
"uri": "https://example.issues.com/ticket123"
}
}
}
26 changes: 26 additions & 0 deletions examples/ticket_updated.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"context": {
"version": "0.4.0-draft",
"id": "F4BD2B55-B6F6-4F44-AF72-BD2D0E7A8708",
"source": "/ticketing/system",
"type": "dev.cdevents.ticket.updated.0.1.0-draft",
"timestamp": "2022-11-11T13:52:20.079Z"
},
"subject": {
"id": "ticket-123",
"source": "/ticketing/system",
"type": "ticket",
"content": {
"summary": "New CVE-123 detected",
"ticketType": "task",
"group": "security",
"creator": "Alice",
"assignees": ["Bob"],
"priority": "high",
"labels": ["bug"],
"milestone": "123",
"uri": "https://example.issues.com/ticket123",
"updatedBy": "Bob"
}
}
}
Loading

0 comments on commit fb9dda6

Please sign in to comment.