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:
@@ -79,6 +79,11 @@ func (m *mockPluginManager) SchemaValidator(ctx context.Context, cfg *plugin.Con
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// PolicyEnforcer returns a mock policy enforcer implementation.
|
||||
func (m *mockPluginManager) PolicyEnforcer(ctx context.Context, cfg *plugin.Config) (definition.PolicyEnforcer, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// TestRegisterSuccess tests scenarios where the handler registration should succeed.
|
||||
func TestRegisterSuccess(t *testing.T) {
|
||||
mCfgs := []Config{
|
||||
|
||||
Reference in New Issue
Block a user