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

Prevent infinite loop in expand checks #316

Closed
robinbraemer opened this issue Nov 14, 2020 · 2 comments
Closed

Prevent infinite loop in expand checks #316

robinbraemer opened this issue Nov 14, 2020 · 2 comments
Labels
corp/m6 Up for M6 at Ory Corp.

Comments

@robinbraemer
Copy link
Contributor

robinbraemer commented Nov 14, 2020

Is your feature request related to a problem? Please describe.

We need to make sure that checks that expand subject sets do not get stuck in infinite loop in case one tuple closes a cycle with a SubjectSet to an already known object#relation in the same request context.

I think we should not analyze and prevent such to happen upfront at write time of the tuple since this analysis may result in very high latency since multiple database lookups would be required for each new tuple insertion.

Instead we can propagate context including already traversed object#relation subjects so inherent checks are deduplicated and cyclic behaviour is cut.

...except the “Leopard” secondary indexing system will already help to prevent such loop situation in the first place.

@robinbraemer robinbraemer added this to the Next Gen Keto milestone Nov 14, 2020
@zepatrik
Copy link
Member

I decided that the expand API has a required parameter depth that defines the maximum depth of the constructed tree. I think all clients can determine some depth that is required. In fact, you can interpret the trees like lists as well, so you can apply the same concepts as with list pagination. Only difference is that there is more than one "next page", i.e. one for every subject set leaf.

@zepatrik zepatrik added the corp/m6 Up for M6 at Ory Corp. label Mar 29, 2021
@zepatrik
Copy link
Member

closed in #623

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
corp/m6 Up for M6 at Ory Corp.
Projects
None yet
Development

No branches or pull requests

2 participants