Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id F3F75200C14 for ; Tue, 7 Feb 2017 23:53:31 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id F2969160B3E; Tue, 7 Feb 2017 22:53:31 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4A38B160B32 for ; Tue, 7 Feb 2017 23:53:31 +0100 (CET) Received: (qmail 64043 invoked by uid 500); 7 Feb 2017 22:53:30 -0000 Mailing-List: contact dev-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list dev@drill.apache.org Received: (qmail 64032 invoked by uid 99); 7 Feb 2017 22:53:30 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2017 22:53:30 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 13242DFBDB; Tue, 7 Feb 2017 22:53:30 +0000 (UTC) From: sudheeshkatkam To: dev@drill.apache.org Reply-To: dev@drill.apache.org References: In-Reply-To: Subject: [GitHub] drill pull request #578: DRILL-4280: Kerberos Authentication Content-Type: text/plain Message-Id: <20170207225330.13242DFBDB@git1-us-west.apache.org> Date: Tue, 7 Feb 2017 22:53:30 +0000 (UTC) archived-at: Tue, 07 Feb 2017 22:53:32 -0000 Github user sudheeshkatkam commented on a diff in the pull request: https://github.com/apache/drill/pull/578#discussion_r99951476 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/rpc/control/ControlServer.java --- @@ -84,23 +87,33 @@ public ControlConnection initRemoteConnection(SocketChannel channel) { public MessageLite getHandshakeResponse(BitControlHandshake inbound) throws Exception { // logger.debug("Handling handshake from other bit. {}", inbound); if (inbound.getRpcVersion() != ControlRpcConfig.RPC_VERSION) { - throw new RpcException(String.format("Invalid rpc version. Expected %d, actual %d.", inbound.getRpcVersion(), ControlRpcConfig.RPC_VERSION)); + throw new RpcException(String.format("Invalid rpc version. Expected %d, actual %d.", + inbound.getRpcVersion(), ControlRpcConfig.RPC_VERSION)); } - if (!inbound.hasEndpoint() || inbound.getEndpoint().getAddress().isEmpty() || inbound.getEndpoint().getControlPort() < 1) { - throw new RpcException(String.format("RPC didn't provide valid counter endpoint information. Received %s.", inbound.getEndpoint())); + if (!inbound.hasEndpoint() || + inbound.getEndpoint().getAddress().isEmpty() || + inbound.getEndpoint().getControlPort() < 1) { + throw new RpcException(String.format("RPC didn't provide valid counter endpoint information. Received %s.", + inbound.getEndpoint())); } connection.setEndpoint(inbound.getEndpoint()); // add the ControlConnectionManager manager = connectionRegistry.getConnectionManager(inbound.getEndpoint()); // update the close handler. - proxyCloseHandler.setHandler(manager.getCloseHandlerCreator().getHandler(connection, proxyCloseHandler.getHandler())); + proxyCloseHandler.setHandler(manager.getCloseHandlerCreator().getHandler(connection, + proxyCloseHandler.getHandler())); // add to the connection manager. manager.addExternalConnection(connection); - return BitControlHandshake.newBuilder().setRpcVersion(ControlRpcConfig.RPC_VERSION).build(); + final BitControlHandshake.Builder builder = BitControlHandshake.newBuilder(); + builder.setRpcVersion(ControlRpcConfig.RPC_VERSION); + if (config.getAuthProvider() != null) { --- End diff -- There is only one authProvider per drillbit, but auth can be enabled user to bit, but not bit to bit, which means relying on being empty is not sufficient. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---