Refactor Policy Enforcer to Policy Checker
- Renamed the `PolicyEnforcer` interface and related implementations to `PolicyChecker` for clarity and consistency. - Updated configuration keys in YAML files to reflect the new `checkPolicy` terminology. - Adjusted related code, tests, and documentation to support the new naming convention and ensure compatibility. - Enhanced comments and examples for the `checkPolicy` configuration to improve usability.
This commit is contained in:
@@ -66,10 +66,13 @@ modules:
|
||||
id: router
|
||||
config:
|
||||
routingConfig: ./config/local-simple-routing.yaml
|
||||
policyEnforcer:
|
||||
id: policyenforcer
|
||||
checkPolicy:
|
||||
id: opapolicychecker
|
||||
config:
|
||||
policyPaths: "./policies"
|
||||
type: file
|
||||
location: ./pkg/plugin/implementation/opapolicychecker/testdata/example.rego
|
||||
query: "data.policy.result"
|
||||
refreshIntervalSeconds: "300"
|
||||
middleware:
|
||||
- id: reqpreprocessor
|
||||
config:
|
||||
@@ -77,7 +80,7 @@ modules:
|
||||
role: bap
|
||||
steps:
|
||||
- validateSign
|
||||
- policyEnforcer
|
||||
- checkPolicy
|
||||
- addRoute
|
||||
|
||||
- name: bapTxnCaller
|
||||
@@ -167,13 +170,16 @@ modules:
|
||||
id: router
|
||||
config:
|
||||
routingConfig: ./config/local-simple-routing-BPPReceiver.yaml
|
||||
policyEnforcer:
|
||||
id: policyenforcer
|
||||
checkPolicy:
|
||||
id: opapolicychecker
|
||||
config:
|
||||
policyPaths: "./policies"
|
||||
type: file
|
||||
location: ./pkg/plugin/implementation/opapolicychecker/testdata/example.rego
|
||||
query: "data.policy.result"
|
||||
refreshIntervalSeconds: "300"
|
||||
steps:
|
||||
- validateSign
|
||||
- policyEnforcer
|
||||
- checkPolicy
|
||||
- addRoute
|
||||
|
||||
- name: bppTxnCaller
|
||||
|
||||
Reference in New Issue
Block a user