diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java index 7303f8afce194..7b889e68d25e8 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java @@ -2610,7 +2610,7 @@ private RpcSaslProto buildSaslNegotiateResponse() // accelerate token negotiation by sending initial challenge // in the negotiation response if (enabledAuthMethods.contains(AuthMethod.TOKEN) - && SaslMechanismFactory.isDefaultMechanism(AuthMethod.TOKEN.getMechanismName())) { + && SaslMechanismFactory.isDigestMechanism(AuthMethod.TOKEN.getMechanismName())) { saslServer = createSaslServer(AuthMethod.TOKEN); byte[] challenge = saslServer.evaluateResponse(new byte[0]); RpcSaslProto.Builder negotiateBuilder = diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/CustomizedCallbackHandler.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/CustomizedCallbackHandler.java index 12868cc630c6e..708d8a8755a9c 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/CustomizedCallbackHandler.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/CustomizedCallbackHandler.java @@ -47,7 +47,7 @@ private static synchronized CustomizedCallbackHandler getSynchronously( //cache miss final Class clazz = conf.getClass(key, DefaultHandler.class); - LOG.info("{} = {}", key, clazz); + LOG.debug("{} = {}", key, clazz); if (clazz == DefaultHandler.class) { return DefaultHandler.INSTANCE; } diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SaslMechanismFactory.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SaslMechanismFactory.java index 5b529e2a6052c..dbe8b880ba527 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SaslMechanismFactory.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SaslMechanismFactory.java @@ -65,5 +65,13 @@ public static boolean isDefaultMechanism(String saslMechanism) { return HADOOP_SECURITY_SASL_MECHANISM_DEFAULT.equals(saslMechanism); } + public static boolean isDigestMechanism(String saslMechanism) { + return saslMechanism.startsWith("DIGEST-"); + } + private SaslMechanismFactory() {} + + public static void main(String[] args) { + System.out.println("SASL_MECHANISM = " + getMechanism()); + } } \ No newline at end of file