Elastic Agent 9.1.5 Fingerprint Processor Bug - Different Hashes for Identical Data
Hey everyone,
I've run into a pretty serious issue with the fingerprint processor in Elastic Agent 9.1.5 that I wanted to share with the community. I'm working on log integrity verification and discovered that the fingerprint processor is producing different SHA-256 hashes for identical data, which obviously breaks everything.
What I Found
I was testing a simple setup where I copy a field and then fingerprint both the original and the copy to verify they produce the same hash. They don't.
Here's my agent configuration:
processors:
- copy_fields:
fields:
- from: message
to: message_copy
- fingerprint:
fields: ["message"]
method: sha256
target_field: fingerprint_original
- fingerprint:
fields: ["message_copy"]
method: sha256
target_field: fingerprint_copy
The results I'm getting:
fingerprint_original
:17afa9f77de7a61765a653540297eb83a334e4c04080c28270e9021c77ce94b
fingerprint_copy
:f4538632d482ca41596d4457bf99c8eca1ac800313bf1d3c0fc1803506452afaf
I've verified in Elasticsearch that both fields contain exactly the same JSON content, so the copy operation is working fine. The fingerprint processor is just being inconsistent.
Second Issue - Agent vs Ingest Pipeline
I also tested fingerprinting the same field in both the agent and an ingest pipeline to see if they match. They don't.
Agent config:
- fingerprint:
fields: ["data.stream.dataset"]
method: sha256
encoding: base64
target_field: fingerprint_original
Ingest pipeline:
{
"fingerprint": {
"fields": ["data.stream.dataset"],
"method": "SHA-256",
"target_field": "event.fingerprint_check"
}
}
Results:
- Agent:
BqsSBwNv+r2YVwm1LZJAYRZWnCvvG7YSUMGqV
- Ingest:
FVmXuXKucS93wks1gTlbrIQb2nCdCBbzfzfnr1nqck
Interestingly, when I run the ingest pipeline fingerprint processor multiple times on the same field, those results are consistent with each other. So the ingest pipeline processor seems to work correctly, but there's some inconsistency between the agent and ingest pipeline processing.
What This Means
This basically makes it impossible to implement any kind of reliable log integrity checking or tamper detection. SHA-256 hashes should be deterministic - identical input should always produce identical output. That's not happening here.
Has Anyone Else Seen This?
I'm running Agent 9.1.5 (the latest version). Has anyone else noticed fingerprint inconsistencies? I'm planning to report this as a bug, but wanted to check if others have encountered similar issues.
For now, I don't have a reliable workaround since copying the hash value instead of recomputing it only fixes the first issue, not the agent/ingest pipeline mismatch.
Any thoughts or similar experiences would be really helpful!