1 year ago
#369490
Mauricio Caro
Open Policy Agent (OPA) for front and back end policy evaluation
We have a business application that has a number of policy rules for which OPA seems well suited for. As a simple example: "an order can by modified from status 'X' to 'Y' iif the user is in role 'R'".
We'd ideally like to evaluate some of these rules both on the front and back end. In the FE (on the browser in an Angular app in our case) in order to provide a good user experience (make the field editable or not depending on the evaluation of the rule), and, of course, in the back end as well. Ideally, these rules would be in sync.
I see that "OPA is able to compile Rego policies into executable Wasm modules that can be evaluated with different inputs and external data." (link) There is also a JavaScript SDK so it seems like this could be a viable option.
I have not been able to find questions along these lines or references of anybody doing something similar and I am wondering if this is a good approach or if there may be better alternatives to the issue at hand.
javascript
policy
web-frontend
open-policy-agent
0 Answers
Your Answer