SHA2 Filter

The foglamp-filter-sha2 plugin computes a SHA-2 hash of a reading’s JSON representation and stores the hash as a new datapoint within the reading. This allows verification of the data integrity in order to detect potential modifications to the data later in the data pipeline.

This filter is useful for:

  • Verifying if readings have been modified since the point in the pipeline at which the filter added the SHA-2.

  • Providing a mechanism to verify whether a reading has been altered.

  • Enabling data tampering detection when used alongside foglamp-filter-sha2verify.

The name of the datapoint to which the SHA-2 hash is written can be set via the plugin configuration. The default datapoint name is SHA-2.

Note

The SHA-2 hash includes the name and value of all datapoints in the reading. This ensures name changes, value changes, addition or removal of a datapoint will be detected.

Adding the SHA2 Filter

SHA2 filters are added in the same way as any other filters:

sha2

  • SHA-2 Datapoint Name : Name for the data point to hold the SHA-2 hash value

  • Enabled : Enable or Disable Filter

  • Click Done to activate it