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 075D0200C06 for ; Fri, 27 Jan 2017 19:06:31 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 05DE0160B5C; Fri, 27 Jan 2017 18:06: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 4CA5E160B40 for ; Fri, 27 Jan 2017 19:06:30 +0100 (CET) Received: (qmail 88913 invoked by uid 500); 27 Jan 2017 18:06:29 -0000 Mailing-List: contact dev-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list dev@zookeeper.apache.org Received: (qmail 88880 invoked by uid 99); 27 Jan 2017 18:06:28 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jan 2017 18:06:28 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 6B8111A0451 for ; Fri, 27 Jan 2017 18:06:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id VAeLB8Wz1a30 for ; Fri, 27 Jan 2017 18:06:27 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 192555FBD1 for ; Fri, 27 Jan 2017 18:06:27 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id DA3FDE044C for ; Fri, 27 Jan 2017 18:06:25 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 9CC1D25299 for ; Fri, 27 Jan 2017 18:06:24 +0000 (UTC) Date: Fri, 27 Jan 2017 18:06:24 +0000 (UTC) From: "Shivam (JIRA)" To: dev@zookeeper.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ZOOKEEPER-2125) SSL on Netty client-server communication MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 27 Jan 2017 18:06:31 -0000 [ https://issues.apache.org/jira/browse/ZOOKEEPER-2125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15843196#comment-15843196 ] Shivam commented on ZOOKEEPER-2125: ----------------------------------- Do you know any expected release date for stable 3.5.x release ? we are using 3.4.9 stable release and need ssl asap. I can work on back porting it , if you say it is technically possible ? > SSL on Netty client-server communication > ---------------------------------------- > > Key: ZOOKEEPER-2125 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2125 > Project: ZooKeeper > Issue Type: Sub-task > Reporter: Hongchao Deng > Assignee: Hongchao Deng > Fix For: 3.5.1, 3.6.0 > > Attachments: testKeyStore.jks, testTrustStore.jks, ZOOKEEPER-2125-build.patch, ZOOKEEPER-2125.patch, ZOOKEEPER-2125.patch, ZOOKEEPER-2125.patch, ZOOKEEPER-2125.patch, ZOOKEEPER-2125.patch, ZOOKEEPER-2125.patch, ZOOKEEPER-2125.patch, ZOOKEEPER-2125.patch, ZOOKEEPER-2125.patch, ZOOKEEPER-2125.patch, ZOOKEEPER-2125.patch, ZOOKEEPER-2125.patch, ZOOKEEPER-2125.patch, ZOOKEEPER-2125.patch, ZOOKEEPER-2125.patch, ZOOKEEPER-2125.patch, ZOOKEEPER-2125.patch, ZOOKEEPER-2125.patch > > > Supporting SSL on Netty client-server communication. > 1. It supports keystore and trustore usage. > 2. It adds an additional ZK server port which supports SSL. This would be useful for rolling upgrade. > RB: https://reviews.apache.org/r/31277/ > The patch includes three files: > * testing purpose keystore and truststore under "$(ZK_REPO_HOME)/src/java/test/data/ssl". Might need to create "ssl/". > * latest ZOOKEEPER-2125.patch > h2. How to use it > You need to set some parameters on both ZK server and client. > h3. Server > You need to specify a listening SSL port in "zoo.cfg": > {code} > secureClientPort=2281 > {code} > Just like what you did with "clientPort". And then set some jvm flags: > {code} > export SERVER_JVMFLAGS="-Dzookeeper.serverCnxnFactory=org.apache.zookeeper.server.NettyServerCnxnFactory -Dzookeeper.ssl.keyStore.location=/root/zookeeper/ssl/testKeyStore.jks -Dzookeeper.ssl.keyStore.password=testpass -Dzookeeper.ssl.trustStore.location=/root/zookeeper/ssl/testTrustStore.jks -Dzookeeper.ssl.trustStore.password=testpass" > {code} > Please change keystore and truststore parameters accordingly. > h3. Client > You need to set jvm flags: > {code} > export CLIENT_JVMFLAGS="-Dzookeeper.clientCnxnSocket=org.apache.zookeeper.ClientCnxnSocketNetty -Dzookeeper.client.secure=true -Dzookeeper.ssl.keyStore.location=/root/zookeeper/ssl/testKeyStore.jks -Dzookeeper.ssl.keyStore.password=testpass -Dzookeeper.ssl.trustStore.location=/root/zookeeper/ssl/testTrustStore.jks -Dzookeeper.ssl.trustStore.password=testpass" > {code} > change keystore and truststore parameters accordingly. > And then connect to the server's SSL port, in this case: > {code} > bin/zkCli.sh -server 127.0.0.1:2281 > {code} > If you have any feedback, you are more than welcome to discuss it here! -- This message was sent by Atlassian JIRA (v6.3.4#6332)