RANGER-5655: Shared partition plan library, DB patch 078, plugin SPIFFE auth - #1135
Closed
ramackri wants to merge 8 commits into
Closed
RANGER-5655: Shared partition plan library, DB patch 078, plugin SPIFFE auth#1135ramackri wants to merge 8 commits into
ramackri wants to merge 8 commits into
Conversation
ramackri
force-pushed
the
RANGER-5655-patch1
branch
from
August 5, 2026 04:35
1c2f50b to
722ad8a
Compare
ramackri
requested review from
kumaab,
mneethiraj,
pradeepagrawal8184 and
rameeshm
August 5, 2026 04:40
ramackri
marked this pull request as draft
August 5, 2026 16:45
added 8 commits
August 6, 2026 00:27
…FE auth Adds PR1 shared foundation (partition plan library, PluginHeaderAuthConfig, SpiffeIdentityResolver, RangerRESTClient trusted headers), PR2 DB patch 078 (global state bootstrap for audit partition plan), and PR5 plugin outbound SPIFFE auth for audit-server destination with install templates defaulting to disabled. Sub-tasks: RANGER-5719, RANGER-5720, RANGER-5723
Do not log auth header names in production INFO logs; log only that SPIFFE header authentication is enabled for the audit-server destination.
Avoid INFO-level auth mechanism logging in production.
Use static import for requireNonNull per dev-support/checkstyle.xml.
Add SPIFFE tokens to docker plugin install.properties and use %EMPTY% for optional VALUE/FILE so XmlConfigChanger does not fail during enable-hdfs-plugin and other docker CI plugin setup.
Complete SPIFFE install.property coverage for all docker and prod install templates so XmlConfigChanger resolves audit-server SPIFFE tokens during plugin enable (services-docker-build KMS path).
Align with RANGER-5700 (apache#1096) server-level SPIFFE pattern: map XAAUDIT.AUDITSERVER.AUTHN.SPIFFE.* directly into xasecure.audit.destination.auditserver.authn.* via audit-changes.cfg (JWT-style), remove per-plugin ranger.<service>.authn.* entries from security-changes.cfg, and use the audit destination prefix in RangerAuditServerDestination.
Follow RANGER-5700 (apache#1096): outbound SPIFFE is handled in Java via RangerAuditServerDestination and SpiffeIdentityResolver (SPIRE file or SPIFFE_ID env). Remove 51 plugin install.properties, audit-changes, and security-changes SPIFFE entries; revert accidental newline-only security-changes edits. Operators enable with a single audit-xml property: xasecure.audit.destination.auditserver.authn.header.enabled=true
ramackri
force-pushed
the
RANGER-5655-patch1
branch
from
August 5, 2026 18:57
a225c83 to
a119edf
Compare
ramackri
marked this pull request as ready for review
August 5, 2026 18:59
Contributor
Author
|
Closing in favor of three focused PRs split from this branch:
Merge order: #1137 and #1138 can land in parallel; #1139 after #1137 (rebase onto master). |
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.
Summary
Foundation for RANGER-5655 — Admin-managed Kafka audit partition plan and SPIFFE workload identity. This PR combines the first three merge slices (PR1 + PR2 + PR5 from the feature split); Admin REST (PR3) and Ingestor routing/inbound SPIFFE (PR4) follow in separate PRs.
Parent: RANGER-5655 — Ranger Admin-Managed Kafka Audit Partition Plan & SPIFFE Auth
Sub-tasks covered in this PR:
Sub-tasks deferred to follow-on PRs:
SPIFFE outbound auth — aligned with RANGER-5700 (#1096)
RangerAuditServerDestination+PluginHeaderAuthConfig+SpiffeIdentityResolver+RangerRESTClient.setTrustedAuthHeaders()), using the audit destination prefix (JWT-style), notranger.<service>.authn.*security props.Audit XML properties for outbound SPIFFE (plugin → audit ingestor)
All SPIFFE outbound settings live under the audit-server destination prefix in
ranger-<service>-audit.xml:xasecure.audit.destination.auditserverxasecure.audit.destination.auditserver.authn.header.enabledfalsetruexasecure.audit.destination.auditserver.authn.header.spiffeX-Spiffe-Idxasecure.audit.destination.auditserver.authn.spiffe.valuexasecure.audit.destination.auditserver.authn.spiffe.file/var/run/secrets/spiffe.io/identity/spiffeSPIFFE ID resolution order (when
authn.header.enabled=true):authn.spiffe.valuein audit XMLauthn.spiffe.filein audit XML (or default SPIRE path above)SPIFFE_IDenvironment variableMinimum enable (typical Kubernetes / SPIRE deployment — identity from file or env):
Explicit SPIFFE ID (e.g. docker/dev without SPIRE file):
Optional custom header name:
Also required for audit delivery (unchanged by this PR; not SPIFFE-specific):
xasecure.audit.destination.auditserver=truexasecure.audit.destination.auditserver.url= ingestor base URL (e.g.http://ranger-audit-ingestor:7081)Defaults / safety:
authn.header.enableddefaults tofalsein code (PluginHeaderAuthConfig.isHeaderAuthEnabled). No install-template or enable-script changes are required — operators opt in via audit XML only. Safe to merge before PR4 (ingestor inbound SPIFFE) lands.policy.download.auth.usersin the partition plan (PR3/PR4), not static ingestor XMLAuditPluginIdResolverintentionally omitted here; deferred to PR3 withAuditPartitionPlanMgrTest plan
mvn -pl agents-common -am test— partition plan + SPIFFE unit tests passmvn -pl agents-audit/dest-auditserver -am test -Dtest=RangerAuditServerDestinationTest— passbuild-17,plugins-docker-build,services-docker-build,plugins-download-archivesAuditHeaderAuthFilter)