From 96612cc66538ef672f54e2a5dbf75d4ea258885d Mon Sep 17 00:00:00 2001 From: Gian Merlino Date: Sun, 17 Sep 2017 22:41:36 -0700 Subject: [PATCH] Fix incorrect log formatting in DruidKerberosAuthenticationHandler. (#4817) --- .../kerberos/DruidKerberosAuthenticationHandler.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/extensions-core/druid-kerberos/src/main/java/io/druid/security/kerberos/DruidKerberosAuthenticationHandler.java b/extensions-core/druid-kerberos/src/main/java/io/druid/security/kerberos/DruidKerberosAuthenticationHandler.java index 50fe3b0f3a5..4b58e18180b 100644 --- a/extensions-core/druid-kerberos/src/main/java/io/druid/security/kerberos/DruidKerberosAuthenticationHandler.java +++ b/extensions-core/druid-kerberos/src/main/java/io/druid/security/kerberos/DruidKerberosAuthenticationHandler.java @@ -106,9 +106,7 @@ public class DruidKerberosAuthenticationHandler extends KerberosAuthenticationHa } for (String spnegoPrincipal : spnegoPrincipals) { - log.info("Login using keytab {}, for principal {}", - keytab, spnegoPrincipal - ); + log.info("Login using keytab %s, for principal %s", keytab, spnegoPrincipal); final KerberosAuthenticator.DruidKerberosConfiguration kerberosConfiguration = new KerberosAuthenticator.DruidKerberosConfiguration(keytab, spnegoPrincipal); final LoginContext loginContext = @@ -117,7 +115,7 @@ public class DruidKerberosAuthenticationHandler extends KerberosAuthenticationHa loginContext.login(); } catch (LoginException le) { - log.warn(le, "Failed to login as [{}]", spnegoPrincipal); + log.warn(le, "Failed to login as [%s]", spnegoPrincipal); throw new AuthenticationException(le); } loginContexts.add(loginContext); @@ -201,7 +199,7 @@ public class DruidKerberosAuthenticationHandler extends KerberosAuthenticationHa String userName = kerberosName.getShortName(); token = new AuthenticationToken(userName, clientPrincipal, getType()); response.setStatus(HttpServletResponse.SC_OK); - log.trace("SPNEGO completed for principal [{}]", clientPrincipal); + log.trace("SPNEGO completed for principal [%s]", clientPrincipal); } } finally {