logstash-filter-fingerprint 3.4.1 → 3.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/docs/index.asciidoc +2 -2
- data/lib/logstash/filters/fingerprint.rb +4 -4
- data/logstash-filter-fingerprint.gemspec +2 -2
- data/spec/filters/fingerprint_spec.rb +7 -7
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4840dc48f443b48ea2c6b92ad67fa69babbd2df840c01f3a28e380053ae4679e
|
4
|
+
data.tar.gz: b53dc8974b796e3213b7f750118c5655d9d37ef23f9117b4ef997c410e3f72af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3479895f5cd57cead69ca66a3974bc7f210f14767b4cdc4be7027eb57c2d4b3d40b6874b436f87a315a8064569cc6d937de08bd8d1a483aeb52c9f9d6c403f92
|
7
|
+
data.tar.gz: 96b87468c7aa651a6c11d79d6820368ada168877919ee53f900190c09aaefd5948d081ae4e4a1de826805d2fb7847209b2ade1b63ac94ff4a3a2911e20ef797d
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 3.4.3
|
2
|
+
- pin murmurhash3 to 0.1.6 [#74](https://github.com/logstash-plugins/logstash-filter-fingerprint/pull/74)
|
3
|
+
|
4
|
+
## 3.4.2
|
5
|
+
- Key config type changed to `Password` type for better protection from leaks. [#71](https://github.com/logstash-plugins/logstash-filter-fingerprint/pull/71)
|
6
|
+
|
1
7
|
## 3.4.1
|
2
8
|
- Added backward compatibility of timestamp format to provide consistent fingerprint [#67](https://github.com/logstash-plugins/logstash-filter-fingerprint/pull/67)
|
3
9
|
|
data/docs/index.asciidoc
CHANGED
@@ -59,7 +59,7 @@ This plugin supports the following configuration options plus the <<plugins-{typ
|
|
59
59
|
| <<plugins-{type}s-{plugin}-concatenate_sources>> |<<boolean,boolean>>|No
|
60
60
|
| <<plugins-{type}s-{plugin}-concatenate_all_fields>> |<<boolean,boolean>>|No
|
61
61
|
| <<plugins-{type}s-{plugin}-ecs_compatibility>> | <<string,string>>|No
|
62
|
-
| <<plugins-{type}s-{plugin}-key>> |<<
|
62
|
+
| <<plugins-{type}s-{plugin}-key>> |<<password,password>>|No
|
63
63
|
| <<plugins-{type}s-{plugin}-method>> |<<string,string>>, one of `["SHA1", "SHA256", "SHA384", "SHA512", "MD5", "MURMUR3", "MURMUR3_128", IPV4_NETWORK", "UUID", "PUNCTUATION"]`|Yes
|
64
64
|
| <<plugins-{type}s-{plugin}-source>> |<<array,array>>|No
|
65
65
|
| <<plugins-{type}s-{plugin}-target>> |<<string,string>>|No
|
@@ -164,7 +164,7 @@ See <<plugins-{type}s-{plugin}-ecs_metadata>> for detailed information.
|
|
164
164
|
[id="plugins-{type}s-{plugin}-key"]
|
165
165
|
===== `key`
|
166
166
|
|
167
|
-
* Value type is <<
|
167
|
+
* Value type is <<password,password>>
|
168
168
|
* There is no default value for this setting.
|
169
169
|
|
170
170
|
When used with the `IPV4_NETWORK` method fill in the subnet prefix length.
|
@@ -61,7 +61,7 @@ class LogStash::Filters::Fingerprint < LogStash::Filters::Base
|
|
61
61
|
|
62
62
|
# When used with the `IPV4_NETWORK` method fill in the subnet prefix length.
|
63
63
|
# With other methods, optionally fill in the HMAC key.
|
64
|
-
config :key, :validate => :
|
64
|
+
config :key, :validate => :password
|
65
65
|
|
66
66
|
# When set to `true`, the `SHA1`, `SHA256`, `SHA384`, `SHA512`, `MD5` and `MURMUR3_128` fingerprint
|
67
67
|
# methods will produce base64 encoded rather than hex encoded strings.
|
@@ -199,7 +199,7 @@ class LogStash::Filters::Fingerprint < LogStash::Filters::Base
|
|
199
199
|
|
200
200
|
def fingerprint_ipv4_network(ip_string)
|
201
201
|
# in JRuby 1.7.11 outputs as US-ASCII
|
202
|
-
IPAddr.new(ip_string).mask(@key.to_i).to_s.force_encoding(Encoding::UTF_8)
|
202
|
+
IPAddr.new(ip_string).mask(@key.value.to_i).to_s.force_encoding(Encoding::UTF_8)
|
203
203
|
end
|
204
204
|
|
205
205
|
def fingerprint_openssl(data)
|
@@ -220,10 +220,10 @@ class LogStash::Filters::Fingerprint < LogStash::Filters::Base
|
|
220
220
|
end
|
221
221
|
else
|
222
222
|
if @base64encode
|
223
|
-
hash = OpenSSL::HMAC.digest(digest, @key, data.to_s)
|
223
|
+
hash = OpenSSL::HMAC.digest(digest, @key.value, data.to_s)
|
224
224
|
Base64.strict_encode64(hash).force_encoding(Encoding::UTF_8)
|
225
225
|
else
|
226
|
-
OpenSSL::HMAC.hexdigest(digest, @key, data.to_s).force_encoding(Encoding::UTF_8)
|
226
|
+
OpenSSL::HMAC.hexdigest(digest, @key.value, data.to_s).force_encoding(Encoding::UTF_8)
|
227
227
|
end
|
228
228
|
end
|
229
229
|
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.4.
|
4
|
+
s.version = '3.4.3'
|
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"
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
|
22
22
|
# Gem dependencies
|
23
23
|
s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
|
24
|
-
s.add_runtime_dependency "murmurhash3"
|
24
|
+
s.add_runtime_dependency "murmurhash3", "= 0.1.6" #(MIT license)
|
25
25
|
s.add_development_dependency 'logstash-devutils'
|
26
26
|
s.add_runtime_dependency 'logstash-mixin-ecs_compatibility_support', '~>1.2'
|
27
27
|
end
|
@@ -29,7 +29,7 @@ describe LogStash::Filters::Fingerprint, :ecs_compatibility_support, :aggregate_
|
|
29
29
|
|
30
30
|
describe "the IPV4_NETWORK method" do
|
31
31
|
let(:fingerprint_method) { "IPV4_NETWORK" }
|
32
|
-
let(:config) { super().merge("key" => 24) }
|
32
|
+
let(:config) { super().merge("key" => ::LogStash::Util::Password.new("24")) }
|
33
33
|
|
34
34
|
it "fingerprints the ip as the network" do
|
35
35
|
expect(fingerprint).to eq("123.123.123.0")
|
@@ -115,7 +115,7 @@ describe LogStash::Filters::Fingerprint, :ecs_compatibility_support, :aggregate_
|
|
115
115
|
end
|
116
116
|
|
117
117
|
context "with HMAC" do
|
118
|
-
let(:config) { super().merge("key" => "longencryptionkey") }
|
118
|
+
let(:config) { super().merge("key" => ::LogStash::Util::Password.new("longencryptionkey")) }
|
119
119
|
|
120
120
|
it "fingerprints the value" do
|
121
121
|
expect(fingerprint).to eq("fdc60acc4773dc5ac569ffb78fcb93c9630797f4")
|
@@ -141,7 +141,7 @@ describe LogStash::Filters::Fingerprint, :ecs_compatibility_support, :aggregate_
|
|
141
141
|
expect(fingerprint).to eq("4dabcab210766e35f03e77120e6986d6e6d4752b2a9ff22980b9253d026080d8")
|
142
142
|
end
|
143
143
|
context "with HMAC" do
|
144
|
-
let(:config) { super().merge("key" => "longencryptionkey") }
|
144
|
+
let(:config) { super().merge("key" => ::LogStash::Util::Password.new("longencryptionkey")) }
|
145
145
|
it "fingerprints the value" do
|
146
146
|
expect(fingerprint).to eq("345bec3eff242d53b568916c2610b3e393d885d6b96d643f38494fd74bf4a9ca")
|
147
147
|
end
|
@@ -160,7 +160,7 @@ describe LogStash::Filters::Fingerprint, :ecs_compatibility_support, :aggregate_
|
|
160
160
|
expect(fingerprint).to eq("fd605b0a3af3e04ce0d7a0b0d9c48d67a12dab811f60072e6eae84e35d567793ffb68a1807536f11c90874065c2a4392")
|
161
161
|
end
|
162
162
|
context "with HMAC" do
|
163
|
-
let(:config) { super().merge("key" => "longencryptionkey") }
|
163
|
+
let(:config) { super().merge("key" => ::LogStash::Util::Password.new("longencryptionkey")) }
|
164
164
|
it "fingerprints the value" do
|
165
165
|
expect(fingerprint).to eq("22d4c0e8c4fbcdc4887d2038fca7650f0e2e0e2457ff41c06eb2a980dded6749561c814fe182aff93e2538d18593947a")
|
166
166
|
end
|
@@ -178,7 +178,7 @@ describe LogStash::Filters::Fingerprint, :ecs_compatibility_support, :aggregate_
|
|
178
178
|
expect(fingerprint).to eq("5468e2dc64ea92b617782aae884b35af60041ac9e168a283615b6a462c54c13d42fa9542cce9b7d76a8124ac6616818905e3e5dd35d6e519f77c3b517558639a")
|
179
179
|
end
|
180
180
|
context "with HMAC" do
|
181
|
-
let(:config) { super().merge("key" => "longencryptionkey") }
|
181
|
+
let(:config) { super().merge("key" => ::LogStash::Util::Password.new("longencryptionkey")) }
|
182
182
|
it "fingerprints the value" do
|
183
183
|
expect(fingerprint).to eq("11c19b326936c08d6c50a3c847d883e5a1362e6a64dd55201a25f2c1ac1b673f7d8bf15b8f112a4978276d573275e3b14166e17246f670c2a539401c5bfdace8")
|
184
184
|
end
|
@@ -196,7 +196,7 @@ describe LogStash::Filters::Fingerprint, :ecs_compatibility_support, :aggregate_
|
|
196
196
|
expect(fingerprint).to eq("ccdd8d3d940a01b2fb3258c059924c0d")
|
197
197
|
end
|
198
198
|
context "with HMAC" do
|
199
|
-
let(:config) { super().merge("key" => "longencryptionkey") }
|
199
|
+
let(:config) { super().merge("key" => ::LogStash::Util::Password.new("longencryptionkey")) }
|
200
200
|
it "fingerprints the value" do
|
201
201
|
expect(fingerprint).to eq("9336c879e305c9604a3843fc3e75948f")
|
202
202
|
end
|
@@ -281,7 +281,7 @@ describe LogStash::Filters::Fingerprint, :ecs_compatibility_support, :aggregate_
|
|
281
281
|
let(:config) { super().merge("source" => ['@timestamp']) }
|
282
282
|
|
283
283
|
describe 'OpenSSL Fingerprinting' do
|
284
|
-
let(:config) { super().merge("key" =>
|
284
|
+
let(:config) { super().merge("key" => ::LogStash::Util::Password.new("0123")) }
|
285
285
|
let(:fingerprint_method) { "SHA1" }
|
286
286
|
let(:data) { { "@timestamp" => epoch_time } }
|
287
287
|
it "fingerprints the timestamp correctly" do
|
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.4.
|
4
|
+
version: 3.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -33,17 +33,17 @@ dependencies:
|
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
requirement: !ruby/object:Gem::Requirement
|
35
35
|
requirements:
|
36
|
-
- -
|
36
|
+
- - '='
|
37
37
|
- !ruby/object:Gem::Version
|
38
|
-
version:
|
38
|
+
version: 0.1.6
|
39
39
|
name: murmurhash3
|
40
40
|
prerelease: false
|
41
41
|
type: :runtime
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
|
-
- -
|
44
|
+
- - '='
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
46
|
+
version: 0.1.6
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
49
49
|
requirements:
|
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
111
|
- !ruby/object:Gem::Version
|
112
112
|
version: '0'
|
113
113
|
requirements: []
|
114
|
-
rubygems_version: 3.
|
114
|
+
rubygems_version: 3.2.33
|
115
115
|
signing_key:
|
116
116
|
specification_version: 4
|
117
117
|
summary: Fingerprints fields by replacing values with a consistent hash
|