Refactor Policy Enforcer Configuration

- Updated the Policy Enforcer configuration across multiple YAML files to use a unified `policyDir` instead of individual policy sources.
- Changed the step name from `enforcePolicy` to `policyEnforcer` for consistency.
- Enhanced the documentation to clarify the use of `policyUrls`, `policyDir`, and `policyFile` for policy sources.
- Adjusted related code and tests to accommodate the new configuration structure.
- Added documentation for using YAML folded scalar (>-) to keep long comma-separated policyUrls values readable across multiple lines.
This commit is contained in:
Ayush Rawat
2026-03-03 10:04:22 +05:30
parent 3617c9b4a6
commit e22b79e137
9 changed files with 123 additions and 41 deletions

View File

@@ -89,9 +89,7 @@ modules:
policyEnforcer:
id: policyenforcer
config:
policySources: "./policies/compliance.rego"
actions: "confirm"
query: "data.policy.violations"
policyDir: "./policies"
middleware:
- id: reqpreprocessor
config:
@@ -99,7 +97,7 @@ modules:
role: bap
steps:
- validateSign
- enforcePolicy
- policyEnforcer
- addRoute
- validateSchema