mirror of https://github.com/apache/druid.git
Fix incorrect log formatting in DruidKerberosAuthenticationHandler. (#4817)
This commit is contained in:
parent
c2a0e753b6
commit
96612cc665
|
@ -106,9 +106,7 @@ public class DruidKerberosAuthenticationHandler extends KerberosAuthenticationHa
|
||||||
}
|
}
|
||||||
|
|
||||||
for (String spnegoPrincipal : spnegoPrincipals) {
|
for (String spnegoPrincipal : spnegoPrincipals) {
|
||||||
log.info("Login using keytab {}, for principal {}",
|
log.info("Login using keytab %s, for principal %s", keytab, spnegoPrincipal);
|
||||||
keytab, spnegoPrincipal
|
|
||||||
);
|
|
||||||
final KerberosAuthenticator.DruidKerberosConfiguration kerberosConfiguration =
|
final KerberosAuthenticator.DruidKerberosConfiguration kerberosConfiguration =
|
||||||
new KerberosAuthenticator.DruidKerberosConfiguration(keytab, spnegoPrincipal);
|
new KerberosAuthenticator.DruidKerberosConfiguration(keytab, spnegoPrincipal);
|
||||||
final LoginContext loginContext =
|
final LoginContext loginContext =
|
||||||
|
@ -117,7 +115,7 @@ public class DruidKerberosAuthenticationHandler extends KerberosAuthenticationHa
|
||||||
loginContext.login();
|
loginContext.login();
|
||||||
}
|
}
|
||||||
catch (LoginException le) {
|
catch (LoginException le) {
|
||||||
log.warn(le, "Failed to login as [{}]", spnegoPrincipal);
|
log.warn(le, "Failed to login as [%s]", spnegoPrincipal);
|
||||||
throw new AuthenticationException(le);
|
throw new AuthenticationException(le);
|
||||||
}
|
}
|
||||||
loginContexts.add(loginContext);
|
loginContexts.add(loginContext);
|
||||||
|
@ -201,7 +199,7 @@ public class DruidKerberosAuthenticationHandler extends KerberosAuthenticationHa
|
||||||
String userName = kerberosName.getShortName();
|
String userName = kerberosName.getShortName();
|
||||||
token = new AuthenticationToken(userName, clientPrincipal, getType());
|
token = new AuthenticationToken(userName, clientPrincipal, getType());
|
||||||
response.setStatus(HttpServletResponse.SC_OK);
|
response.setStatus(HttpServletResponse.SC_OK);
|
||||||
log.trace("SPNEGO completed for principal [{}]", clientPrincipal);
|
log.trace("SPNEGO completed for principal [%s]", clientPrincipal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
|
|
Loading…
Reference in New Issue