diff --git a/src/main/java/org/opensearch/security/filter/SecurityRestFilter.java b/src/main/java/org/opensearch/security/filter/SecurityRestFilter.java index 420211f29b..b56f3e951d 100644 --- a/src/main/java/org/opensearch/security/filter/SecurityRestFilter.java +++ b/src/main/java/org/opensearch/security/filter/SecurityRestFilter.java @@ -254,7 +254,6 @@ void authorizeRequest(RestHandler original, SecurityRequestChannel request, User log.debug(err); request.queueForSending(new SecurityResponse(HttpStatus.SC_UNAUTHORIZED, err)); - return; } } } @@ -309,7 +308,6 @@ public void checkAndAuthenticateRequest(SecurityRequestChannel requestChannel) t if (!registry.authenticate(requestChannel)) { // another roundtrip org.apache.logging.log4j.ThreadContext.remove("user"); - return; } else { // make it possible to filter logs by username org.apache.logging.log4j.ThreadContext.put(