|
@@ -277,6 +277,11 @@ public class SaslDataTransferServer {
|
|
|
*/
|
|
|
private IOStreamPair getSaslStreams(Peer peer, OutputStream underlyingOut,
|
|
|
InputStream underlyingIn, final DatanodeID datanodeId) throws IOException {
|
|
|
+ if (peer.hasSecureChannel() ||
|
|
|
+ dnConf.getTrustedChannelResolver().isTrusted(getPeerAddress(peer))) {
|
|
|
+ return new IOStreamPair(underlyingIn, underlyingOut);
|
|
|
+ }
|
|
|
+
|
|
|
SaslPropertiesResolver saslPropsResolver = dnConf.getSaslPropsResolver();
|
|
|
Map<String, String> saslProps = saslPropsResolver.getServerProperties(
|
|
|
getPeerAddress(peer));
|