Github user ijokarumawak commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2648#discussion_r182934080
  
    --- Diff: nifi-toolkit/nifi-toolkit-encrypt-config/pom.xml ---
    @@ -167,10 +167,12 @@
                     <groupId>org.apache.rat</groupId>
                     <artifactId>apache-rat-plugin</artifactId>
                     <configuration>
    +                    <consoleOutput>true</consoleOutput>
                         <excludes combine.children="append">
                             <exclude>src/test/resources/scrypt.py</exclude>
    -                        
<exclude>src/test/resources/secure_hash.key</exclude>
    -                        
<exclude>src/test/resources/secure_hash_128.key</exclude>
    +                        <!-- use wildcard for below files as tests 
generate additional files during the build -->
    +                        <exclude>**/secure_hash.key</exclude>
    +                        <exclude>**/secure_hash_128.key</exclude>
    --- End diff --
    
    @kevdoran Yeah, I looked at the source code and it doesn't seem to be a way 
to change output dir currently. I think it is not only a problem for test, but 
also it might be problematic in real usage. When I executed the tool, it 
generates `secure_hash.key` in current directory:
    ```
    $ ./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
    ```
    
    Since the key is baked into the bootstrap.conf, the secure_hash.key is not 
needed to be written as a file I guess. I'm new to this tool, so I can be wrong.


---

Reply via email to