KilnVM Live Labs /lab/opa-rego-policy-playground
Step 1 of 3 Docs Build Your Own

Evaluate and Test Rego Authorization Policies with OPA

Evaluate Open Policy Agent Rego rules against JSON payloads, repair an overly permissive production policy, and pass automated opa test suites offline.

Step 1 of 3

Evaluate input.json with opa eval

Inspect how /workspace/rbac.rego currently evaluates /workspace/input.json (a developer deploying to staging) and save the result to eval.txt:

bash
opa eval -d rbac.rego -i input.json "data.authz.allow" -f raw > eval.txt && cat eval.txt

Click Check Step to continue.