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

wip: prototype data policies #8

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

wip: prototype data policies #8

wants to merge 2 commits into from

Conversation

srenatus
Copy link
Member

Goes together with https://github.com/StyraInc/enterprise-opa-private/pull/2142.

Only uses the "orders" example, the "school" example is broken now.

Goes together with StyraInc/enterprise-opa-private#2142.

Only uses the "orders" example, the "school" example is broken now.

Signed-off-by: Stephan Renatus <[email protected]>
const main = await putPolicy("main.rego", rego);
if (!main.ok) {
throw new Error(`data policy: ${main.statusText}`);
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll just update the policies via the Policy API for now. It's good enough for prototyping, we don't need multiplayer support (i.e. the Preview API)

# TODO(sr): this is just good enough, the actual API is TBD
partial_eval(inp, unknowns, query) := http.send({
"method": "POST",
"url": "http://127.0.0.1:8181/v1/schmompile",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we're hitting the special endpoint of EOPA that'll end up doing PE post-analysis: https://github.com/StyraInc/enterprise-opa-private/pull/2142

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