You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2019/09/03 23:27:29 UTC

[GitHub] [bookkeeper] rdhabalia commented on a change in pull request #2156: [bookie-mTLS] add support of hostname verification

rdhabalia commented on a change in pull request #2156: [bookie-mTLS] add support of hostname verification
URL: https://github.com/apache/bookkeeper/pull/2156#discussion_r320518339
 
 

 ##########
 File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/AuthHandler.java
 ##########
 @@ -26,27 +26,34 @@
 
 import io.netty.channel.Channel;
 import io.netty.channel.ChannelDuplexHandler;
+import io.netty.channel.ChannelHandler;
 import io.netty.channel.ChannelHandlerContext;
 import io.netty.channel.ChannelInboundHandlerAdapter;
 import io.netty.channel.ChannelPromise;
+import io.netty.handler.ssl.SslHandler;
 
 import java.io.IOException;
+import java.net.InetSocketAddress;
 import java.net.SocketAddress;
 import java.util.Queue;
 import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.concurrent.atomic.AtomicLong;
 
+import javax.net.ssl.SSLSession;
+
 import org.apache.bookkeeper.auth.AuthCallbacks;
 import org.apache.bookkeeper.auth.AuthToken;
 import org.apache.bookkeeper.auth.BookieAuthProvider;
 import org.apache.bookkeeper.auth.ClientAuthProvider;
 import org.apache.bookkeeper.client.BKException;
 import org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage;
+import org.apache.http.conn.ssl.DefaultHostnameVerifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 class AuthHandler {
     static final Logger LOG = LoggerFactory.getLogger(AuthHandler.class);
+    private static final DefaultHostnameVerifier HOSTNAME_VERIFIER = new DefaultHostnameVerifier();
 
 Review comment:
   yes, that's correct that's why I wanted to exclude all the transitive dependencies from it but then somehow I had some unknown compilation issue. and regarding netty, last time I had some issue with netty hostname-verification feature so, skipped to use it. But I am not able to recollect exact issue so, let me give a try and see alternative.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services