logstash-input-beats 3.1.0-java → 3.1.1-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 +4 -4
- data/CHANGELOG.md +12 -2
- data/VERSION +1 -1
- data/lib/logstash-input-beats_jars.rb +1 -3
- data/lib/logstash/inputs/beats.rb +27 -3
- data/spec/integration/filebeat_spec.rb +10 -8
- data/spec/integration/logstash_forwarder_spec.rb +1 -1
- data/spec/spec_helper.rb +4 -3
- data/spec/support/helpers.rb +16 -0
- data/vendor/jar-dependencies/org/logstash/beats/logstash-input-beats/3.1.1/logstash-input-beats-3.1.1.jar +0 -0
- metadata +5 -5
- data/vendor/jar-dependencies/org/bouncycastle/bcpkix-jdk15on/1.54/bcpkix-jdk15on-1.54.jar +0 -0
- data/vendor/jar-dependencies/org/bouncycastle/bcprov-jdk15on/1.54/bcprov-jdk15on-1.54.jar +0 -0
- data/vendor/jar-dependencies/org/logstash/beats/logstash-input-beats/3.1.0/logstash-input-beats-3.1.0.jar +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 768ccce03701a2fe20bcdefafe058fb754cfa00a
|
4
|
+
data.tar.gz: e28accad116b6b3e4feed499963e335cb7ce156c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3323df3ca381add52492e2162950cad4179f40b06d96d8eaceac395e0dfacb2011b50784e1d705241ad047f2d89086030065093623728fb4a365d364ea8da51
|
7
|
+
data.tar.gz: 79b695fa6f4f9c4316df81b7cbbdea25435358917e6eb32a53ed097a138dcd19bed249ae44b40738e226c4fdcb9a95b7886dc4463caabe87fa53833bbaaed2fa
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
## 3.1.1
|
2
|
+
- Remove the SSL Converter, Private Key must be in the PKCS8 format, which is the default of any newer OpenSSL library
|
3
|
+
- Replace FileInputStream with File reference to let netty handle correctly the certificates
|
4
|
+
- Tests now uses OpenSSL binary to convert PKCS7 Private generated from ruby to PKCS8
|
5
|
+
- Remove dependency on bouncycastle
|
6
|
+
- Fix an issue when the input could hang forever when stopping Logstash
|
7
|
+
- [Doc changes] Add Logstash config example and clarify use of the `type` config option
|
8
|
+
|
9
|
+
|
10
|
+
|
1
11
|
## 3.1.0
|
2
12
|
- Fix a NullPointer Exception https://github.com/elastic/logstash/issues/5756
|
3
13
|
- Log4j ERROR will now be propagated upstream, IE: InvalidCertificate OR InvalidFrameType.
|
@@ -62,7 +72,7 @@
|
|
62
72
|
|
63
73
|
## 2.2.4
|
64
74
|
|
65
|
-
- Fix bug where using `ssl_key_passphrase` wouldn't work
|
75
|
+
- Fix bug where using `ssl_key_passphrase` wouldn't work
|
66
76
|
|
67
77
|
## 2.2.2
|
68
78
|
|
@@ -93,7 +103,7 @@
|
|
93
103
|
|
94
104
|
## 2.1.1
|
95
105
|
|
96
|
-
- Release a new version of the gem that doesn't included any other gems, 2.1.0 is yanked from rubygems
|
106
|
+
- Release a new version of the gem that doesn't included any other gems, 2.1.0 is yanked from rubygems
|
97
107
|
|
98
108
|
## 2.1.0
|
99
109
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.1.
|
1
|
+
3.1.1
|
@@ -3,8 +3,6 @@
|
|
3
3
|
require 'jar_dependencies'
|
4
4
|
require_jar('org.apache.logging.log4j', 'log4j-1.2-api', '2.6.1')
|
5
5
|
require_jar('org.apache.logging.log4j', 'log4j-slf4j-impl', '2.6.1')
|
6
|
-
require_jar('org.bouncycastle', 'bcprov-jdk15on', '1.54')
|
7
|
-
require_jar('org.bouncycastle', 'bcpkix-jdk15on', '1.54')
|
8
6
|
require_jar('io.netty', 'netty-all', '4.1.3.Final')
|
9
7
|
require_jar('io.netty', 'netty-tcnative-boringssl-static', '1.1.33.Fork17')
|
10
8
|
require_jar('org.apache.logging.log4j', 'log4j-api', '2.6.1')
|
@@ -14,4 +12,4 @@ require_jar('com.fasterxml.jackson.core', 'jackson-core', '2.7.5')
|
|
14
12
|
require_jar('com.fasterxml.jackson.core', 'jackson-annotations', '2.7.5')
|
15
13
|
require_jar('com.fasterxml.jackson.core', 'jackson-databind', '2.7.5')
|
16
14
|
require_jar('com.fasterxml.jackson.module', 'jackson-module-afterburner', '2.7.5')
|
17
|
-
require_jar('org.logstash.beats', 'logstash-input-beats', '3.1.
|
15
|
+
require_jar('org.logstash.beats', 'logstash-input-beats', '3.1.1')
|
@@ -10,12 +10,37 @@ require "logstash/logging" rescue nil # removed in logstash 5
|
|
10
10
|
|
11
11
|
import "org.logstash.beats.Server"
|
12
12
|
import "org.logstash.netty.SslSimpleBuilder"
|
13
|
-
import "org.logstash.netty.PrivateKeyConverter"
|
14
13
|
import "java.io.FileInputStream"
|
15
14
|
|
16
15
|
# This input plugin enables Logstash to receive events from the
|
17
16
|
# https://www.elastic.co/products/beats[Elastic Beats] framework.
|
18
17
|
#
|
18
|
+
# The following example shows how to configure Logstash to listen on port
|
19
|
+
# 5044 for incoming Beats connections and to index into Elasticsearch:
|
20
|
+
#
|
21
|
+
# [source,ruby]
|
22
|
+
# ------------------------------------------------------------------------------
|
23
|
+
# input {
|
24
|
+
# beats {
|
25
|
+
# port => 5044
|
26
|
+
# }
|
27
|
+
# }
|
28
|
+
#
|
29
|
+
# output {
|
30
|
+
# elasticsearch {
|
31
|
+
# hosts => "localhost:9200"
|
32
|
+
# manage_template => false
|
33
|
+
# index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
|
34
|
+
# document_type => "%{[@metadata][type]}"
|
35
|
+
# }
|
36
|
+
# }
|
37
|
+
# ------------------------------------------------------------------------------
|
38
|
+
#
|
39
|
+
# NOTE: The Beats shipper automatically sets the `type` field on the event.
|
40
|
+
# You cannot override this setting in the Logstash config. If you specify
|
41
|
+
# a setting for the <<plugins-inputs-beats-type,`type`>> config option in
|
42
|
+
# Logstash, it is ignored.
|
43
|
+
#
|
19
44
|
class LogStash::Codecs::Base
|
20
45
|
# This monkey patch add callback based
|
21
46
|
# flow to the codec until its shipped with core.
|
@@ -143,8 +168,7 @@ class LogStash::Inputs::Beats < LogStash::Inputs::Base
|
|
143
168
|
def create_server
|
144
169
|
server = org.logstash.beats.Server.new(@port)
|
145
170
|
if @ssl
|
146
|
-
|
147
|
-
ssl_builder = org.logstash.netty.SslSimpleBuilder.new(FileInputStream.new(ssl_certificate), private_key_converter.convert(), ssl_key_passphrase)
|
171
|
+
ssl_builder = org.logstash.netty.SslSimpleBuilder.new(ssl_certificate, ssl_key, ssl_key_passphrase)
|
148
172
|
.setProtocols(convert_protocols)
|
149
173
|
.setCipherSuites(normalized_ciphers)
|
150
174
|
|
@@ -15,6 +15,7 @@ require_relative "../support/client_process_helpers"
|
|
15
15
|
|
16
16
|
FILEBEAT_BINARY = File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "vendor", "filebeat", "filebeat"))
|
17
17
|
|
18
|
+
|
18
19
|
describe "Filebeat", :integration => true do
|
19
20
|
include ClientProcessHelpers
|
20
21
|
include FileHelpers
|
@@ -34,13 +35,13 @@ describe "Filebeat", :integration => true do
|
|
34
35
|
|
35
36
|
let_empty_tmp_file(:registry_file)
|
36
37
|
let(:filebeat_config) do
|
37
|
-
{
|
38
|
-
"filebeat" => {
|
38
|
+
{
|
39
|
+
"filebeat" => {
|
39
40
|
"prospectors" => [{ "paths" => [log_file], "input_type" => "log" }],
|
40
41
|
"registry_file" => registry_file,
|
41
42
|
"scan_frequency" => "1s"
|
42
43
|
},
|
43
|
-
"output" => {
|
44
|
+
"output" => {
|
44
45
|
"logstash" => { "hosts" => ["#{host}:#{port}"] },
|
45
46
|
"logging" => { "level" => "debug" }
|
46
47
|
}
|
@@ -99,7 +100,8 @@ describe "Filebeat", :integration => true do
|
|
99
100
|
|
100
101
|
let(:certificate_authorities) { [certificate_file] }
|
101
102
|
let(:certificate_data) { Flores::PKI.generate }
|
102
|
-
|
103
|
+
|
104
|
+
let_tmp_file(:certificate_key_file) { convert_to_pkcs8(certificate_data.last) }
|
103
105
|
let_tmp_file(:certificate_file) { certificate_data.first }
|
104
106
|
|
105
107
|
context "self signed certificate" do
|
@@ -155,10 +157,10 @@ describe "Filebeat", :integration => true do
|
|
155
157
|
context "with a self signed certificate" do
|
156
158
|
let(:certificate_authorities) { [certificate_file] }
|
157
159
|
let(:certificate_data) { Flores::PKI.generate }
|
158
|
-
let_tmp_file(:certificate_key_file) { certificate_data.last }
|
160
|
+
let_tmp_file(:certificate_key_file) { convert_to_pkcs8(certificate_data.last) }
|
159
161
|
let_tmp_file(:certificate_file) { certificate_data.first }
|
160
162
|
let_tmp_file(:server_certificate_file) { certificate_data.first }
|
161
|
-
let_tmp_file(:server_certificate_key_file) { certificate_data.last }
|
163
|
+
let_tmp_file(:server_certificate_key_file) { convert_to_pkcs8(certificate_data.last) }
|
162
164
|
|
163
165
|
include_examples "send events"
|
164
166
|
end
|
@@ -167,7 +169,7 @@ describe "Filebeat", :integration => true do
|
|
167
169
|
include_context "Root CA"
|
168
170
|
|
169
171
|
let_tmp_file(:server_certificate_file) { server_certificate_data.first }
|
170
|
-
let_tmp_file(:server_certificate_key_file) { server_certificate_data.last }
|
172
|
+
let_tmp_file(:server_certificate_key_file) { convert_to_pkcs8(server_certificate_data.last) }
|
171
173
|
|
172
174
|
context "directly signed client certificate" do
|
173
175
|
let(:certificate_authorities) { [root_ca_certificate_file] }
|
@@ -197,7 +199,7 @@ describe "Filebeat", :integration => true do
|
|
197
199
|
|
198
200
|
let(:secondary_client_certificate_data) { Flores::PKI.create_client_certicate("CN=localhost", secondary_ca_certificate, secondary_ca_key) }
|
199
201
|
let_tmp_file(:secondary_client_certificate_file) { secondary_client_certificate_data.first }
|
200
|
-
let_tmp_file(:secondary_client_certificate_key_file) { secondary_client_certificate_data.last }
|
202
|
+
let_tmp_file(:secondary_client_certificate_key_file) { convert_to_pkcs8(secondary_client_certificate_data.last) }
|
201
203
|
let(:certificate_authorities) { [root_ca_certificate_file, secondary_ca_certificate_file] }
|
202
204
|
let(:certificate_data) { Flores::PKI.create_client_certicate("CN=localhost", root_ca_certificate, root_ca_key) }
|
203
205
|
|
@@ -84,7 +84,7 @@ describe "Logstash-Forwarder", :integration => true do
|
|
84
84
|
|
85
85
|
let(:certificate_data) { Flores::PKI.generate }
|
86
86
|
let_tmp_file(:certificate_file) { certificate_data.first }
|
87
|
-
let_tmp_file(:certificate_key_file) { certificate_data.last }
|
87
|
+
let_tmp_file(:certificate_key_file) { convert_to_pkcs8(certificate_data.last) }
|
88
88
|
let(:certificate_authorities) { certificate_file }
|
89
89
|
|
90
90
|
context "self signed certificate" do
|
data/spec/spec_helper.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
2
|
+
require "rspec"
|
3
|
+
require "rspec/mocks"
|
4
|
+
require "rspec/wait"
|
5
5
|
require "logstash/devutils/rspec/spec_helper"
|
6
6
|
require "logstash/codecs/plain"
|
7
7
|
require_relative "support/logstash_test"
|
8
|
+
require_relative "support/helpers"
|
8
9
|
|
9
10
|
$: << File.realpath(File.join(File.dirname(__FILE__), "..", "lib"))
|
10
11
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require "open3"
|
3
|
+
OPEN_SSL_TOPK8 = "openssl pkcs8 -nocrypt -topk8 -inform PEM -outform PEM"
|
4
|
+
|
5
|
+
# Netty only accepts PKC8 format for the private key, which in the real world is fine
|
6
|
+
# because any newer version of OpenSSL with use that format by default.
|
7
|
+
#
|
8
|
+
# But in Ruby or Jruby-OpenSSL, the private key will be generates in PKCS7, which netty doesn't support.
|
9
|
+
# Converting the format is a bit of hassle to do in code so In this case its just easier to use the `openssl` binary to do the work.
|
10
|
+
#
|
11
|
+
#
|
12
|
+
def convert_to_pkcs8(key)
|
13
|
+
out, e, s = Open3.capture3(OPEN_SSL_TOPK8, :stdin_data => key.to_s)
|
14
|
+
raise e if e != ""
|
15
|
+
out
|
16
|
+
end
|
Binary file
|
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: 3.1.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -256,6 +256,7 @@ files:
|
|
256
256
|
- spec/support/client_process_helpers.rb
|
257
257
|
- spec/support/file_helpers.rb
|
258
258
|
- spec/support/flores_extensions.rb
|
259
|
+
- spec/support/helpers.rb
|
259
260
|
- spec/support/integration_shared_context.rb
|
260
261
|
- spec/support/logstash_test.rb
|
261
262
|
- spec/support/shared_examples.rb
|
@@ -269,10 +270,8 @@ files:
|
|
269
270
|
- vendor/jar-dependencies/org/apache/logging/log4j/log4j-api/2.6.1/log4j-api-2.6.1.jar
|
270
271
|
- vendor/jar-dependencies/org/apache/logging/log4j/log4j-core/2.6.1/log4j-core-2.6.1.jar
|
271
272
|
- vendor/jar-dependencies/org/apache/logging/log4j/log4j-slf4j-impl/2.6.1/log4j-slf4j-impl-2.6.1.jar
|
272
|
-
- vendor/jar-dependencies/org/bouncycastle/bcpkix-jdk15on/1.54/bcpkix-jdk15on-1.54.jar
|
273
|
-
- vendor/jar-dependencies/org/bouncycastle/bcprov-jdk15on/1.54/bcprov-jdk15on-1.54.jar
|
274
273
|
- vendor/jar-dependencies/org/javassist/javassist/3.20.0-GA/javassist-3.20.0-GA.jar
|
275
|
-
- vendor/jar-dependencies/org/logstash/beats/logstash-input-beats/3.1.
|
274
|
+
- vendor/jar-dependencies/org/logstash/beats/logstash-input-beats/3.1.1/logstash-input-beats-3.1.1.jar
|
276
275
|
homepage: http://www.elastic.co/guide/en/logstash/current/index.html
|
277
276
|
licenses:
|
278
277
|
- Apache License (2.0)
|
@@ -314,6 +313,7 @@ test_files:
|
|
314
313
|
- spec/support/client_process_helpers.rb
|
315
314
|
- spec/support/file_helpers.rb
|
316
315
|
- spec/support/flores_extensions.rb
|
316
|
+
- spec/support/helpers.rb
|
317
317
|
- spec/support/integration_shared_context.rb
|
318
318
|
- spec/support/logstash_test.rb
|
319
319
|
- spec/support/shared_examples.rb
|
Binary file
|
Binary file
|