spicedb icon indicating copy to clipboard operation
spicedb copied to clipboard

Feature request: for a given subject and resource, return the applicable permissions (reflection)

Open DonDebonair opened this issue 2 years ago • 3 comments

I saw this issue and mistakenly thought it would solve a requirement I have: Given a subject and a specific resource, return the permissions the subject has on that resource.

To be clear, this is about a specific resource instance, not a type.

Example: For user 123, return all the permissions they have on order 456.

Questions:

  • Is this something SpiceDB can already do, but I missed it in the documentation?
  • If not, is this something you're planning to build?
  • Are there performant workarounds in the meantime?

DonDebonair avatar Feb 17 '23 10:02 DonDebonair

@DonDebonair the suggestion today is to issue Checks in parallel for each of the permissions you want to check on that resource. gRPC will execute the Checks in parallel over the connection.

josephschorr avatar Feb 17 '23 15:02 josephschorr

If the resource is not yet created and i want to know all the permissions that are applicable how would that be done?

dvdthecoder avatar Aug 19 '23 12:08 dvdthecoder

If the resource is not yet created and i want to know all the permissions that are applicable how would that be done?

See: https://github.com/authzed/spicedb/issues/613

josephschorr avatar Aug 20 '23 04:08 josephschorr