Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated HashAttribute Migration using UpdateAttribute with hash function

...

Component Class

org.apache.nifi.processors.standard.CryptographHashAttributeUpdateAttribute

Bundle Grouporg.apache.nifi
Bundle Artifactnifi-standard-nar

...

HashAttribute supports generating an MD5 digest of one more FlowFile attribute name and value pairs. The MD5 algorithm is not secure for cryptographic operations, and alternatives such as the SHA-2 or SHA-3 algorithms should be used.

The CryptographicHashAttribute UpdateAttribute Processor supports generating a digest of one or more FlowFile attributes using a configurable algorithm.Each Processor uses different approaches for specifying which FlowFile attributes to hashthe hash Expression Language function.

HashAttribute uses the Hash Value Attribute Key property to specify the destination FlowFile attribute name for the computed digest. HashAttribute uses one or more dynamic properties to provide source FlowFile attribute name, and a regular expression value to determine whether the FlowFile attribute should be included in the digest calculation. HashAttribute converts all attribute values to bytes using UTF-8 encoding.

...

PropertyValue
Hash Value Attribute Keylabel-hash
label.*

CryptographicHashAttribute UpdateAttribute uses dynamic properties to specify the source and the destination FlowFile attribute names. The Hash Algorithm property should be configured with SHA-256 or other SHA-2 algorithm.attribute name, and the attribute value as an expression.

Generating a hash attribute from a single FlowFile attribute name and value requires both standard and one dynamic propertiesproperty.

PropertyValue
label-hashlabel${label:hash('Hash AlgorithmSHA-256labellabel-hash')}

Flow Definitions

The Deprecated Flow Definition includes HashAttribute configured to write a FlowFile attribute named label-hash using the label attribute name and the value of the attribute from the incoming FlowFile.

...