Skip to content
This repository has been archived by the owner on Feb 13, 2025. It is now read-only.

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 <stephan@styra.com>
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

Signed-off-by: Stephan Renatus <stephan@styra.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant