-
Notifications
You must be signed in to change notification settings - Fork 12
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
Partial Evaluation #20
Comments
Hi @kevinmichaelchen ! :) - I Love how on top of things you are . |
@orweis — Thanks for the fast response! Amazing to hear! I will stay tuned. |
Hey, it looks like there is partial evaluation in Cedar now https://cedarland.blog/usage/partial-evaluation/content.html. Will it also be added to cedar agent? |
We were just discussing this the other day. Any takers on helping with a PR here? |
I can try to take a look at the required actions here tomorrow and see how hard it is to add this to cedar-agent API |
Took a look at the source of the partial evaluation feature. |
Is Cedar Agent able to support Partial Evaluation?
In this permit.io video with Mike Hicks and the Cedar team, they present a Partial Evaluation feature that lets you answer the question:
The result is a series of residual expressions that can enumerate all of the allowed resources, from which we can derive a where clause (e.g.,
WHERE id IN [1, 2, 3]
) to constrain which resources get retrieved by the database, thereby saving unnecessary data transfer.Impact
The impact of this feature would be huge for service calls dealing with large batches of resources, which may only be partially accessible to the principal.
Example Scenario
Consider a university application where teachers may only view data (subjects, classroom blocks, other teachers, etc.) that they specifically teach.
We could try to model this fine-grained authorization logic using
where
clauses, but eventually, the database may exhaust its ability to do so. (Maybe, for example, authz decisions will be decided by data that simply is not in the database, e.g., Salesforce or some other external system).Current Approach
My current approach to make sure the client sees only what is accessible is to:
I can't help but think an approach using Partial Evaluation would be cleaner.
The text was updated successfully, but these errors were encountered: