RANGER-5743: Docker setup for Apache Ranger ElasticSearch plugin and Integrate ES plugin with x-pack-security on ES 7.17 - #1153
Draft
pradeepagrawal8184 wants to merge 2 commits into
Draft
Conversation
pradeepagrawal8184
force-pushed
the
RANGER-5740_esplugin
branch
2 times, most recently
from
August 13, 2026 15:15
71334b7 to
9742bbf
Compare
…Integrate ES plugin with x-pack-security on ES 7.17 Co-authored-by: Cursor <cursoragent@cursor.com>
pradeepagrawal8184
force-pushed
the
RANGER-5740_esplugin
branch
from
August 13, 2026 15:21
9742bbf to
02154db
Compare
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?
This PR makes the Ranger Elasticsearch plugin work with Elasticsearch 7.17 + X-Pack Security instead of relying on client-supplied identity headers. It adds end-to-end Docker bring-up, fixes plugin packaging/classloading for ES 7.17, and wires audits through the Ranger audit ingestor path under Kerberos.
How was this patch tested?
The two commits were tested at three levels: automated unit tests (commit 1 only), manual Docker integration (commit 2, and validating commit 1 in a real ES stack), and problem reproduction before the fix. There is no new CI/integration test suite checked into the PR for the Docker or audit paths.
Commit 1 —
RANGER-5740(X-Pack caller identity)Automated unit tests
Run with:
This was run repeatedly during development and passes today. It includes 5 JUnit 5 tests in two classes:
TestElasticsearchAuthenticatedUserResolverSecurityContext; null when no user; system context skips auth requirementTestRangerSecurityRestFilterAuthorization: Basic(401, handler not called); accepts when X-Pack has set a verified userThese are mock-based unit tests — they do not start Elasticsearch or Ranger Admin.
Manual / planned testing
The commit message / PR test plan also listed manual checks that were not automated in the repo:
Pre-fix validation (motivation)
The original issue was reproduced separately on Ranger 2.9.0 in an isolated runtime replay: wrong Basic password still authorized as the named user. That confirmed the bug before this fix.
Commit 2 —
RANGER-5743(Docker + full ES 7.17 / X-Pack integration)No new automated tests
This commit adds no new unit or integration tests. Validation was done by bringing up the Ranger Docker stack and exercising ES manually.
Documented in
dev-support/ranger-docker/README.md:Smoke tests from the README:
Docker integration testing (manual, iterative)
The second commit was validated through many rebuild / recreate cycles of
ranger-elasticsearchagainst a running stack (Ranger Admin, KDC, Solr, Kafka, audit ingestor, etc.). Issues found and fixed during testing included:.dockerignore/ classpath /extended.plugins=x-pack-securityranger-elasticsearch-post-setup.sh)_system,internal:*) bypass inRangerSecurityActionFilterAuditRESTlazy allowed-users +dev_elasticsearchsite XMLAuthorization smoke tests (verified in Docker)
Against
test-indexon port 9201:elastictestuser_2(in Ranger policy)testuser_denied(ES role OK, not in Ranger policy)Test users are created offline via file realm (
roles.yml+elasticsearch-users) because Ranger blocks ES security REST APIs.Audit pipeline testing (partial)
Also tested manually in the same Docker stack:
ElasticsearchAuditIngestorClient)Audit event posted to ingestor for service=dev_elasticsearch user=testuser_2Audit event posted to ingestor for service=dev_elasticsearch user=testuser_deniedNot fully verified end-to-end: audits appearing in Solr via Kafka/dispatcher (Solr Kerberos blocked direct query verification).