Bryan Frimin
b39d880c0f
Switch AuthorizationAttributes to batch and add AuthorizeBatch
...
Change AuthorizationAttributer.AuthorizationAttributes to take a slice
of resource ids and return policy.AttributesByID, so a single SQL
round-trip can load condition attributes for a whole batch. All
coredata implementations are migrated to a single
`WHERE id = ANY(@resource_ids::text[])` query that returns only the
rows it finds.
Authorizer gains:
- AuthorizeBatch — all-or-nothing across a homogeneous (same entity
type, same organization) resource set; rejects mixed entity types,
mixed organizations, and empty batches with structured errors.
- AuthorizeMulti — heterogeneous evaluation that returns one error
per item and writes audit log entries in a single bulk insert.
The single-resource Authorize is rewired to delegate to AuthorizeBatch
so all paths share the same condition evaluation and audit logging.
recordAuditLog is split into buildAuditLogEntry plus a batch insert.
Tests cover the new batch and multi paths, mixed/empty/unsupported
resource cases, audit log batching, and dry-run behaviour.
Signed-off-by: Bryan Frimin <bryan@probo.com >
2026-05-23 13:31:36 -07:00
..
2026-05-21 17:30:33 +02:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 09:27:28 +04:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-13 21:21:39 +02:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-03-21 19:16:19 +01:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-13 21:21:39 +02:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 09:27:28 +04:00
2026-05-20 09:27:28 +04:00
2026-05-20 09:27:28 +04:00
2026-05-20 09:27:28 +04:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-03-25 17:38:32 +01:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 11:46:39 +04:00
2026-05-23 13:31:36 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 11:46:39 +04:00
2026-03-25 17:38:32 +01:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-03-25 17:38:32 +01:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-04-13 14:50:42 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-23 13:31:36 -07:00
2026-05-22 10:20:06 +02:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-04-28 15:28:17 +04:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-13 21:21:39 +02:00
2026-05-23 13:31:36 -07:00
2026-05-22 11:54:44 +02:00
2026-05-22 11:54:44 +02:00
2026-05-20 15:36:47 -07:00
2026-05-20 11:46:39 +04:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-22 14:34:35 +02:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-04-03 11:56:06 +02:00
2026-05-20 15:36:47 -07:00
2026-05-21 14:49:19 +02:00
2026-04-03 11:56:06 +02:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-19 21:44:27 +02:00
2026-04-23 20:50:25 +02:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 09:27:28 +04:00
2026-04-28 13:12:58 +02:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-03-25 17:38:32 +01:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 11:46:39 +04:00
2026-03-25 17:38:32 +01:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-04-27 16:06:44 +04:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-03-25 17:38:32 +01:00
2026-05-20 09:27:28 +04:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-04-03 11:56:06 +02:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 09:27:28 +04:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-15 23:26:02 +02:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:05:08 +04:00
2026-05-20 15:05:08 +04:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 09:27:28 +04:00
2026-05-04 14:13:42 +02:00
2026-05-20 09:27:28 +04:00
2026-04-03 11:56:06 +02:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 11:46:39 +04:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-03-25 17:38:32 +01:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-13 21:21:39 +02:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 11:46:39 +04:00
2026-05-11 15:34:24 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-11 14:52:53 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 15:36:47 -07:00
2026-05-20 09:27:28 +04:00
2026-05-20 15:36:47 -07:00
2026-05-23 13:31:36 -07:00