You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first sentence of the documentation about this plugin says: Create consistent hashes (fingerprints) of one or more fields and store the result in a new field.
However nowhere in the documentation it is documented how the plugin serializes the fields, for example if it sorts the keys and values, in case one of the following is specified:
concatenate_sources = true
concatenate_all_fields = true
Studying the plugin's source code, I can observe that property keys within an object are sorted somehow (in the natural order perhaps?) and that items within an array are probably not sorted.
However if the plugin claims to create consistent hashes, it shall also document the process, so that the hash can be re-created later.
Consider the following document which is being ingested by a logstash pipeline:
So the question now is: how fingerprint plugin builds the string which is then fed into sha256 digest?
The documentation says only:
When set to true and method isn’t UUID or PUNCTUATION, the plugin concatenates the names and values of all fields of the event into one string (like the old checksum filter) before doing the fingerprint computation. If false and at least one source field is given, the target field will be an array with fingerprints of the source fields given.
However the documentation says nothing about the serialization details, which are necessary to know so that the hash can be reconstructed. In particular:
how are serialized nested objects? (consider log or host in the example; what are the delimiters? is breadth-first or depth-first algorithm used? etc.)
how are serialized properties within one object? (i.e. are the keys sorted? if yes, how?; what are the delimiters? etc.)
how are serialized items of an array? (are the items sorted? if yes, how?; what are the delimiters? etc.)
The text was updated successfully, but these errors were encountered:
The first sentence of the documentation about this plugin says: Create consistent hashes (fingerprints) of one or more fields and store the result in a new field.
However nowhere in the documentation it is documented how the plugin serializes the fields, for example if it sorts the keys and values, in case one of the following is specified:
Studying the plugin's source code, I can observe that property keys within an object are sorted somehow (in the natural order perhaps?) and that items within an array are probably not sorted.
However if the plugin claims to create consistent hashes, it shall also document the process, so that the hash can be re-created later.
Consider the following document which is being ingested by a logstash pipeline:
Let's also consider the following fingerprint plugin configuration:
So the question now is: how fingerprint plugin builds the string which is then fed into sha256 digest?
The documentation says only:
However the documentation says nothing about the serialization details, which are necessary to know so that the hash can be reconstructed. In particular:
log
orhost
in the example; what are the delimiters? is breadth-first or depth-first algorithm used? etc.)The text was updated successfully, but these errors were encountered: