This is an incomplete and unofficial OPA Rego interpreter. It executes Rego policies using ANTLR4 visitor for the Rego grammar described in rego-grammar module. It is a Java replacement for OPA runtime which is implemented in Go.
Because Java. This library also allows invoking user defined Java functions from Rego policy.
See MergedUTTest.java
for examples.
- Many in-built functions are currently missing (see
ExprLibrary.java
for currently supported functions). - Parts of the grammar are left unimplemented (see test policies for coverage).
- The
some
keyword doesn't support multi-valued resolution (e.g.some i; var[[1, i]]
won't work).
- The
- Policy is processed linearly. This example behaves differently in OPA playground:
package p a{b} b{true}
- No partial evaluation support.
- OPA: https://www.openpolicyagent.org/
- OPA Playground: https://play.openpolicyagent.org/
See CONTRIBUTING for more information.
This project is licensed under the Apache-2.0 License.