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

ASF GitHub Bot commented on NIFI-5558:
--------------------------------------

Github user alopresto commented on the issue:

    https://github.com/apache/nifi/pull/2972
  
    The issue that was encountered by some users was that the previous 
mechanism for creating a test `NiFiProperties` instance was 
`NiFiProperties.createBasicNiFiProperties(String filePath, Map<String, String> 
additionalProperties)`. When provided a `null` file path, the code tried to use 
`System.getProperty("nifi.properties.file.path")` to locate the 
`nifi.properties` file. On my machine, the test code which was evaluating the 
_empty key_ scenario returned an empty `NiFiProperties` instance with only the 
overridden properties populated, but on other machines, this code was loading 
the properties from `src/test/resources/conf/nifi.properties` where the 
`nifi.sensitive.props.key=key`. Because of this, the two passwords were not 
equal, and the keys derived from them were different. When you attempt to 
decrypt data with the wrong key, a `pad block corrupted` error is common. 
    
    The tests still work for me in the following scenarios, so I need a user 
who encountered the error to validate that this fixes the issue on their 
system. 
    
    * via IntelliJ Run/Debug
    * via IntelliJ Maven execution
    * via command-line Maven execution
      * specific test using `mvn clean test 
-Dtest=PopularVoteFlowElectionFactoryBeanTest`
      * module using `.../nifi-framework-cluster $ mvn clean test`
      * full build from root
    * with JCE Unlimited Strength Jurisdiction Policies
    * without JCE USJP


> NiFi build on master fails due to decryption issue
> --------------------------------------------------
>
>                 Key: NIFI-5558
>                 URL: https://issues.apache.org/jira/browse/NIFI-5558
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Tools and Build
>         Environment: Apache Maven 3.5.0 
> (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T15:39:06-04:00)
> Java version: 1.8.0_141, vendor: Oracle Corporation
> Java home: 
> /Library/Java/JavaVirtualMachines/jdk1.8.0_141.jdk/Contents/Home/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "mac os x", version: "10.13.6", arch: "x86_64", family: "mac"
>            Reporter: Joseph Witt
>            Assignee: Andy LoPresto
>            Priority: Major
>
> ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.39 s 
> <<< FAILURE! - in 
> org.apache.nifi.cluster.coordination.flow.PopularVoteFlowElectionFactoryBeanTest
> [ERROR] 
> testGetObjectShouldPopulateDefaultSensitivePropsKeyIfEmpty(org.apache.nifi.cluster.coordination.flow.PopularVoteFlowElectionFactoryBeanTest)
>   Time elapsed: 1.318 s  <<< ERROR!
> org.apache.nifi.encrypt.EncryptionException: 
> org.apache.nifi.encrypt.EncryptionException: Could not decrypt sensitive value
>       at 
> org.apache.nifi.cluster.coordination.flow.PopularVoteFlowElectionFactoryBeanTest.testGetObjectShouldPopulateDefaultSensitivePropsKeyIfEmpty(PopularVoteFlowElectionFactoryBeanTest.groovy:82)
> Caused by: org.apache.nifi.encrypt.EncryptionException: Could not decrypt 
> sensitive value
>       at 
> org.apache.nifi.cluster.coordination.flow.PopularVoteFlowElectionFactoryBeanTest.testGetObjectShouldPopulateDefaultSensitivePropsKeyIfEmpty(PopularVoteFlowElectionFactoryBeanTest.groovy:82)
> Caused by: javax.crypto.BadPaddingException: pad block corrupted
>       at 
> org.apache.nifi.cluster.coordination.flow.PopularVoteFlowElectionFactoryBeanTest.testGetObjectShouldPopulateDefaultSensitivePropsKeyIfEmpty(PopularVoteFlowElectionFactoryBeanTest.groovy:82)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to