Skip to content

Commit b6ff952

Browse files
committed
COMP-264 WIP updating documentation for audit secret logging
- Extending audit_log.md to include secret audit events for GraphQL, and information about these events
1 parent 4e3edf4 commit b6ff952

File tree

1 file changed

+144
-0
lines changed

1 file changed

+144
-0
lines changed

pages/pipelines/audit_log.md

+144
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ SCM_PIPELINE_SETTINGS_UPDATED
7373
SCM_SERVICE_CREATED
7474
SCM_SERVICE_DELETED
7575
SCM_SERVICE_UPDATED
76+
SECRET_CREATED
77+
SECRET_DELETED
78+
SECRET_QUERIED
79+
SECRET_READ
80+
SECRET_UPDATED
7681
SSO_PROVIDER_CREATED
7782
SSO_PROVIDER_DELETED
7883
SSO_PROVIDER_DISABLED
@@ -100,3 +105,142 @@ USER_UPDATED
100105
```
101106

102107
You can also set up [Amazon EventBridge](/docs/integrations/amazon-eventbridge) to stream Audit Log events.
108+
109+
110+
## Audit logs for secrets
111+
112+
>📘 Audit logs for secrets do not contain the value or sensitive information about the secret.
113+
114+
115+
Audit logs record information of transactions in which secrets are accessed or modified. The following events will be logged:
116+
* `SECRET_CREATED` This triggers an audit log when a user of an organization initiates the creation of a secret. Secrets can only be created by a user. Below are the fields captured in the audit log for this event.
117+
118+
```
119+
{
120+
"data"=> {
121+
"auditEvent" => {
122+
"__typename" => "AuditEvent",
123+
"id" => "QXVkaXRFdmVudC0tLTAxOGUzZjBkLTIwZGUtNDZhZS1iNTMxLTU5NjRkYWJjY2M2Zg==",
124+
"uuid" => "018e3f0d-20de-46ae-b531-5964dabccc6f",
125+
"type" => "SECRET_CREATED",
126+
"subject" => {
127+
"id" => "QXVkaXRTdWJqZWN0LS0tMDE4ZTNmMGQtMjBkZS00NmFlLWI1MzEtNTk2NGRhYmNjYzZm",
128+
"type" => "SECRET",
129+
"uuid" => "3d01f85a-0436-49cd-a082-6f8e20dd677e",
130+
"node" => {
131+
"__typename" => "Secret",
132+
"uuid" => "3d01f85a-0436-49cd-a082-6f8e20dd677e",
133+
"organization" => {
134+
"name" => "Sunny Spot"
135+
}
136+
}
137+
}
138+
}
139+
}
140+
}
141+
```
142+
143+
* `SECRET_DELETED` This triggers an audit log when a secret is deleted by a user of an organization. This applies exclusively to the destruction of a secret; events related to the revocation or expiration of a secret will not trigger audit logs. Below are the fields captured in the audit log for this event.
144+
```
145+
{
146+
"data" => {
147+
"auditEvent" => {
148+
"__typename" => "AuditEvent",
149+
"id" => "QXVkaXRFdmVudC0tLTAxOGUzZjE1LTk0OTEtNGJjMS1iOTY4LWNkYTdkMzk2ZDU0MA==",
150+
"uuid" => "018e3f15-9491-4bc1-b968-cda7d396d540",
151+
"type" => "SECRET_DELETED",
152+
"subject" => {
153+
"id" => "QXVkaXRTdWJqZWN0LS0tMDE4ZTNmMTUtOTQ5MS00YmMxLWI5NjgtY2RhN2QzOTZkNTQw",
154+
"type" => "SECRET",
155+
"uuid" => "d83e4f1f-cc26-43d7-8d2c-d303243d87ee",
156+
"node" => {
157+
"__typename" => "Secret",
158+
"uuid" => "d83e4f1f-cc26-43d7-8d2c-d303243d87ee",
159+
"organization" => {
160+
"name" => "Sunny Spot"
161+
}
162+
}
163+
}
164+
}
165+
}
166+
}
167+
```
168+
169+
* `SECRET_READ` This triggers an audit event when an actor accesses or reads the value of a secret. Secrets can be read by an agent running a compute job, or read by a user belonging to an organization. Below are the fields captured in the audit log for this event.
170+
171+
```
172+
{
173+
"data" => {
174+
"auditEvent" => {
175+
"__typename" => "AuditEvent",
176+
"id" => "QXVkaXRFdmVudC0tLTAxOGUzZjE5LTlkODgtNDBmZS1iOGIzLTkxMTk5OWNlMmRmMg==",
177+
"uuid" => "018e3f19-9d88-40fe-b8b3-911999ce2df2",
178+
"type" => "SECRET_READ",
179+
"subject" => {
180+
"id" => "QXVkaXRTdWJqZWN0LS0tMDE4ZTNmMTktOWQ4OC00MGZlLWI4YjMtOTExOTk5Y2UyZGYy",
181+
"type" => "SECRET",
182+
"uuid" => "644771e7-10cf-4784-af97-9fdf70402a1c",
183+
"node" => {
184+
"__typename" => "Secret",
185+
"uuid" => "644771e7-10cf-4784-af97-9fdf70402a1c",
186+
"organization" => {
187+
"name" => "Sunny Spot"
188+
}
189+
}
190+
}
191+
}
192+
}
193+
}
194+
```
195+
196+
* `SECRET_QUERIED` This triggers an audit event when a user belonging to an organization or system identity (such as an agent) when a query is performed to find a secret (or secrets). This event will be triggered even if a search for a secret yields no results or if the secret does not exist. Below are the fields captured in the audit log for this event.
197+
```
198+
{
199+
"data" => {
200+
"auditEvent" => {
201+
"__typename" => "AuditEvent",
202+
"id" => "QXVkaXRFdmVudC0tLTAxOGUzZjRlLTdiNGUtNDQ1ZS04MDI3LWQyZGU4ZjY3MDI0Yg==",
203+
"uuid" => "018e3f4e-7b4e-445e-8027-d2de8f67024b",
204+
"type" => "SECRET_QUERIED",
205+
"subject" => {
206+
"id" => "QXVkaXRTdWJqZWN0LS0tMDE4ZTNmNGUtN2I0ZS00NDVlLTgwMjctZDJkZThmNjcwMjRi",
207+
"type" => "SECRET",
208+
"uuid" => "d906f471-92a9-4725-aad5-d7388280e654",
209+
"node" => {
210+
"__typename" => "Secret",
211+
"uuid" => "d906f471-92a9-4725-aad5-d7388280e654",
212+
"organization" => {
213+
"name" => "Sunny Spot"
214+
}
215+
}
216+
}
217+
}
218+
}
219+
}
220+
```
221+
222+
* `SECRET_UPDATED` This triggers an audit event whenever a user within an organization updates the value or properties of a secret. Given that secrets can exist in multiple versions, the audit logs maintain records of these version identifiers and their corresponding updates. Below are the fields captured in the audit log for this event.
223+
```
224+
{
225+
"data" => {
226+
"auditEvent" => {
227+
"__typename" => "AuditEvent",
228+
"id" => "QXVkaXRFdmVudC0tLTAxOGUzZjUxLWViNTMtNGVlZC1hZmRjLWE2ZTdhZjcyMDFkOQ==",
229+
"uuid" => "018e3f51-eb53-4eed-afdc-a6e7af7201d9",
230+
"type" => "SECRET_UPDATED",
231+
"subject" => {
232+
"id" => "QXVkaXRTdWJqZWN0LS0tMDE4ZTNmNTEtZWI1My00ZWVkLWFmZGMtYTZlN2FmNzIwMWQ5",
233+
"type" => "SECRET",
234+
"uuid" => "87a44525-2a66-441a-89f6-8b559364aed9",
235+
"node" => {
236+
"__typename" => "Secret",
237+
"uuid" => "87a44525-2a66-441a-89f6-8b559364aed9",
238+
"organization" => {
239+
"name" => "Sunny Spot"
240+
}
241+
}
242+
}
243+
}
244+
}
245+
}
246+
```

0 commit comments

Comments
 (0)