RANGER-5482:Create Ranger Audit Server with SOLR and HDFS as audit consumer#847
Open
RANGER-5482:Create Ranger Audit Server with SOLR and HDFS as audit consumer#847
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a comprehensive Ranger Audit Server architecture that decouples audit collection from Ranger Admin by implementing:
- A centralized Audit Server that receives audits from plugins via REST API and produces them to Kafka
- Separate consumer services for SOLR and HDFS that consume from Kafka and write to their respective destinations
- Shared common infrastructure for Kafka consumer management with support for consumer groups and rebalancing
Changes:
- New audit server infrastructure with 3 microservices (audit-server, consumer-solr, consumer-hdfs) and shared common module
- Integration with existing Ranger plugins (HDFS, Hive) to support HTTP-based audit destination
- Docker support for testing the complete audit pipeline with Kerberos authentication
- Thread-safe audit handling with concurrent counter management
Reviewed changes
Copilot reviewed 110 out of 111 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| ranger-audit-server/scripts/* | Shell scripts for starting/stopping audit services |
| ranger-audit-server/ranger-audit-server-service/* | Core audit server service with REST API and Kafka producer |
| ranger-audit-server/ranger-audit-consumer-solr/* | SOLR consumer service with Kafka-to-SOLR pipeline |
| ranger-audit-server/ranger-audit-consumer-hdfs/* | HDFS consumer service with Kafka-to-HDFS pipeline |
| ranger-audit-server/ranger-audit-common/* | Shared utilities, base classes, and consumer registry |
| agents-audit/dest-auditserver/* | New audit destination for plugins to send to audit server |
| agents-common/src/main/java/org/apache/ranger/plugin/audit/* | Enhanced audit handler with service type in additional info |
| agents-audit/core/src/main/java/org/apache/ranger/audit/provider/* | Thread-safe counters using AtomicLong |
| dev-support/ranger-docker/* | Docker compose and Dockerfiles for audit server services |
| pom.xml, distro/* | Build configuration and assembly descriptors |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
added 2 commits
February 11, 2026 13:42
…nsumer - fix failing testing
…nsumer - fix pmd issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Audit Server should have service which has kafka as a queue mechanism and have Kafka Producer to relay and store audits in Kafka Topic / Partition.
Audit Server should have Solr consumer running as a separate service to write audit into SOLR Index as a destination
Audit Server should have HDFS consumer running as a separate service to write audit into HDFS.
All the above mentioned service should be available and test in docker container.
How was this patch tested?