without knowing more details about the use case, I...
# spicedb
j
without knowing more details about the use case, I can say that calling LS for each resource ID would be slow, at least. I imagine there is a better approach
a
Here's some more detail: i have this schema, and I need to query spicedb to synchronise permission on an other database
So if I know the database beforehand, I can call LS for a specific database, e.g. to list all subjects who have the "only_read" permission
But if I don't, I have to find a way to know them all and query each one (which would indeed be slow but is not a dealbreaker in my configuration)
j
is that the only permission you want synchronized?
a
Yes
j
and this is to determine which user(s) have access to which database(s)?
if so, https://github.com/authzed/spicedb/issues/207 is a proposal that might help once ready
a
Interesting, thanks
I'll keep an eye on this, and hack something in the meantime
Thank you for your time
j
> I have to find a way to know them all probably doable just by ReadRelationships to get the resource IDs for the database
or getting the IDs on your side
a
Yeah i thought about that, or I might go with a direct query to the datastore
Something like
select distinct namespace as objectType, object_id as objectId from relation_tuple where namespace = 'database'