ramackri opened a new pull request, #1089: URL: https://github.com/apache/ranger/pull/1089
## Summary Back-port of master commit [6723329](https://github.com/apache/ranger/commit/6723329285d1287df59e2424200e218e768e7dda) / PR #1081 to `ranger-2.9`. - Replace `jwtToken.serialize()` in the JWT validation-failure WARN path with `safeJwtLogContext()` so logs contain only non-sensitive metadata (subject, audience, issuer, keyId, jwtId). - Add null-safety when a token has no audience claim but audiences are configured. - Add unit tests for the safe logging path and missing-audience validation. Note: cherry-pick did not apply cleanly because `RangerJwtAuthHandler` on 2.9 differs from master (returns `AuthenticationToken`, no issuer validation). The security fix was ported manually with the same behavior. ## Test plan - [x] `mvn -pl ranger-authn -am test -Dtest=TestRangerJwtAuthHandler -Dsurefire.failIfNoSpecifiedTests=false` 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]
