logstash-input-beats 6.2.2-java → 6.2.6-java

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 187ef06d14ac3b4ccab2dffde80f1f54e0dc0c08ddcf5383022d1181200626c1
4
- data.tar.gz: e4d0d2f120146186225a3e239e589691b7a051ca5b67b476e34c1b4a997950eb
3
+ metadata.gz: d37545b0bccc0905fa37d874a04058d85b49e5cbec4a7a466612fdb5ffc0432a
4
+ data.tar.gz: 79a86135a8c619d9bb09ac7ca2cadb0dd6a73a029769dcc27d20f47eb8a32dab
5
5
  SHA512:
6
- metadata.gz: fb532b95ec66cf1fa7a7df02f2b7f9286298974deef2ac75633a6bdb12abd7a1ef7c51f72b3b90e64f822e96bac20d5280ade15fabcb1e3734e8e9e4218d9623
7
- data.tar.gz: 7d1bdd0693e3b00e6401efbfee45728566eef845630dfbb69ba0f5224d254747a159890b186187675e6bb29cc62b74c5e99b20a9439cd06806a4b067c3842504
6
+ metadata.gz: 7f5b024e80a9948a64d8de39b3036df0638af338e6fca29286c21b580114717b24dd655afc13ae9ced1160c8d52a1819bd7fce7ba273253d0d0a0b5013417450
7
+ data.tar.gz: 25f56be14791b4a93d7e48b71ba7b17428cd16110428c51a1c0f19f3e0240cc3bf1cbfc124f8b725de152827c9709e62989c49d862a38cc17c75067538c5376d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ## 6.2.6
2
+ - Update guidance regarding the private key format and encoding [#445](https://github.com/logstash-plugins/logstash-input-beats/pull/445)
3
+
4
+ ## 6.2.5
5
+ - Build: do not package log4j-api dependency [#441](https://github.com/logstash-plugins/logstash-input-beats/pull/441).
6
+ Logstash provides the log4j framework and the dependency is not needed except testing and compiling.
7
+
8
+ ## 6.2.4
9
+ - Updated log4j dependency to 2.17.0
10
+
11
+ ## 6.2.3
12
+ - Updated log4j dependency to 2.15.0
13
+
1
14
  ## 6.2.2
2
15
  - Fix: update to Gradle 7 [#432](https://github.com/logstash-plugins/logstash-input-beats/pull/432)
3
16
  - [DOC] Edit documentation for `executor_threads` [#435](https://github.com/logstash-plugins/logstash-input-beats/pull/435)
data/README.md CHANGED
@@ -45,6 +45,13 @@ bundle install
45
45
  bundle exec rspec
46
46
  ```
47
47
 
48
+ - Run integration tests
49
+
50
+ ```sh
51
+ bundle exec rake test:integration:setup
52
+ bundle exec rspec spec --tag integration -fd
53
+ ```
54
+
48
55
  ### 2. Running your unpublished Plugin in Logstash
49
56
 
50
57
  #### 2.1 Run in a local Logstash clone
@@ -95,4 +102,4 @@ Programming is not a required skill. Whatever you've seen about open source and
95
102
 
96
103
  It is more important to the community that you are able to contribute.
97
104
 
98
- For more information about contributing, see the [CONTRIBUTING](https://github.com/elastic/logstash/blob/master/CONTRIBUTING.md) file.
105
+ For more information about contributing, see the [CONTRIBUTING](https://github.com/elastic/logstash/blob/master/CONTRIBUTING.md) file.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 6.2.2
1
+ 6.2.6
data/docs/index.asciidoc CHANGED
@@ -313,8 +313,14 @@ Time in milliseconds for an incomplete ssl handshake to timeout
313
313
  * There is no default value for this setting.
314
314
 
315
315
  SSL key to use.
316
- NOTE: This key need to be in the PKCS8 format, you can convert it with https://www.openssl.org/docs/man1.1.0/apps/pkcs8.html[OpenSSL]
317
- for more information.
316
+ This key must be in the PKCS8 format and PEM encoded.
317
+ You can use the https://www.openssl.org/docs/man1.1.1/man1/openssl-pkcs8.html[openssl pkcs8] command to complete the conversion.
318
+ For example, the command to convert a PEM encoded PKCS1 private key to a PEM encoded, non-encrypted PKCS8 key is:
319
+
320
+ [source,sh]
321
+ -----
322
+ openssl pkcs8 -inform PEM -in path/to/logstash.key -topk8 -nocrypt -outform PEM -out path/to/logstash.pkcs8.key
323
+ -----
318
324
 
319
325
  [id="plugins-{type}s-{plugin}-ssl_key_passphrase"]
320
326
  ===== `ssl_key_passphrase`
@@ -7,5 +7,4 @@ require_jar('com.fasterxml.jackson.core', 'jackson-core', '2.9.10')
7
7
  require_jar('com.fasterxml.jackson.core', 'jackson-annotations', '2.9.10')
8
8
  require_jar('com.fasterxml.jackson.core', 'jackson-databind', '2.9.10.8')
9
9
  require_jar('com.fasterxml.jackson.module', 'jackson-module-afterburner', '2.9.10')
10
- require_jar('org.apache.logging.log4j', 'log4j-api', '2.11.1')
11
- require_jar('org.logstash.beats', 'logstash-input-beats', '6.2.2')
10
+ require_jar('org.logstash.beats', 'logstash-input-beats', '6.2.6')
@@ -166,7 +166,14 @@ describe LogStash::Inputs::Beats do
166
166
  end
167
167
 
168
168
  context "tls meta-data" do
169
- let(:config) { super().merge("host" => host, "ssl_peer_metadata" => true, "ssl_certificate_authorities" => [ certificate.ssl_cert ]) }
169
+ let(:config) do
170
+ super().merge(
171
+ "host" => host,
172
+ "ssl_peer_metadata" => true,
173
+ "ssl_certificate_authorities" => [ certificate.ssl_cert ],
174
+ "ecs_compatibility" => 'disabled'
175
+ )
176
+ end
170
177
  let(:host) { "192.168.1.20" }
171
178
  let(:port) { 9002 }
172
179
 
@@ -177,27 +177,34 @@ describe "Filebeat", :integration => true do
177
177
  # Refactor this to use Flores's PKI instead of openssl command line
178
178
  # see: https://github.com/jordansissel/ruby-flores/issues/7
179
179
  context "with a passphrase" do
180
- let!(:temporary_directory) { Stud::Temporary.pathname }
181
- let(:certificate_key_file) { ::File.join(temporary_directory, "certificate.key") }
182
- let(:certificate_key_file_pkcs8) { ::File.join(temporary_directory, "certificate.pkcs8.key") }
183
- let(:certificate_file) { ::File.join(temporary_directory, "certificate.crt") }
184
- let(:passphrase) { "foobar" }
185
- let(:beats) {
186
- # Since we are using a shared context, this not obvious to make sure the openssl command
187
- # is run before starting beats so we do it just before initializing it.
188
- FileUtils.mkdir_p(temporary_directory)
189
- openssl_cmd = "openssl req -x509 -batch -newkey rsa:2048 -keyout #{temporary_directory}/certificate.key -out #{temporary_directory}/certificate.crt -subj /CN=localhost -passout pass:#{passphrase}"
190
- system(openssl_cmd)
191
- convert_key_cmd = "openssl pkcs8 -topk8 -in #{temporary_directory}/certificate.key -out #{certificate_key_file_pkcs8} -passin pass:#{passphrase} -passout pass:#{passphrase}"
192
- system(convert_key_cmd)
193
-
194
- LogStash::Inputs::Beats.new(input_config)
195
- }
196
- let(:input_config) {
197
- super().merge({
198
- "ssl_key_passphrase" => passphrase,
199
- "ssl_key" => certificate_key_file_pkcs8
200
- })}
180
+
181
+ before(:all) do
182
+ @passphrase = "foobar".freeze
183
+
184
+ FileUtils.mkdir_p temporary_directory = Stud::Temporary.pathname
185
+
186
+ cert_key = ::File.join(temporary_directory, "certificate.key")
187
+ @cert_pub = ::File.join(temporary_directory, "certificate.crt")
188
+ @cert_key_pkcs8 = ::File.join(temporary_directory, "certificate.key.pkcs8")
189
+
190
+ cmd = "openssl req -x509 -batch -newkey rsa:2048 -keyout #{cert_key} -out #{@cert_pub} -passout pass:#{@passphrase} -subj \"/C=EU/O=Logstash/CN=localhost\""
191
+ unless system(cmd)
192
+ fail "failed to run openssl command: #{$?} \n#{cmd}"
193
+ end
194
+
195
+ # NOTE: CentOS 7 base image (LS < 7.17) uses OpenSSL 1.0 while later is using Ubuntu 20.04 with OpenSSL 1.1.1
196
+ # the default algorithm for `openssl pkcs8 -topk8` changed to -v2 which Java does not support (see GH-443)
197
+ cmd = "openssl pkcs8 -topk8 -in #{cert_key} -out #{@cert_key_pkcs8} -v1 PBE-SHA1-RC2-128 -passin pass:#{@passphrase} -passout pass:#{@passphrase}"
198
+ unless system(cmd)
199
+ fail "failed to run openssl command: #{$?} \n#{cmd}"
200
+ end
201
+ end
202
+
203
+ let(:certificate_authorities) { [ @cert_pub ] }
204
+
205
+ let(:input_config) do
206
+ super().merge("ssl_key_passphrase" => @passphrase, "ssl_key" => @cert_key_pkcs8, "ssl_certificate" => @cert_pub)
207
+ end
201
208
 
202
209
  include_examples "send events"
203
210
  end
@@ -50,6 +50,7 @@ shared_context "beats configuration" do
50
50
  begin
51
51
  beats.run(queue)
52
52
  rescue => e
53
+ warn e.inspect if $VERBOSE
53
54
  retry unless beats.stop?
54
55
  end
55
56
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-beats
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.2.2
4
+ version: 6.2.6
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-11 00:00:00.000000000 Z
11
+ date: 2022-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -297,9 +297,8 @@ files:
297
297
  - vendor/jar-dependencies/com/fasterxml/jackson/core/jackson-databind/2.9.10.8/jackson-databind-2.9.10.8.jar
298
298
  - vendor/jar-dependencies/com/fasterxml/jackson/module/jackson-module-afterburner/2.9.10/jackson-module-afterburner-2.9.10.jar
299
299
  - vendor/jar-dependencies/io/netty/netty-all/4.1.65.Final/netty-all-4.1.65.Final.jar
300
- - vendor/jar-dependencies/org/apache/logging/log4j/log4j-api/2.11.1/log4j-api-2.11.1.jar
301
300
  - vendor/jar-dependencies/org/javassist/javassist/3.24.0-GA/javassist-3.24.0-GA.jar
302
- - vendor/jar-dependencies/org/logstash/beats/logstash-input-beats/6.2.2/logstash-input-beats-6.2.2.jar
301
+ - vendor/jar-dependencies/org/logstash/beats/logstash-input-beats/6.2.6/logstash-input-beats-6.2.6.jar
303
302
  homepage: http://www.elastic.co/guide/en/logstash/current/index.html
304
303
  licenses:
305
304
  - Apache License (2.0)