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

rego-for-filters: converting to conditions #469

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

srenatus
Copy link
Member

@srenatus srenatus commented Dec 5, 2024

This is an experiment:

  • We're using Rego written with filtering in mind.
  • It's partially-evaluated on request, and
  • the result is converted to conditions

The conditions are used for converting them into filtering rules with server/node.

Shortcuts

  1. The OPA policy is calling the same server's Compile API. ♻️
  2. The UX for errors or a filter-policy outside of the valid subset is bad: it'll just yield undefined.
  3. This approach doesn't solve the question of how to (unit) test it.

This is an experiment:
* We're using Rego written with filtering in mind.
* It's partially-evaluated on request, and
* the result is converted to conditions

The conditions are used for converting them into filtering rules
with server/node.

Signed-off-by: Stephan Renatus <[email protected]>
@srenatus srenatus force-pushed the sr/rego-for-filters branch from 1c6341f to bf1aa5c Compare December 9, 2024 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant