Kevin Doran created NIFI-15842:
----------------------------------

             Summary: NPE in ParameterProviderSecretsManager when 
SecretReference has null fullyQualifiedName
                 Key: NIFI-15842
                 URL: https://issues.apache.org/jira/browse/NIFI-15842
             Project: Apache NiFi
          Issue Type: Bug
          Components: Core Framework
    Affects Versions: 2.9.0
            Reporter: Kevin Doran
            Assignee: Kevin Doran


When a connector's configuration contains a SECRET_REFERENCE property with 
providerName populated but fullyQualifiedSecretName set to null (representing a 
secret-type property that has not been configured yet), the NiFi framework 
throws a NullPointerException during connector installation:
 
{code}
Error fetching parameters for ParameterProvider[id=...]: Cannot invoke 
"String.startsWith(String)" because "fqn" is null
{code}
 
*Root cause:*
 
{\{ParameterProviderSecretsManager}} collects \{{fullyQualifiedName}} from all 
\{{SecretReference}} objects into a list and passes it to 
\{{ParameterProvider.fetchParameters()}}. When a reference has a null FQN 
(valid state — the secret property is defined but not yet configured), the null 
is added to the list. The default \{{fetchParameters(context, list)}} 
implementation in \{{ParameterProvider}} iterates the list and calls 
\{{startsWith()}} on each entry, which throws NPE on the null.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to