nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Burgess (Jira)" <>
Subject [jira] [Updated] (MINIFI-537) Possible NullPointerException in BootstrapTransformer
Date Wed, 28 Apr 2021 16:00:05 GMT


Matt Burgess updated MINIFI-537:
    Fix Version/s:     (was: 0.6.0)

> Possible NullPointerException in BootstrapTransformer
> -----------------------------------------------------
>                 Key: MINIFI-537
>                 URL:
>             Project: Apache NiFi MiNiFi
>          Issue Type: New Feature
>            Reporter: Kevin Doran
>            Assignee: Kevin Doran
>            Priority: Major
>             Fix For: 1.14.0
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
> [] introduced the ability to override
security properties and sensitive properties in bootstrap.conf
> When using this feature, there is a potential NPE that prevents MiNiFi from starting.
> Steps to reproduce:
> In bootstrap.conf set any of the SSL/TLS properties, for example:
> {noformat}
> Leave this unset / blank:
> {noformat}
> nifi.minifi.sensitive.props.key={noformat}
> Start minifi and observe the following in app.log:
> {noformat}
> 2020-08-27 10:12:10,877 INFO [main] o.a.n.m.bootstrap.util.ConfigTransformer Bootstrap
flow override: Replaced security properties2020-08-27 10:12:10,877 INFO [main] o.a.n.m.bootstrap.util.ConfigTransformer
Bootstrap flow override: Replaced security properties2020-08-27 10:12:10,881 ERROR [main]
o.apache.nifi.minifi.bootstrap.RunMiNiFi The config file is malformed, unable to
Failed to parse the config YAML while creating the at org.apache.nifi.minifi.bootstrap.util.ConfigTransformer.writeNiFiProperties(
at org.apache.nifi.minifi.bootstrap.util.ConfigTransformer.transformConfigFile(
at org.apache.nifi.minifi.bootstrap.RunMiNiFi.performTransformation( at
org.apache.nifi.minifi.bootstrap.RunMiNiFi.start( at org.apache.nifi.minifi.bootstrap.RunMiNiFi.main(
by: java.lang.NullPointerException: null at java.util.Hashtable.put( at
org.apache.nifi.minifi.bootstrap.util.OrderedProperties.put( at
java.util.Properties.setProperty( at org.apache.nifi.minifi.bootstrap.util.OrderedProperties.setProperty(
at org.apache.nifi.minifi.bootstrap.util.ConfigTransformer.writeNiFiProperties(
... 4 common frames omitted{noformat}
> This is because when SecurityPropertiesSchema is created (caused by the override properties
in bootstrap.conf), the nested SensitivePropsSchema is created, but initialized with a null
key. This causes the NPE when this property is accessed later (unchecked) in ConfigTransformer.writeNiFiProperties.
> I think the best solution here is to always initialize SensitivePropsSchema.key to its
default value (empty string) which is what happens when it is created normally without the
bootstrap.conf overrides.

This message was sent by Atlassian Jira

View raw message