Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2673,7 +2673,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 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}