suvodeep-pyne opened a new pull request, #16766: URL: https://github.com/apache/pinot/pull/16766
## Summary This PR updates the audit configuration system to use component-specific configuration prefixes, enabling different audit configurations for controller, broker, and server components. ## Changes ### 1. **Dynamic Prefix Construction in AuditConfigManager** - Added `ServiceRole` parameter to constructor to identify the component type - Changed config prefix from static `"pinot.audit"` to dynamic `"pinot.audit.controller"` (with TODO for other components) - Made the prefix an instance variable (`_configPrefix`) constructed based on service role - Added mapping for service roles to their config prefix suffixes ### 2. **Updated AuditServiceBinder** - Added `ServiceRole` parameter to constructor - Passes service role to `AuditConfigManager` during initialization - Controller passes its service role when creating the binder ### 3. **Configuration Properties** All audit configuration properties now use the component-specific prefix: - `pinot.audit.controller.enabled` - `pinot.audit.controller.capture.request.payload.enabled` - `pinot.audit.controller.capture.request.headers` - `pinot.audit.controller.request.payload.size.max.bytes` - `pinot.audit.controller.url.filter.exclude.patterns` - `pinot.audit.controller.userid.header` - `pinot.audit.controller.userid.jwt.claim` ### 4. **Test Updates** - Updated all tests to use the new `pinot.audit.controller` prefix - Tests now instantiate `AuditConfigManager` with `ServiceRole.CONTROLLER` - Fixed static method calls to pass the audit config prefix as a parameter ## Benefits - **Component Isolation**: Each Pinot component can have its own audit configuration - **Extensibility**: Easy to add broker/server/minion-specific audit configs in the future - **Backward Compatibility**: Controller maintains the same configuration structure, just with updated prefix - **Clear Architecture**: Service role determines configuration namespace ## Testing - All existing tests pass with updated configuration prefix - Tested configuration updates via cluster config changes - Verified proper prefix construction based on service role ## Future Work - TODO comment added for implementing broker/server/minion-specific configurations - Currently all components fall back to controller prefix until their specific implementations are added -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
