You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Koji Kawamura (JIRA)" <ji...@apache.org> on 2018/04/20 03:51:00 UTC

[jira] [Updated] (NIFI-5100) Toolkit encrypt-config.sh should expose an option to specify where to store secure_hash.key

     [ https://issues.apache.org/jira/browse/NIFI-5100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Koji Kawamura updated NIFI-5100:
--------------------------------
    Summary: Toolkit encrypt-config.sh should expose an option to specify where to store secure_hash.key  (was: Fix travis RAT check failure at nifi-toolkit-encrypt-config project)

> Toolkit encrypt-config.sh should expose an option to specify where to store secure_hash.key
> -------------------------------------------------------------------------------------------
>
>                 Key: NIFI-5100
>                 URL: https://issues.apache.org/jira/browse/NIFI-5100
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Tools and Build
>            Reporter: Koji Kawamura
>            Priority: Major
>
> After NIFI-4942 is merged, master branch has been failing due to following RAT check error:
> {code:java}
> [INFO] --- apache-rat-plugin:0.12:check (default) @ nifi-toolkit-encrypt-config ---
> [INFO] Enabled default license matchers.
> [INFO] Will parse SCM ignores for exclusions...
> [INFO] Finished adding exclusions from SCM ignore files.
> [INFO] 61 implicit excludes (use -debug for more details).
> [INFO] Exclude: nb-configuration.xml
> [INFO] Exclude: nbactions.xml
> [INFO] Exclude: DEPENDENCIES
> [INFO] Exclude: .github/PULL_REQUEST_TEMPLATE.md
> [INFO] Exclude: src/test/resources/scrypt.py
> [INFO] Exclude: src/test/resources/secure_hash.key
> [INFO] Exclude: src/test/resources/secure_hash_128.key
> [INFO] 92 resources included (use -debug for more details)
> [INFO] Rat check: Summary over all files. Unapproved: 1, unknown: 1, generated: 0, approved: 88 licenses.
> {code}
> The project RAT check passes successfully if I run the contrib-check locally. However, there's a difference in the output. Here is what I get when I run it locally:
> {code:java}
> [INFO] 91 resources included (use -debug for more details)
> [INFO] Rat check: Summary over all files. Unapproved: 0, unknown: 0, generated: 0, approved: 88 licenses.
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> {code}
> There is one more resources being checked when the test runs on Travis. I did the test on Ubuntu then confirmed following file is created, and it produces the RAT check error.
> {code:java}
> nifi-toolkit/nifi-toolkit-encrypt-config/secure_hash.key
> {code}
> Debugged further, I found following test creates the file:
> {code:java}
> mvn --projects nifi-toolkit/nifi-toolkit-encrypt-config -Pcontrib-check -Dtest=org.apache.nifi.toolkit.encryptconfig.EncryptConfigMainTest#testShouldPerformFullOperationForNiFiPropertiesAndLoginIdentityProvidersAndAuthorizers test
> {code}
> The test class should NOT create such file.
> Actually the file is created by ConfigEncryptionTool.groovy. And the destination of the file can not be changed from current directory.
> https://github.com/apache/nifi/blob/master/nifi-toolkit/nifi-toolkit-encrypt-config/src/main/groovy/org/apache/nifi/properties/ConfigEncryptionTool.groovy#L71
> The 'secure_hash.key' is always created at current directory. The tool should expose where to write the file.
> {code}
>  ./bin/encrypt-config.sh -n /tmp/enc-test/nifi.properties -o /tmp/enc-test/nifi-enc.properties -b /tmp/enc-test/bootstrap.conf --verbose
> $ ll
> total 60
> drwxrwxr-x 6 nifi nifi  4096 Apr 20 02:42 ./
> drwxrwxr-x 3 nifi nifi  4096 Apr 19 03:57 ../
> drwxr-xr-x 2 nifi nifi  4096 Apr 19 01:45 bin/
> drwxr-xr-x 3 nifi nifi  4096 Apr 19 01:45 classpath/
> drwxr-xr-x 2 nifi nifi  4096 Apr 19 01:45 conf/
> drwxrwxr-x 2 nifi nifi 12288 Apr 19 03:57 lib/
> -rw-r--r-- 1 nifi nifi 15986 Apr 19 01:45 LICENSE
> -rw-r--r-- 1 nifi nifi  5473 Apr 19 01:45 NOTICE
> -rw------- 1 nifi nifi    91 Apr 20 02:42 secure_hash.key
>  {code}



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