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 B92DB200C59 for ; Mon, 17 Apr 2017 09:42:31 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B68CB160BB0; Mon, 17 Apr 2017 07:42: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 0ABE1160BAB for ; Mon, 17 Apr 2017 09:42:30 +0200 (CEST) Received: (qmail 76077 invoked by uid 500); 17 Apr 2017 07:42:25 -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 75098 invoked by uid 99); 17 Apr 2017 07:42:23 -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; Mon, 17 Apr 2017 07:42:23 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 82DECE9624; Mon, 17 Apr 2017 07:42:23 +0000 (UTC) From: sohami To: dev@drill.apache.org Reply-To: dev@drill.apache.org References: In-Reply-To: Subject: [GitHub] drill pull request #773: DRILL-4335: Apache Drill should support network enc... Content-Type: text/plain Message-Id: <20170417074223.82DECE9624@git1-us-west.apache.org> Date: Mon, 17 Apr 2017 07:42:23 +0000 (UTC) archived-at: Mon, 17 Apr 2017 07:42:31 -0000 Github user sohami commented on a diff in the pull request: https://github.com/apache/drill/pull/773#discussion_r111647365 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/rpc/user/UserClient.java --- @@ -135,20 +137,33 @@ public void submitQuery(UserResultsListener resultsListener, RunQuery query) { * @param credentials credentials * @throws RpcException if either connection or authentication fails */ - public void connect(final DrillbitEndpoint endpoint, final DrillProperties properties, - final UserCredentials credentials) throws RpcException { - final UserToBitHandshake handshake = UserToBitHandshake.newBuilder() + public void connect(final DrillbitEndpoint endpoint, final DrillProperties properties, final UserCredentials credentials) throws RpcException { + final UserToBitHandshake.Builder hsBuilder = UserToBitHandshake.newBuilder() .setRpcVersion(UserRpcConfig.RPC_VERSION) .setSupportListening(true) .setSupportComplexTypes(supportComplexTypes) .setSupportTimeout(true) .setCredentials(credentials) .setClientInfos(UserRpcUtils.getRpcEndpointInfos(clientName)) - .setSaslSupport(SaslSupport.SASL_AUTH) - .setProperties(properties.serializeForServer()) - .build(); + .setSaslSupport(SaslSupport.SASL_PRIVACY) + .setProperties(properties.serializeForServer()); + + // Only used for testing purpose + if (properties.containsKey(DrillProperties.TEST_OLD_CLIENT)) { + hsBuilder.setSaslSupport(SaslSupport.valueOf( + Integer.parseInt(properties.getProperty(DrillProperties.TEST_OLD_CLIENT)))); + } + + connect(hsBuilder.build(), endpoint).checkedGet(); + + // Check if client needs encryption and server is not configured for encryption. + final boolean clientNeedEncryption = properties.containsKey(DrillProperties.ENCRYPTION) --- End diff -- Changed --- 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. ---