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.
This commit is contained in:
@@ -315,3 +315,11 @@ func extractSchemaVersion(body []byte) string {
|
||||
}
|
||||
return "unknown"
|
||||
}
|
||||
|
||||
// newEnforcePolicyStep creates and returns the enforcePolicy step after validation.
|
||||
func newEnforcePolicyStep(policyEnforcer definition.PolicyEnforcer) (definition.Step, error) {
|
||||
if policyEnforcer == nil {
|
||||
return nil, fmt.Errorf("invalid config: PolicyEnforcer plugin not configured")
|
||||
}
|
||||
return policyEnforcer, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user