Jake Howell
ea00e72063
feat: add rbac specificity for dbpurge ( #21088 )
...
Related to
[`internal#1139`](https://github.com/coder/internal/issues/1139 )
Continuation of #21074
This implements some RBAC role specificity for `dbpurge`, ensuring that
we follow the least-privileged model for removing data from the
database. It is specified as following.
```go
Site: rbac.Permissions(map[string][]policy.Action{
// DeleteOldWorkspaceAgentLogs
// DeleteOldWorkspaceAgentStats
// DeleteOldProvisionerDaemons
// DeleteOldTelemetryLocks
// DeleteOldAuditLogConnectionEvents
// DeleteOldConnectionLogs
rbac.ResourceSystem.Type: {policy.ActionDelete},
// DeleteOldNotificationMessages
rbac.ResourceNotificationMessage.Type: {policy.ActionDelete},
// ExpirePrebuildsAPIKeys
// DeleteExpiredAPIKeys
rbac.ResourceApiKey.Type: {policy.ActionDelete},
// DeleteOldAIBridgeRecords
rbac.ResourceAibridgeInterception.Type: {policy.ActionDelete},
}),
```
| Position | Pull-request |
| -------- | ------------ |
| | [feat: add prometheus observability metrics for
`dbpurge`](https://github.com/coder/coder/pull/21074 ) |
| ✅ | [feat: add rbac specificity for
`dbpurge`](https://github.com/coder/coder/pull/21088 ) |
2025-12-20 01:02:39 +11:00
..
2025-12-14 03:00:03 +00:00
2025-06-20 13:16:55 -06:00
2025-12-11 16:38:54 +01:00
2025-12-15 17:41:47 +00:00
2025-10-23 15:38:49 -05:00
2024-09-18 21:47:53 +10:00
2025-10-15 16:13:59 +00:00
2025-12-15 11:26:41 -06:00
2025-12-15 13:44:44 -09:00
2025-12-15 17:41:47 +00:00
2025-10-16 01:56:43 +11:00
2025-05-27 16:05:03 +04:00
2025-12-20 01:02:39 +11:00
2025-12-03 15:06:00 +04:00
2025-09-30 23:54:21 +01:00
2025-08-19 10:41:33 +02:00
2025-12-15 17:41:47 +00:00
2025-09-03 09:25:49 +04:00
2025-10-02 11:43:13 -06:00
2025-09-24 10:46:50 -06:00
2025-12-20 01:02:39 +11:00
2025-12-08 14:16:00 -09:00
2025-10-09 17:33:57 +11:00
2025-06-20 13:16:55 -06:00
2025-10-02 11:43:13 -06:00
2025-12-04 10:27:56 -08:00
2025-10-23 14:24:54 +02:00
2025-12-08 14:16:00 -09:00
2025-10-15 17:37:37 +00:00
2024-05-13 14:37:51 -04:00
2025-08-16 01:31:00 +10:00
2025-11-20 17:12:25 +01:00
2025-12-15 11:26:41 -06:00
2025-12-15 17:41:47 +00:00
2025-12-11 13:04:13 +00:00
2025-10-23 15:38:49 -05:00
2025-06-17 09:00:32 -08:00
2025-03-18 00:02:47 +01:00
2025-12-20 01:02:39 +11:00
2025-06-20 13:16:55 -06:00
2025-07-08 14:31:05 +00:00
2025-08-07 11:00:31 +10:00
2025-10-23 20:22:51 +03:00
2025-12-09 09:10:54 -06:00
2025-12-15 08:42:08 -08:00
2025-12-14 03:00:03 +00:00
2025-06-20 13:16:55 -06:00
2025-07-08 14:32:46 +00:00
2025-08-22 16:32:35 +10:00
2025-06-20 13:16:55 -06:00
2025-11-12 12:46:39 -06:00
2025-06-26 12:28:00 -06:00
2025-12-15 11:26:41 -06:00
2025-12-14 03:00:03 +00:00
2025-12-09 11:05:12 +00:00
2025-03-31 10:55:44 -04:00
2025-12-15 11:26:41 -06:00
2025-11-17 13:24:12 +00:00
2025-12-16 15:14:59 +00:00
2025-12-16 15:14:59 +00:00
2025-09-26 11:56:34 +02:00
2025-10-24 12:33:56 +01:00
2025-10-09 14:53:08 +02:00
2024-08-01 12:07:19 -05:00
2025-12-15 11:26:41 -06:00
2025-10-29 15:31:41 +00:00
2025-10-27 17:14:16 -06:00
2025-06-16 13:40:45 +00:00
2025-06-20 13:16:55 -06:00
2025-12-15 11:26:41 -06:00
2025-12-15 17:41:47 +00:00
2025-04-09 09:21:17 +01:00
2025-10-21 03:13:11 +00:00
2024-02-27 16:33:32 +00:00
2025-06-25 13:03:32 +00:00
2024-06-11 12:22:59 +10:00
2025-04-22 16:21:15 +00:00
2025-06-24 09:14:41 +01:00
2025-12-15 17:41:47 +00:00
2025-12-15 17:41:47 +00:00
2025-09-04 14:28:29 +10:00
2025-12-08 16:04:56 -06:00
2025-12-15 11:26:41 -06:00
2025-05-15 15:32:52 +01:00
2025-06-20 13:16:55 -06:00
2025-06-20 13:16:55 -06:00
2025-06-12 13:50:50 +03:00
2025-08-19 10:41:33 +02:00
2025-08-19 10:41:33 +02:00
2025-06-20 13:16:55 -06:00
2025-12-15 11:26:41 -06:00
2025-03-26 01:56:39 -05:00
2025-09-22 21:02:56 +04:00
2025-09-30 23:54:21 +01:00
2025-09-30 23:54:21 +01:00
2025-09-11 15:08:57 +02:00
2025-09-11 15:08:57 +02:00
2025-07-03 18:33:47 +02:00
2025-10-02 11:43:13 -06:00
2025-07-03 18:33:47 +02:00
2025-07-03 18:33:47 +02:00
2025-10-23 15:38:49 -05:00
2025-10-22 15:18:42 -05:00
2024-07-25 16:07:53 -05:00
2024-08-28 13:24:28 -05:00
2025-07-15 14:55:34 +10:00
2025-07-15 14:55:34 +10:00
2025-07-28 20:41:49 -05:00
2025-10-02 09:32:40 -05:00
2025-06-24 12:19:19 +02:00
2025-07-28 15:02:26 +01:00
2025-08-21 16:03:34 -04:00
2025-08-21 16:03:34 -04:00
2025-06-20 13:16:55 -06:00
2025-10-06 13:58:37 +02:00
2025-10-06 13:58:37 +02:00
2024-07-25 16:07:53 -05:00
2025-06-16 13:40:45 +00:00
2025-09-26 11:43:32 +02:00
2025-09-26 11:43:32 +02:00
2025-06-20 13:16:55 -06:00
2025-12-08 14:16:00 -09:00
2025-12-15 11:26:41 -06:00
2025-11-13 14:04:12 -06:00
2025-12-15 11:26:41 -06:00
2025-11-12 12:46:39 -06:00
2025-06-20 13:16:55 -06:00
2025-12-15 17:41:47 +00:00
2025-12-17 16:49:40 +04:00
2025-11-28 16:50:59 +00:00
2025-12-17 16:49:40 +04:00
2025-03-27 10:03:53 +00:00
2025-03-27 10:03:53 +00:00
2024-10-22 09:20:54 -05:00
2025-06-18 14:07:53 +00:00
2025-09-05 14:26:46 +01:00
2025-12-15 11:26:41 -06:00
2025-11-25 16:56:42 +02:00
2025-12-15 12:04:01 +04:00
2025-09-03 10:38:42 +04:00
2025-12-15 12:04:01 +04:00
2025-06-20 13:16:55 -06:00
2025-09-26 11:56:34 +02:00
2025-12-15 11:26:41 -06:00
2025-12-18 10:35:04 +00:00
2024-01-18 09:44:05 -06:00
2024-01-18 09:44:05 -06:00
2025-12-15 11:26:41 -06:00
2025-12-18 10:35:04 +00:00
2025-12-15 08:42:08 -08:00
2025-04-16 10:37:09 -06:00
2025-03-26 01:56:39 -05:00