From af81afce408a4d4e731d2431fb1b9b2b26def1fe Mon Sep 17 00:00:00 2001 From: Bryan Bende Date: Thu, 10 Oct 2019 15:07:12 -0400 Subject: [PATCH] NIFI-5753 Make use of keyPassword optional and only used when keystore is used, bump registry client version This closes #3126. --- .../nifi-hwx-schema-registry-service/pom.xml | 2 +- .../schemaregistry/hortonworks/HortonworksSchemaRegistry.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nifi-nar-bundles/nifi-standard-services/nifi-hwx-schema-registry-bundle/nifi-hwx-schema-registry-service/pom.xml b/nifi-nar-bundles/nifi-standard-services/nifi-hwx-schema-registry-bundle/nifi-hwx-schema-registry-service/pom.xml index c0d2fdb330..fe4c35e67d 100644 --- a/nifi-nar-bundles/nifi-standard-services/nifi-hwx-schema-registry-bundle/nifi-hwx-schema-registry-service/pom.xml +++ b/nifi-nar-bundles/nifi-standard-services/nifi-hwx-schema-registry-bundle/nifi-hwx-schema-registry-service/pom.xml @@ -28,7 +28,7 @@ limitations under the License. nifi-hwx-schema-registry-service jar - 0.5.3 + 0.8.0 diff --git a/nifi-nar-bundles/nifi-standard-services/nifi-hwx-schema-registry-bundle/nifi-hwx-schema-registry-service/src/main/java/org/apache/nifi/schemaregistry/hortonworks/HortonworksSchemaRegistry.java b/nifi-nar-bundles/nifi-standard-services/nifi-hwx-schema-registry-bundle/nifi-hwx-schema-registry-service/src/main/java/org/apache/nifi/schemaregistry/hortonworks/HortonworksSchemaRegistry.java index cb97fce8d9..eb5817e5fe 100644 --- a/nifi-nar-bundles/nifi-standard-services/nifi-hwx-schema-registry-bundle/nifi-hwx-schema-registry-service/src/main/java/org/apache/nifi/schemaregistry/hortonworks/HortonworksSchemaRegistry.java +++ b/nifi-nar-bundles/nifi-standard-services/nifi-hwx-schema-registry-bundle/nifi-hwx-schema-registry-service/src/main/java/org/apache/nifi/schemaregistry/hortonworks/HortonworksSchemaRegistry.java @@ -142,11 +142,13 @@ public class HortonworksSchemaRegistry extends AbstractControllerService impleme ImmutableMap.Builder propertiesBuilder = ImmutableMap.builder(); if (sslContextService != null) { propertiesBuilder.put("protocol", sslContextService.getSslAlgorithm()); - propertiesBuilder.put("keyPassword", sslContextService.getKeyPassword()); if (sslContextService.isKeyStoreConfigured()) { propertiesBuilder.put("keyStorePath", sslContextService.getKeyStoreFile()); propertiesBuilder.put("keyStorePassword", sslContextService.getKeyStorePassword()); propertiesBuilder.put("keyStoreType", sslContextService.getKeyStoreType()); + if (sslContextService.getKeyPassword() != null) { + propertiesBuilder.put("keyPassword", sslContextService.getKeyPassword()); + } } if (sslContextService.isTrustStoreConfigured()) { propertiesBuilder.put("trustStorePath", sslContextService.getTrustStoreFile());