You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix NPE in auditing authenticationSuccess for non-existing run-as user (#91171)
When run-as fails because the target user does not exist, the
authentication is created with a null lookup realm. It is then rejected
at authorization time. But for authentication, it is treated as success.
This can lead to NPE when auditing the authenticationSuccess event.
This PR fixes the NPE by checking whether lookup realm is null before
using it.
Relates: #91126 (comment)
Copy file name to clipboardExpand all lines: x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/audit/logfile/LoggingAuditTrail.java
Copy file name to clipboardExpand all lines: x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/audit/logfile/LoggingAuditTrailTests.java
+35-6Lines changed: 35 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -2471,7 +2471,6 @@ public void testAuthenticationSuccessRest() throws Exception {
0 commit comments