Enhance Policy Enforcer Configuration and Add Benchmark Tests
- Added detailed comments and examples for the `policyPaths` configuration in both BAP and BPP YAML files to improve clarity on usage. - Introduced a new benchmark test suite for the Policy Enforcer to evaluate performance under varying rule counts, measuring both evaluation and compilation times.
This commit is contained in:
@@ -87,6 +87,16 @@ modules:
|
||||
policyEnforcer:
|
||||
id: policyenforcer
|
||||
config:
|
||||
# policyPaths: polymorphic, auto-detects each entry as URL, directory, or file
|
||||
# Examples:
|
||||
# policyPaths: "./policies" # local directory
|
||||
# policyPaths: "https://example.com/compliance.rego" # remote URL
|
||||
# policyPaths: "./policies/compliance.rego" # local file
|
||||
# For multiple sources, use YAML folded scalar (>-):
|
||||
# policyPaths: >-
|
||||
# https://example.com/compliance.rego,
|
||||
# https://example.com/safety.rego,
|
||||
# ./policies
|
||||
policyPaths: "./policies"
|
||||
steps:
|
||||
- validateSign
|
||||
@@ -149,7 +159,12 @@ modules:
|
||||
config:
|
||||
contextKeys: transaction_id,message_id
|
||||
role: bpp
|
||||
policyEnforcer:
|
||||
id: policyenforcer
|
||||
config:
|
||||
policyPaths: "./policies"
|
||||
steps:
|
||||
- policyEnforcer
|
||||
- addRoute
|
||||
- sign
|
||||
- validateSchema
|
||||
|
||||
Reference in New Issue
Block a user