suvodeep-pyne opened a new pull request, #16823:
URL: https://github.com/apache/pinot/pull/16823

   ## Summary
   
   This PR extends the existing audit logging infrastructure from the 
controller to support broker REST APIs. The implementation follows the same 
pattern used in the controller, enabling audit logging for broker query and 
admin endpoints.
   
   ## Changes
   
   ### 1. BrokerAdminApiApplication.java
   - Added AuditLogFilter registration to intercept Jersey requests for audit 
logging
   - Filter is registered alongside other filters like AuthenticationFilter
   
   ### 2. BaseBrokerStarter.java
   - Added DefaultClusterConfigChangeHandler field to handle dynamic cluster 
configuration updates
   - Registered the config change handler with Helix manager for real-time 
config updates
   - Integrated AuditServiceBinder in createBrokerAdminApp() to wire up audit 
dependencies
   - Marked existing _clusterConfigChangeHandlers as deprecated in favor of 
dedicated config handler
   
   ## Design Decisions
   
   - **Direct Helix Registration**: Following the controller pattern, the 
DefaultClusterConfigChangeHandler is registered directly with the Helix manager 
rather than through broker's ClusterChangeHandler infrastructure
   - **Reuse Existing Infrastructure**: All audit components from pinot-common 
are reused without modification
   - **Service-specific Configuration**: Broker uses pinot.audit.broker.* 
configuration prefix, separate from controller
   
   ## Configuration
   
   To enable audit logging for broker, add these properties to cluster 
configuration:
   
   ```properties
   pinot.audit.broker.enabled=true
   pinot.audit.broker.capture.request.payload.enabled=true
   pinot.audit.broker.request.payload.size.max.bytes=8192
   pinot.audit.broker.url.filter.include.patterns=/query.*,/routing.*
   pinot.audit.broker.capture.request.headers=Authorization,X-Request-ID
   ```
   
   ## Testing
   
   - Compilation verified for both pinot-common and pinot-broker modules
   - Audit logging is disabled by default, ensuring no impact on existing 
deployments
   - Configuration can be updated dynamically via cluster config without restart
   
   ## Impact
   
   - **Backward Compatible**: No changes to existing APIs or behavior when 
disabled
   - **Performance**: Minimal overhead when disabled, configurable sampling for 
high-volume endpoints
   - **Security**: Enables compliance and security auditing for broker 
operations


-- 
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]

Reply via email to