Query plan: how to evaluate ast json response? #1538
-
Hello cerbos community, First, thank you for the great product.
Is there a way to evaluate this ast condition expressions, given in json response? If I could reconstruct it back either to ast or something else I can evaluate on my own, it would be great to see which tools are available. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
TLDR: Not now, but something of this kind is coming - if I got what you mean. I'd like to understand your use case better. In order to evaluate the AST returned by the planner, you need to provide resource attributes. That means you have both the principal and the resource attributes to use the CheckResources API. Do you want to avoid (remote) calls to CheckResources API and evaluate the policy locally? |
Beta Was this translation helpful? Give feedback.
You can batch up to 50 resources in a single request. This number is also configurable. Our performance tests show that CheckResource API is extremely responsive. The exact latency number depends on many factors. Are you targeting any particular latency value?
We aim to eliminate these where possib…