Is it possible to lookup resources for all types and permissions? #1954
-
|
I am currenly using zed to test out SpiceDB and am testing the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
@F21 no, you cannot do a Consider that you'd need to update your denormalized permissions in ElasticSearch every time a write affecting your authorization happens. You can also use another Reflection API to help you here: Also do note that this is what we built our commercial Authzed Materialize for: to help users build a normalized form of your computed permissions: https://authzed.com/blog/materialize-early-access |
Beta Was this translation helpful? Give feedback.
@F21 no, you cannot do a
LookupResourcesfor all permissions. You can use SpiceDB's 1.33 newReflectSchemaAPI that lets you discover which permissions exist on a given resource; with that, you can issue aLookupResourcesfor each permission.Consider that you'd need to update your denormalized permissions in ElasticSearch every time a write affecting your authorization happens. You can also use another Reflection API to help you here:
ComputablePermissions. You'd need to listen to the Watch API to get the changes applied to your SpiceDB, and then send that toComputablePermissions, which would tell you which permissions would need to be updated inElasticSearch.Also do note that this is…