ory / keto

Open Source (Go) implementation of "Zanzibar: Google's Consistent, Global Authorization System". Ships gRPC, REST APIs, newSQL, and an easy and granular permission language. Supports ACL, RBAC, and other access models.
https://www.ory.sh/?utm_source=github&utm_medium=banner&utm_campaign=keto
Apache License 2.0
4.7k stars 342 forks source link

List distinct objects in the namespace #1487

Open domantasVizinis opened 6 months ago

domantasVizinis commented 6 months ago

Preflight checklist

Ory Network Project

No response

Describe your problem

Currently there is no possibility to list distinct objects created in the Namespace. It is possible to query only all relations by specifying the namespace.

Why this feature is useful? Lets say we implement simple RBAC whit roles. It would be useful to first list already created Roles before creating new ones. Also it could serve as an option to narrow down the search.

Describe your ideal solution

Current ListRelationTuples request would be a great place to hold boolean field distinct which would indicate if we want a distinct results or all.

Workarounds or alternatives

Iterate over ListRelationTuples and save distinct results self.

Version

v0.11.1-alpha.0

Additional Context

No response