stanfyr
07/30/2026, 5:08 PMstanfyr
07/30/2026, 5:09 PMJoey
07/30/2026, 5:13 PMJoey
07/30/2026, 5:13 PMJoey
07/30/2026, 5:13 PMm_toi
08/03/2026, 2:47 PM___korzhik___
08/04/2026, 1:48 PMzedtoken in a microservice architecture when permissions are granted/revoked by admins?
For granting permissions, there is no big problem. You can grant the permission in one service and eventually send the zedtoken to another service or store it in a DB. It is acceptable if the user gets access a couple of seconds later.
But what happens when we remove/revoke a permission? Revoking a permission should ideally take effect immediately.
Imagine an admin revokes a user's permission in one service/pod. We then need to propagate the corresponding zedtoken to the service handling the user's queries as quickly as possible.
If everything is handled within one microservice, we have the problem of storing the zedtoken in two databases (SpiceDB and our DB). Potentially, we could lose the latest zedtoken if our DB transactions fail.
If the permission management and user queries are handled by different microservices, we have the same persistence problem, plus eventual consistency. We need to somehow transfer the zedtoken to another microservice, which could take some time depending on the implementation (Kafka, etc.).
So, in this case, understanding whether a relation was deleted by an admin is not immediately possible unless we use fully_consistent for such queries.
Am I missing something here? Is there a recommended pattern for handling zedtoken propagation in this kind of architecture, especially when permission revocation needs to take effect immediately?
Thanks in advance.illest_eel
08/06/2026, 8:34 AMpg_dump/restore is not recommended and instead we should be using zed backup for backups.
For the same reasons, should RDS automated backups be avoided, or are they fine as those are physical snapshots of storage rather than logical backups produced by pg_dump?.pxdr
08/11/2026, 10:37 AMlorenzo_98254
08/13/2026, 11:07 AMdefinition resource {
relation workspace: workspace
permission view = workspace->can_view_resources
permission edit = workspace->can_edit_resources
permission manage = workspace->can_manage_resources
}
To list resources, we currently:
- Use fully consistent ReadRelationships to retrieve every resource ID associated with the workspace.
- Pass those IDs to PostgreSQL using WHERE id IN (...).
- Apply filtering, sorting, counting, and pagination in PostgreSQL.
A real request for 50 rows generated a query containing hundreds of IDs and took approximately six seconds:
SELECT *
FROM resources
WHERE id IN (<hundreds of IDs>)
AND deleted_at IS NULL
ORDER BY created_at DESC
LIMIT 50;
We haven’t confirmed that the large IN clause is the only cause, but the query size grows with the workspace’s total number of resources rather than the requested page size.
We’re considering making PostgreSQL authoritative for ownership and discoverability:
resources.owner_workspace_id
resource_workspace_access(resource_id, workspace_id)
SpiceDB would remain responsible for deciding whether a workspace or user can view, edit, or manage a resource.
My questions are:
- Is our current ReadRelationships → PostgreSQL IN (...) approach an intended SpiceDB pattern, or are we using SpiceDB incorrectly?
- Is PostgreSQL ownership/discovery combined with SpiceDB action authorization a better architectural boundary?
- For resources shared across workspaces, where should that relationship live, and how would you keep PostgreSQL and SpiceDB consistent?
Any feedback or examples from similar systems would be very helpful.shap5775
08/13/2026, 7:11 PMdystopiandev
08/24/2026, 11:57 PMJoey
08/25/2026, 2:51 AMmor_9580
08/27/2026, 2:06 PM.svippe
09/07/2026, 8:55 AMsilas_30141
09/29/2026, 6:53 PMtupyy_32530
10/13/2026, 7:30 AM-> or #. What is the best pattern here or gotchas? So my schema is
definition user{}
definition platform {
relation admin: user
relation member: user
permission admins = admin
permission members = admin + member
}
definition group {
relation member: user
relation manager: user
relation platform: platform
permission membership = member + manager + platform->members
permission view = member + manager + platform->members
permission edit = platform->admins
permission manage = manager + platform->admins
permission delete = platform->admins
}
definition service {
relation public: user:*
relation user: user | group#membership
permission access = public + user
}
definition assessment {
relation owner: user
relation editor: user | group#membership
relation viewer: user | group#membership
permission read = owner + viewer + editor
permission edit = owner + editor
permission share = owner
permission delete = owner
}
in group definition I'm pointng to platform->members so my question: Where should platform->members point to a relation or a permission? I'm not sure my question is clear..sorrydestini10
11/06/2026, 1:26 PMJoey
11/06/2026, 3:49 PMserve-testing?destini10
11/06/2026, 3:50 PMdestini10
11/06/2026, 3:52 PMdestini10
11/06/2026, 3:53 PMJoey
11/06/2026, 4:16 PMJoey
11/06/2026, 4:16 PMJoey
11/06/2026, 4:17 PMJoey
11/06/2026, 4:17 PMdestini10
11/06/2026, 4:18 PMJoey
11/06/2026, 4:19 PMJoey
11/06/2026, 4:20 PMdestini10
11/06/2026, 5:35 PM