Skip to content

Commit 7a8a826

Browse files
authored
Merge branch 'apache:trunk' into oss-v4-signature
2 parents 1fc1314 + 464d7d9 commit 7a8a826

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

  • hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/datatransfer/sasl

hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/datatransfer/sasl/DataTransferSaslUtil.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,15 @@ public static void checkSaslComplete(SaslParticipant sasl,
104104
String negotiatedQop = sasl.getNegotiatedQop();
105105
LOG.debug("{}: Verifying QOP: requested = {}, negotiated = {}",
106106
sasl, requestedQop, negotiatedQop);
107-
if (negotiatedQop != null && !requestedQop.contains(negotiatedQop)) {
107+
// Treat null negotiated QOP as "auth" for the purpose of verification
108+
// Code elsewhere does the same implicitly
109+
if(negotiatedQop == null) {
110+
negotiatedQop = "auth";
111+
}
112+
if (!requestedQop.contains(negotiatedQop)) {
108113
throw new IOException(String.format("SASL handshake completed, but " +
109114
"channel does not have acceptable quality of protection, " +
110-
"requested = %s, negotiated = %s", requestedQop, negotiatedQop));
115+
"requested = %s, negotiated(effective) = %s", requestedQop, negotiatedQop));
111116
}
112117
}
113118

0 commit comments

Comments
 (0)