Is partial evaluation supported?

Open
#604 11 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
rust
Domain
backend, security

Research direction

Start with Regorus's evaluation engine and the linked Open Policy Agent partial-evaluation documentation. Trace whether the current engine can produce reusable filtering queries instead of only per-item allow results. Done means determining whether partial evaluation is already supported and documenting the scope of any engine or interface changes required.

Written by the indexing model from the issue text.

Description

I was trying to figure out whether regorus supports partial evaluation (as outlined in the docs of the official implementation https://www.openpolicyagent.org/docs/filtering/partial-evaluation), to support use-cases like data filtering? From what I can tell this isn't possible right now, but it's also not quite clear to me whether adding support for that would be something that requires invasive changes to the engine, or it's just a specialized high-level interface that would work with the current internals.

Right now I'm doing policy enforcement/data filtering over lists of data by doing a best-effort approximation SQL query that mimicks the policy structure to retrieve a list of candidates, and then doing an allow query for each item in the set. This does work, but also risks either under-fetching (losing out on some items) or over-fetching (in certain edge-cases significant additional query latency from the DB). Optimally I could mostly re-use some of the Rego policy and build the queries based on partial evaluation.

Dominant language
Rust
Stars
375
Forks
81
Avg merge
1d 11h
Merged PRs (30d)
78

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • No Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/regorus

All issues in microsoft/regorus

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.