Evaluate multiple rules in the same REST call #300
-
Good day everyone, I have been implementing Rego policies for a little while now, and I have a question with regards to the OPA REST API. I am using OPA as a policy evaluation tool to determine mergeability for a specific PR state. I am working on a golang application that interacts with a Kubernetes hosted OPA server in the following way:
Let's say I got the following rego files: core-rules.rego (policy) policy1.rego (policy) policy2.rego (policy) The response from step 1 above is a custom object, which looks like so:
With the I assume the API would be the Query API ( Thank you in advance for help and guidance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi there Charles! 👋 The pattern you are describing sounds like dynamic policy composition, where you commonly have a main module, or "router", that helps evaluate any policy relevant to the request based on input or other contextual parameters. Let me know if that article is helpful — I'd be happy to expand on anything you might want to know more about. Have a good weekend! 🙂 |
Beta Was this translation helpful? Give feedback.
Hi there Charles! 👋 The pattern you are describing sounds like dynamic policy composition, where you commonly have a main module, or "router", that helps evaluate any policy relevant to the request based on input or other contextual parameters. Let me know if that article is helpful — I'd be happy to expand on anything you might want to know more about. Have a good weekend! 🙂