nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (Jira)" <j...@apache.org>
Subject [jira] [Commented] (NIFI-6978) Log which encrypted configuration value is improperly formatted
Date Thu, 09 Jan 2020 21:52:00 GMT

    [ https://issues.apache.org/jira/browse/NIFI-6978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17012250#comment-17012250
] 

ASF subversion and git services commented on NIFI-6978:
-------------------------------------------------------

Commit 0ae200252fb3f02b7659b189eaa6868ac67e0069 in nifi's branch refs/heads/master from mtien
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=0ae2002 ]

NIFI-6978 added code and unit test to throw IllegalArgumentException when improper value given

This closes #3960.

Signed-off-by: Andy LoPresto <alopresto@apache.org>


> Log which encrypted configuration value is improperly formatted
> ---------------------------------------------------------------
>
>                 Key: NIFI-6978
>                 URL: https://issues.apache.org/jira/browse/NIFI-6978
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework
>    Affects Versions: 1.10.0
>            Reporter: Andy LoPresto
>            Assignee: M Tien
>            Priority: Minor
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> As reported on the mailing list, a user has improperly formatted encrypted configuration
value in {{nifi.properties}} or another configuration file. The error message in {{nifi-app.log}}
is:
> {code}
> 2019-12-31 05:42:26,515 INFO [main] o.a.n.properties.ProtectedNiFiProperties There are
5 protected properties of 5 sensitive properties (100%)
> 2019-12-31 05:42:26,517 ERROR [main] org.apache.nifi.NiFi Failure to launch NiFi due
to java.lang.IllegalArgumentException: There was an issue decrypting protected properties
> java.lang.IllegalArgumentException: There was an issue decrypting protected properties
> at org.apache.nifi.NiFi.initializeProperties(NiFi.java:341)
> at org.apache.nifi.NiFi.convertArgumentsToValidatedNiFiProperties(NiFi.java:309)
> at org.apache.nifi.NiFi.main(NiFi.java:300)
> Caused by: java.lang.IllegalArgumentException: The cipher text does not contain the delimiter
|| -- it should be of the form Base64(IV) || Base64(cipherText)
> at org.apache.nifi.properties.AESSensitivePropertyProvider.unprotect(AESSensitivePropertyProvider.java:217)
> at org.apache.nifi.properties.ProtectedNiFiProperties.unprotectValue(ProtectedNiFiProperties.java:524)
> at org.apache.nifi.properties.ProtectedNiFiProperties.getUnprotectedProperties(ProtectedNiFiProperties.java:343)
> at org.apache.nifi.properties.NiFiPropertiesLoader.load(NiFiPropertiesLoader.java:209)
> at org.apache.nifi.properties.NiFiPropertiesLoader.load(NiFiPropertiesLoader.java:223)
> at org.apache.nifi.properties.NiFiPropertiesLoader.loadDefault(NiFiPropertiesLoader.java:130)
> at org.apache.nifi.properties.NiFiPropertiesLoader.get(NiFiPropertiesLoader.java:241)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.apache.nifi.NiFi.initializeProperties(NiFi.java:336)
> ... 2 common frames omitted
> Received trapped signal, beginning shutdown...
> {code}
> The relevant code in {{ProtectedNiFiProperties.java}} is:
> {code}
>             try {
>                 SensitivePropertyProvider sensitivePropertyProvider = getSensitivePropertyProvider(protectionScheme);
>                 return sensitivePropertyProvider.unprotect(retrievedValue);
>             } catch (SensitivePropertyProtectionException e) {
>                 throw new SensitivePropertyProtectionException("Error unprotecting value
for " + key, e.getCause());
>             }
> {code}
> Currently, the {{IllegalArgumentException}} is not caught here, so the specific improperly-formatted
value is not identified in the log. Manual inspection of the file is required. 
> The {{IAE}} should be caught in the same block and treated identically. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message