logstash-filter-fingerprint 3.2.3 → 3.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/docs/index.asciidoc +1 -1
- data/lib/logstash/filters/fingerprint.rb +2 -2
- data/logstash-filter-fingerprint.gemspec +1 -1
- data/spec/filters/fingerprint_spec.rb +12 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5525ff933ff4bd23a530926cbe02de0305a5516e4ddcd6e5e070ba145e17bbe2
|
4
|
+
data.tar.gz: 7bab5438407ba87a4540ff9011edaa49373af4c0d7c05eab8ea0cf0e4118e060
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e3b49516ae015fe0d9e9fcf03aae19eb74b3fcc5c812a5184ef34e783653f54342077d54743a6b7239dbd0c7af8b8fb0af9264297a16cd379ac268a6855da5d
|
7
|
+
data.tar.gz: 19a1ad9caad856601bcdd4cbe2ad0028645068e6627a09ac505b47a482a22bb7839537af7976982dcc8f932d3bbbe52db34bb5c374b66b6bd43fcdd430127c0d
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## 3.2.4
|
2
|
+
- Fixed the error in Murmur3 with Integer [#61](https://github.com/logstash-plugins/logstash-filter-fingerprint/pull/61)
|
3
|
+
|
1
4
|
## 3.2.3
|
2
5
|
- [DOC] Expanded description for concatenate_sources behavior and provided examples [#60](https://github.com/logstash-plugins/logstash-filter-fingerprint/pull/60)
|
3
6
|
|
data/docs/index.asciidoc
CHANGED
@@ -156,7 +156,7 @@ the cryptographic hash function with the same name will be used to generate
|
|
156
156
|
the fingerprint. When a key set, the keyed-hash (HMAC) digest function will
|
157
157
|
be used.
|
158
158
|
|
159
|
-
If set to `MURMUR3` the non-cryptographic MurmurHash function will be used.
|
159
|
+
If set to `MURMUR3` the non-cryptographic 64 bit MurmurHash function will be used.
|
160
160
|
|
161
161
|
If set to `IPV4_NETWORK` the input data needs to be a IPv4 address and
|
162
162
|
the hash value will be the masked-out address using the number of bits
|
@@ -193,8 +193,8 @@ class LogStash::Filters::Fingerprint < LogStash::Filters::Base
|
|
193
193
|
|
194
194
|
def fingerprint_murmur3(value)
|
195
195
|
case value
|
196
|
-
when
|
197
|
-
MurmurHash3::V32.
|
196
|
+
when Integer
|
197
|
+
MurmurHash3::V32.int64_hash(value)
|
198
198
|
else
|
199
199
|
MurmurHash3::V32.str_hash(value.to_s)
|
200
200
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-filter-fingerprint'
|
4
|
-
s.version = '3.2.
|
4
|
+
s.version = '3.2.4'
|
5
5
|
s.licenses = ['Apache-2.0']
|
6
6
|
s.summary = "Fingerprints fields by replacing values with a consistent hash"
|
7
7
|
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
|
@@ -32,8 +32,18 @@ describe LogStash::Filters::Fingerprint do
|
|
32
32
|
describe "the MURMUR3 method" do
|
33
33
|
let(:fingerprint_method) { "MURMUR3" }
|
34
34
|
|
35
|
-
|
36
|
-
|
35
|
+
context "string" do
|
36
|
+
it "fingerprints the value" do
|
37
|
+
expect(fingerprint).to eq(4013733395)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
context "number" do
|
42
|
+
let(:data) { {"clientip" => 123 } }
|
43
|
+
|
44
|
+
it "fingerprints the value" do
|
45
|
+
expect(fingerprint).to eq(823512154)
|
46
|
+
end
|
37
47
|
end
|
38
48
|
end
|
39
49
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-filter-fingerprint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|