Skip to content

Is it possible to lookup resources for all types and permissions? #1954

Closed Answered by vroldanbet
F21 asked this question in Q&A
Discussion options

You must be logged in to vote

@F21 no, you cannot do a LookupResources for all permissions. You can use SpiceDB's 1.33 new ReflectSchema API that lets you discover which permissions exist on a given resource; with that, you can issue a LookupResources for 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 to ComputablePermissions, which would tell you which permissions would need to be updated in ElasticSearch.

Also do note that this is…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by F21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants