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

Batch check request #812

Closed
3 of 6 tasks
zepatrik opened this issue Jan 10, 2022 · 8 comments
Closed
3 of 6 tasks

Batch check request #812

zepatrik opened this issue Jan 10, 2022 · 8 comments
Labels
feat New feature or request. rfc A request for comments to discuss and share ideas.

Comments

@zepatrik
Copy link
Member

Preflight checklist

Describe your problem

In some cases it makes sense to do multiple checks at the same time. This can be used e.g. to create a list of all permissions for the UI, or similar things.

Describe your ideal solution

We can provide a batch check API. It would make sense especially for cases where subjects and/or objects are the same, so that we can reuse already done queries internally.

Workarounds or alternatives

Doing multiple check requests. This has the overhead of the transport, as well as reduced performance optimization possibilities.

Version

all

Additional Context

No response

@zepatrik zepatrik added feat New feature or request. rfc A request for comments to discuss and share ideas. labels Jan 10, 2022
@Fylipp
Copy link

Fylipp commented Jan 10, 2022

This would help me and my team with the product we are building. We have paginated endpoints that return lists of resources that are sorted and filtered via Mongo queries. Afterwards, we would like to check the user permissions of all items in the page, but at the moment we are forced to do a separate check per item. Implementing this would allow us to only call the API once and speed things up.

@ryukinix
Copy link
Contributor

That feature would help my team. We have a feature-store and complex data system, we are in the process of making this a platform beyond the company internal usage for data science, but a product (external usage). At some point we have to list a catalog of datasets that the user have access. We have a 1000+ datasets.

I thought initially that we could do something similar with keto using GET /relation-tuples/expand or GET /relation-tuples by querying with a fixed namespace and subject_id, but for my surprise it didn't what I expected.

@istarkov
Copy link

istarkov commented Feb 3, 2023

Or the ability to expand without setting relation would help too. The case that UI depends on the current permit and in our case it causes 8 checks. i.e. does the user have xxx permit, does the token have xxx permit, where xxx = list[vew, edit, build, own]

@shashimalcse
Copy link

We are encountering a similar issue where we need to send multiple check requests to keto. It would be more efficient to have a batch request in order to reduce the transport overhead.

@ryukinix
Copy link
Contributor

ryukinix commented Jun 8, 2023 via email

@shashimalcse
Copy link

Can we introduce a batch operation endpoint (both gRPC and REST) that allows us to send multiple tuples for the check with a single request?

@AkScriptHS
Copy link

I'm running into the same requirement of having a dynamic UI based on the permissions, at the moment I'm forced to check permissions one by one.

@alnr
Copy link
Collaborator

alnr commented Nov 18, 2024

Closed via #1521

@alnr alnr closed this as completed Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request. rfc A request for comments to discuss and share ideas.
Projects
None yet
Development

No branches or pull requests

7 participants