You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(coderd/audit): include API key metadata in audit logs
For any action authenticated via an API key, the audit log now includes
metadata about the key used for the request. This provides visibility
into the permissions used to perform an action.
The metadata is stored in the `request_api_key` field within the
`additional_fields` payload and includes the key's ID, name, scopes,
allow list, and its effective/expanded scope.
Additionally, when an API key is the subject of a create, update, or
delete action, its own metadata is now stored in the `api_key` field
to provide a more complete record of the change.
Copy file name to clipboardExpand all lines: coderd/rbac/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,14 +88,14 @@ an unbounded set of resource IDs that be added to an "allow_list", as the number
88
88
89
89
The use case for specifying this type of permission in a role is limited, and does not justify the extra cost. To solve this for the remaining cases (eg. workspace agent tokens), we can apply an `allow_list` on a scope. For most cases, the `allow_list` will just be `["*"]` which means the scope is allowed to be applied to any resource. This adds negligible cost to the role evaluation logic and 0 cost to partial evaluations.
90
90
91
-
Example of a scope for a workspace agent token, using an `allow_list` containing a single resource id.
91
+
Example of a scope for a workspace agent token, using an `allow_list` containing a single resource typed entry. Create operations only require the allow_list to include the resource type (or a wildcard entry); read, update, and delete operations still demand explicit ID membership.
92
92
93
93
```javascript
94
94
"scope": {
95
95
"name":"workspace_agent",
96
96
"display_name":"Workspace_Agent",
97
97
// The ID of the given workspace the agent token correlates to.
0 commit comments