NIFI-5753 Make use of keyPassword optional and only used when keystore is used, bump registry client version

This closes #3126.
This commit is contained in:
Bryan Bende 2019-10-10 15:07:12 -04:00
parent 5d65e6aba4
commit af81afce40
No known key found for this signature in database
GPG Key ID: A0DDA9ED50711C39
2 changed files with 4 additions and 2 deletions

View File

@ -28,7 +28,7 @@ limitations under the License.
<artifactId>nifi-hwx-schema-registry-service</artifactId>
<packaging>jar</packaging>
<properties>
<hwx.registry.version>0.5.3</hwx.registry.version>
<hwx.registry.version>0.8.0</hwx.registry.version>
</properties>
<dependencies>
<dependency>

View File

@ -142,11 +142,13 @@ public class HortonworksSchemaRegistry extends AbstractControllerService impleme
ImmutableMap.Builder<String, String> 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());