ramackri opened a new pull request, #1353: URL: https://github.com/apache/ranger/pull/1353
## Summary Backport [RANGER-5723](https://issues.apache.org/jira/browse/RANGER-5723) to `ranger-2.10`: plugins can send **trusted HTTP headers** (SPIFFE ID and generic `authn.header.*` slots) to the audit ingestor when posting audits via `RangerAuditServerDestination`. Adapted from master commit [8e7716cd](https://github.com/apache/ranger/commit/8e7716cd3c36da395b8edc8470e328f736fbd984) (#1139) for the 2.10 line (Jersey 1.x / `DefaultTokenSupplier` JWT path unchanged). - Add `PluginHeaderAuthConfig` to resolve header names and values (`literal`, `file:`, `env:`) from plugin audit XML/properties. - Extend `RangerRESTClient` with `setTrustedAuthHeaders()` using a Jersey `ClientFilter` so headers apply to all outbound calls (including audit `getResource()` posts). - Wire trusted headers in `RangerAuditServerDestination.init()` alongside existing JWT/Basic/Kerberos auth. - Unit tests for config parsing, REST client header injection, and audit destination prefix behavior. ## Test plan - [x] `mvn -pl common-utils,agents-common,agents-audit/dest-auditserver -am test -Dtest=PluginHeaderAuthConfigTest,RangerAuditServerDestinationTest,TestRangerRESTClient -Dsurefire.failIfNoSpecifiedTests=false` (JDK 8) - [ ] CI `build-8` / `build-11` on this PR - [ ] Optional docker: plugin with `authn.header.enabled=true` and SPIFFE header → audit ingestor accepts batch Made with [Cursor](https://cursor.com) -- 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]
