Files
onix/policies/compliance.rego
Ayush Rawat 3617c9b4a6 Implement Policy Enforcer Plugin
- Added a new Policy Enforcer plugin to evaluate incoming messages against OPA policies.
- Configurable via YAML with options for policy sources, actions, and query.
- Integrated into existing configuration files for BAP and BPP.
- Updated related tests and documentation for the new functionality.
- Enhanced plugin manager to support Policy Enforcer instantiation.
2026-03-02 20:09:33 +05:30

19 lines
582 B
Rego

package policy
import rego.v1
# Example policy: validate confirm action messages.
# This is a sample policy file. Replace with your actual business rules.
#
# The policy evaluates incoming beckn messages and produces a set of
# violation strings. If any violations exist, the adapter will NACK
# the request.
#
# Available inputs:
# - input: the full JSON message body
# - data.config: runtime config from the adapter config (e.g., minDeliveryLeadHours)
# violations is the set of policy violation messages.
# An empty set means the message is compliant.
violations := set()