diff --git a/src/main/java/org/opensearch/security/auth/BackendRegistry.java b/src/main/java/org/opensearch/security/auth/BackendRegistry.java index ad7df446ac..4de8d4da79 100644 --- a/src/main/java/org/opensearch/security/auth/BackendRegistry.java +++ b/src/main/java/org/opensearch/security/auth/BackendRegistry.java @@ -608,6 +608,7 @@ private User impersonate(final RestRequest request, final User originalUser) thr for (final AuthDomain authDomain : restAuthDomains) { final AuthenticationBackend authenticationBackend = authDomain.getBackend(); + //Skip over the OnBehalfOfAuthenticator since it is not compatible for user impersonation if (authDomain.getHttpAuthenticator() instanceof OnBehalfOfAuthenticator) { continue; }