From 105e9f54dc53aa7261ddd8f699051ebae74fbfd5 Mon Sep 17 00:00:00 2001 From: Priyank Bagrecha Date: Thu, 14 Sep 2023 14:41:32 -0700 Subject: [PATCH] #3273 Change warning message No 'Basic Authorization' header, send 401 and 'WWW-Authenticate Basic' to trace Signed-off-by: Priyank Bagrecha --- .../java/org/opensearch/security/auth/BackendRegistry.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/opensearch/security/auth/BackendRegistry.java b/src/main/java/org/opensearch/security/auth/BackendRegistry.java index c16f90fb6a..3877df4130 100644 --- a/src/main/java/org/opensearch/security/auth/BackendRegistry.java +++ b/src/main/java/org/opensearch/security/auth/BackendRegistry.java @@ -282,7 +282,10 @@ && isBlocked(((InetSocketAddress) request.getHttpChannel().getRemoteAddress()).g if (authDomain.isChallenge() && httpAuthenticator.reRequestAuthentication(channel, null)) { auditLog.logFailedLogin("", false, null, request); - log.warn("No 'Authorization' header, send 401 and 'WWW-Authenticate Basic'"); + if (isTraceEnabled) { + log.trace( + "No 'Authorization' header, send 401 and 'WWW-Authenticate Basic'"); + } return false; } else { // no reRequest possible