From be3e918ae370b6496711df3697eddd9ce058b12a Mon Sep 17 00:00:00 2001 From: Bryan Bende Date: Tue, 22 Sep 2020 12:11:46 -0400 Subject: [PATCH] NIFI-7832 Resetting boolean that indicates password is being used when service is disabled (#4543) Signed-off-by: Andy LoPresto --- .../schemaregistry/hortonworks/HortonworksSchemaRegistry.java | 2 ++ 1 file changed, 2 insertions(+) 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 317c5e6c45f9..f48f2508362f 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 @@ -222,6 +222,7 @@ public void enable(final ConfigurationContext context) throws InitializationExce final String keytab = kerberosCredentialsService.getKeytab(); final String jaasConfigString = getKeytabJaasConfig(principal, keytab); schemaRegistryConfig.put(SchemaRegistryClient.Configuration.SASL_JAAS_CONFIG.name(), jaasConfigString); + usingKerberosWithPassword = false; } else if (!StringUtils.isBlank(kerberosPrincipal) && !StringUtils.isBlank(kerberosPassword)) { schemaRegistryConfig.put(SchemaRegistryClientWithKerberosPassword.SCHEMA_REGISTRY_CLIENT_KERBEROS_PRINCIPAL, kerberosPrincipal); schemaRegistryConfig.put(SchemaRegistryClientWithKerberosPassword.SCHEMA_REGISTRY_CLIENT_KERBEROS_PASSWORD, kerberosPassword); @@ -268,6 +269,7 @@ public void close() { } initialized = false; + usingKerberosWithPassword = false; }