Skip to content

Latest commit

 

History

History
63 lines (43 loc) · 1.68 KB

README.md

File metadata and controls

63 lines (43 loc) · 1.68 KB

nifi-encrypt-value-bundle

NiFi processor to encrypt JSON values. Encrypts the values of the given fields of a FlowFile. The original value is replaced with the hashed one.

Deploy Bundle

Clone this repository

git clone https://github.com/1904labs/nifi-encrypt-value-bundle

Build the bundle

cd nifi-encrypt-value-bundle
mvn validate
mvn clean package

Copy Nar file to $NIFI_HOME/lib

cp nifi-encrypt-value-bundle/target/nifi-encrypt-value-nar-$version.nar $NIFI_HOME/lib/

Start/Restart Nifi

$NIFI_HOME/bin/nifi.sh start

Processor properties

FlowFile Format Specify the format of the incoming FlowFile. If AVRO, output is automatically Snappy compressed.

Avro Schema Specify the schema if the FlowFile format is Avro.

Field Names Comma separated list of fields whose values to encrypt.

Hash Algorithm Determines what hashing algorithm should be used to perform the encryption

Notes

  • The incoming FlowFile is expected to be one JSON per line.
  • If the Field Names property is not set, the processor automatically sends the FlowFile to the bypass relationship.
  • Avro is always Snappy compressed on output.
  • This processor uses a custom Avro library in order to handle Avro's union types. Until this issue is resolved, it will continue to use the custom library.

TODO

  • Add support for Avro files
  • Support multi-level JSON
  • Add support for more hashing algorithms
  • Support salting
  • Allow choice of Avro compression (Snappy, bzip2, etc.)
  • Infer Avro schema if not passed in
  • Better unit tests for Avro