Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for reverse queries for #1215

Closed
fsedano opened this issue Dec 6, 2023 · 5 comments
Closed

Support for reverse queries for #1215

fsedano opened this issue Dec 6, 2023 · 5 comments
Labels
enhancement New feature or request Stale

Comments

@fsedano
Copy link

fsedano commented Dec 6, 2023

Summary

Is there a way to do reverse lookup of users and subjects?

I'm evaluating OpenFGA against SpiceDB. One very nice feature in SpiceDB is it supports both LookupResources and LookupSubjects. I only saw 'list-objects' API in OpenFGA (that would be equivalent of 'LookupResources) but I could not find the opposite.

I.e. I want both 'which users have READER relation with DOC1' and 'Which docs can USER1 access as READER'

@fsedano fsedano added the bug Something isn't working label Dec 6, 2023
@rhamzeh rhamzeh added enhancement New feature or request and removed bug Something isn't working labels Dec 6, 2023
@rhamzeh
Copy link
Member

rhamzeh commented Dec 6, 2023

Hi @fsedano! Thanks for asking.

Right now we do not have it yet, however it is an upcoming feature in our roadmap as ListUsers

Until we have that endpoint, you can get the same result by recursively calling Expand to re-build the graph permissions on your end and get the list of users with access.

You can see that being done in the Playground for example when you query something like: who is related to repo:openfga/openfga as admin? in the sample GitHub Store
Screenshot 2023-12-06 at 8 57 21 AM

Canonical did the same by wrapping Expand: https://github.com/canonical/ofga/blob/main/client.go#L490-L522

Copy link

It appears this issue has been stale for at least 14 days 🗓️. If no action is taken the maintainer team may consider closing the issue. Please reach out if you need feedback or follow up actions from the maintainer team.

@github-actions github-actions bot added the Stale label Dec 21, 2023
@aaguiarz
Copy link
Member

This is in our roadmap already

@willvedd willvedd mentioned this issue Mar 8, 2024
4 tasks
@fsedano
Copy link
Author

fsedano commented Mar 19, 2024

@aaguiarz We discussed about this on Kubecon today, from what I understood is already shipping? Your response above suggests it's on roadmap.

@aaguiarz
Copy link
Member

Hi @fsedano , what we shipped is ListObjects, we are currently working on ListUsers, the RFC is here https://github.com/openfga/rfcs/blob/main/20231214-listUsers-api.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Stale
Projects
None yet
Development

No branches or pull requests

3 participants