NIFI-7203 Support for TLS in Zookeeper Server#4202
NIFI-7203 Support for TLS in Zookeeper Server#4202natural wants to merge 1 commit intoapache:masterfrom
Conversation
|
@natural Having also recently implemented this (#4207) I have a couple of comments:
|
|
@natural Otherwise the implementation appears to be correct. |
| final InetSocketAddress secPort = config.getSecureClientPortAddress(); | ||
| connectionFactory = ServerCnxnFactory.createFactory(); | ||
| connectionFactory.configure(config.getClientPortAddress(), config.getMaxClientCnxns()); | ||
| if (secPort != null) { |
There was a problem hiding this comment.
Since the insecure client port and secure client port aren't mutually exclusive you should add the checks for each port independently and setup two connection factories with their own startup and shutdown.
There was a problem hiding this comment.
I think you're right, your implementation should be merged, not this one.
I was trying to avoid multiple connections due to the security implications but I think we can just as easily handle that elsewhere.
| final InetSocketAddress secPort = quorumPeerConfig.getSecureClientPortAddress(); | ||
| connectionFactory = ServerCnxnFactory.createFactory(); | ||
| connectionFactory.configure(quorumPeerConfig.getClientPortAddress(), quorumPeerConfig.getMaxClientCnxns()); | ||
| if (secPort != null) { |
| # secureClientPort=2281 | ||
| # serverCnxnFactory=org.apache.zookeeper.server.NettyServerCnxnFactory | ||
|
|
||
| # Most TLS configurations will set these values as well: |
There was a problem hiding this comment.
Good call on including the example properties. We should include a note about not using the reconfig-style server.N entries if both clientPort and secureClientPort are being used.
| # ssl.keyStore.password=change this value to the actual value in your installation | ||
| # ssl.trustStore.location=/example/path/to/trust-store.jks | ||
| # ssl.trustStore.password=change this value to the actual value in your installation | ||
| # ssl.hostnameVerification=false |
There was a problem hiding this comment.
Let's remove ssl.hostnameVerification=false, or note that you would only do it for testing.
There was a problem hiding this comment.
I'll add a note to that effect.
@jfrazee thank you for the feedback! I think #4207 should get merged as-is, this PR closed, and the few remaining property file changes put into a new commit/branch/PR. |
Support for TLS in Embedded and Distributed Zookeeper Servers
Enables TLS functionality for embedded and/or distributed ZK ; addresses improvements outlined in NIFI-7203.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:
Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
Has your PR been rebased against the latest commit within the target branch (typically
master)?Is your initial contribution a single, squashed commit? Additional commits in response to PR reviewer feedback should be made on this branch and pushed to allow change tracking. Do not
squashor use--forcewhen pushing to allow for clean monitoring of changes.For code changes:
mvn -Pcontrib-check clean installat the rootnififolder?LICENSEfile, including the mainLICENSEfile undernifi-assembly?NOTICEfile, including the mainNOTICEfile found undernifi-assembly?.displayNamein addition to .name (programmatic access) for each of the new properties?For documentation related changes:
Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.