jfrazee commented on a change in pull request #4250:
URL: https://github.com/apache/nifi/pull/4250#discussion_r505856782
##########
File path:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/cluster/ZooKeeperClientConfig.java
##########
@@ -133,6 +207,30 @@ private static int getTimePeriod(final NiFiProperties
nifiProperties, final Stri
}
}
+ private static boolean getClientSecure(final NiFiProperties
nifiProperties, final String propertyName, final boolean defaultValue) {
+ final String defaultValueStr = String.valueOf(defaultValue);
+
+ String propertyStr = nifiProperties.getProperty(propertyName,
defaultValueStr);
+ propertyStr = StringUtils.stripToEmpty(propertyStr);
+ propertyStr = StringUtils.defaultIfBlank(propertyStr, defaultValueStr);
+ propertyStr = StringUtils.lowerCase(propertyStr);
+
+ if (!"true".equalsIgnoreCase(propertyStr) &&
!"false".equalsIgnoreCase(propertyStr)) {
+ throw new IllegalArgumentException(String.format("%s was '%s',
expected true or false", NiFiProperties.ZOOKEEPER_CLIENT_SECURE, propertyStr));
+ }
+
+ return Boolean.parseBoolean(propertyStr);
+ }
+
+ private static String getKeyStoreType(final String keyStore, final
NiFiProperties nifiProperties, final String propertyName) {
+ String keyStoreType =
StringUtils.stripToNull(nifiProperties.getProperty(propertyName));
+ // ZooKeeper only recognizes the .p12 extension.
+ if (keyStoreType == null && StringUtils.endsWithIgnoreCase(keyStore,
".pkcs12")) {
Review comment:
Makes sense, removed it. There are some cases such as the tls-toolkit
where keystores end up with a `.pkcs12` extension so the goal was to align to
that. If it ends up causing any confusion we can revisit whether we need to
handle the special case.
----------------------------------------------------------------
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:
[email protected]