Conversion of Rules defined in Json to Rego #610
Unanswered
trinoy
asked this question in
OPA and Rego
Replies: 2 comments 5 replies
-
Converting the JSON policy in an automated way isn't a simple job, but using the JSON from rego is doable: https://play.openpolicyagent.org/p/UQnIce70En It's not the cleanest policy, but it might unblock you. My recommendation would be to take the time and re-write the policy in Rego in the long term but the example above might allow you to make some quick progress with OPA initially. Lmk how that goes. |
Beta Was this translation helpful? Give feedback.
1 reply
-
FWIW we did some experiments in generating Rego code from an OpenAPI spec if that's helpful. See this for details. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello Team,
We are trying to build an layer on top of rego to enable developers to writes policy in JSON and down the line may be though a user interface(which can generate a JSON). For example something like
We would like to convert this to something
Could you please help us if there is a way to support this via UDF functions , Json to rego AST etc. Would like to understand if this is possible and if yes what direction we should look into
Thanks
Trinoy
Beta Was this translation helpful? Give feedback.
All reactions