logstash-output-elasticsearch 11.15.5-java → 11.15.7-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 +6 -0
- data/lib/logstash/outputs/elasticsearch/http_client_builder.rb +8 -6
- data/lib/logstash/outputs/elasticsearch.rb +1 -1
- data/logstash-output-elasticsearch.gemspec +1 -1
- data/spec/fixtures/test_certs/ca.crt +13 -13
- data/spec/fixtures/test_certs/ca.der.sha256 +1 -1
- data/spec/fixtures/test_certs/test.crt +14 -14
- data/spec/fixtures/test_certs/test.der.sha256 +1 -1
- data/spec/fixtures/test_certs/test.p12 +0 -0
- data/spec/unit/outputs/elasticsearch_spec.rb +42 -3
- data/spec/unit/outputs/elasticsearch_ssl_spec.rb +3 -3
- 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: af8e8cfe5c9fa5cf8f363ab815476c526a7933735eb857e2d3976136c9c0193c
|
4
|
+
data.tar.gz: 8a15434d71177085ed47a7ee9664d3f0e26d4b57f89f4108342a04634c2b3fa1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6cf6cff9c48ed0a7ea9e6662b4cd02c370a9f6ece098754cb23f3e40aa4e52c33b678acd53594a48bdb47835623bfd8d5d357f20c99abf9b20e5b20cab1818bf
|
7
|
+
data.tar.gz: 62cd5bd83d381bd89d17bdbb9542b27285e60a09de6dfa09ac9e937b32e594e28833b8faa252b41b8ed4dd4a0dc91c91729ad31a56c25318704cb58d0e978bf1
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 11.15.7
|
2
|
+
- Fixes a regression introduced in 11.14.0 which could prevent a connection from being established to Elasticsearch in some SSL configurations [#1138](https://github.com/logstash-plugins/logstash-output-elasticsearch/issues/1138)
|
3
|
+
|
4
|
+
## 11.15.6
|
5
|
+
- Fix: avoid to reject a batch when the Elasticsearch connection is alive and the processing should continue [#1132](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1132).
|
6
|
+
|
1
7
|
## 11.15.5
|
2
8
|
- Fixes `undefined 'shutdown_requested' method` error when plugin checks if shutdown request is received [#1134](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1134)
|
3
9
|
|
@@ -144,12 +144,14 @@ module LogStash; module Outputs; class ElasticSearch;
|
|
144
144
|
ssl_verification_mode = params["ssl_verification_mode"]
|
145
145
|
unless ssl_verification_mode.nil?
|
146
146
|
case ssl_verification_mode
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
147
|
+
when 'none'
|
148
|
+
logger.warn "You have enabled encryption but DISABLED certificate verification, " +
|
149
|
+
"to make sure your data is secure set `ssl_verification_mode => full`"
|
150
|
+
ssl_options[:verify] = :disable
|
151
|
+
else
|
152
|
+
# Manticore's :default maps to Apache HTTP Client's DefaultHostnameVerifier,
|
153
|
+
# which is the modern STRICT verifier that replaces the deprecated StrictHostnameVerifier
|
154
|
+
ssl_options[:verify] = :default
|
153
155
|
end
|
154
156
|
end
|
155
157
|
|
@@ -432,7 +432,7 @@ class LogStash::Outputs::ElasticSearch < LogStash::Outputs::Base
|
|
432
432
|
return unless after_successful_connection_done
|
433
433
|
stoppable_sleep 1 until (after_successful_connection_done.true? || pipeline_shutdown_requested?)
|
434
434
|
|
435
|
-
if pipeline_shutdown_requested?
|
435
|
+
if pipeline_shutdown_requested? && !after_successful_connection_done.true?
|
436
436
|
logger.info "Aborting the batch due to shutdown request while waiting for connections to become live"
|
437
437
|
abort_batch_if_available!
|
438
438
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-output-elasticsearch'
|
3
|
-
s.version = '11.15.
|
3
|
+
s.version = '11.15.7'
|
4
4
|
s.licenses = ['apache-2.0']
|
5
5
|
s.summary = "Stores logs in Elasticsearch"
|
6
6
|
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"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
-----BEGIN CERTIFICATE-----
|
2
|
-
|
2
|
+
MIIFDDCCAvQCAQEwDQYJKoZIhvcNAQELBQAwTDELMAkGA1UEBhMCUFQxCzAJBgNV
|
3
3
|
BAgMAk5BMQ8wDQYDVQQHDAZMaXNib24xDjAMBgNVBAoMBU15TGFiMQ8wDQYDVQQD
|
4
|
-
|
4
|
+
DAZSb290Q0EwHhcNMjMwNTMwMTUxMDM4WhcNMjQwNTI5MTUxMDM4WjBMMQswCQYD
|
5
5
|
VQQGEwJQVDELMAkGA1UECAwCTkExDzANBgNVBAcMBkxpc2JvbjEOMAwGA1UECgwF
|
6
6
|
TXlMYWIxDzANBgNVBAMMBlJvb3RDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCC
|
7
7
|
AgoCggIBAMtTMqAWuH17b9XqPa5L3HNqgnZ958+gvcOt7Q/sOEvcDQJgkzZ+Gywh
|
@@ -15,15 +15,15 @@ dY9xPL0uKYm6ADsDC0B8sGgNMBXeB6aLojY1/ITwmmfpfk9c/yWPfC7stHgCYRAv
|
|
15
15
|
5MfGAsmv0/ya5VrWQGBJkFiYy1pon6nxUjCbgn0RABojRoGdhhY3QDipgwmSgFZx
|
16
16
|
r064RFr1bt/Ml3MJmPf535mSwPdk/j/zw4IZTvlmwKW3FyMDhwYL/zX7J0c6MzMP
|
17
17
|
LEdi73Qjzmr3ENIrir4O86wNz81YRfYkg9ZX8yKJK9LBAUrYCjJ3AgMBAAEwDQYJ
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
18
|
+
KoZ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4MZL64JTrGzn+juMeK0fqZWrdyoVKRlFI92Ao3J
|
23
|
+
oFNF9KTCWQPFAaiy1zl3vDAfIfyJBzQsP6D2BaxVlSQ5jbCxRxOapkhwNUUQ2/vg
|
24
|
+
anggOIOnm6biKhain4U118jviSEGonTvzcIpjExLVXXTF216Ahd7vQWDWqZkYNi3
|
25
|
+
ji1jZSemBWyv/bDxo/STLL/QiX73WuxelerZeMxS03U6KYyhtTLxDvpeOCstbe1u
|
26
|
+
wI9LfpdtAbXP+d/djvYJSHb6WoS4Oya2mnyddqDd6Mfn7lTudhqtw5CLV+sElnFf
|
27
|
+
XDBjDp6tWUin6s/IWPVnvMceZW/sW7oO3sy9NKQx1acHh85WIMrZ+9iVvwcvQMRF
|
28
|
+
p/bTR2VL3jD5fioNyfBmmQ17wIOIm3QvY+nJmzOWalzYYzottPTiabzKYap7Ulcx
|
29
|
+
HDB+ZvuJBA==
|
30
30
|
-----END CERTIFICATE-----
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
b6ee8b4a213328074df1da1f3b8fdde95c5e97e9b1d7da58dad0537a04939b97
|
Binary file
|
@@ -58,7 +58,27 @@ describe LogStash::Outputs::ElasticSearch do
|
|
58
58
|
|
59
59
|
let(:logger) { double("logger") }
|
60
60
|
|
61
|
+
let(:never_ending) { Thread.new { sleep 1 while true } }
|
62
|
+
|
63
|
+
let(:do_register) { false }
|
64
|
+
|
61
65
|
before(:each) do
|
66
|
+
spy_http_client_builder!
|
67
|
+
stub_http_client_pool!
|
68
|
+
|
69
|
+
allow(subject).to receive(:finish_register) # stub-out thread completion (to avoid error log entries)
|
70
|
+
|
71
|
+
# emulate 'failed' ES connection, which sleeps forever
|
72
|
+
allow(subject).to receive(:after_successful_connection) { |&block| never_ending }
|
73
|
+
allow(subject).to receive(:stop_after_successful_connection_thread)
|
74
|
+
|
75
|
+
subject.register
|
76
|
+
|
77
|
+
allow(subject.client).to receive(:maximum_seen_major_version).at_least(:once).and_return(maximum_seen_major_version)
|
78
|
+
allow(subject.client).to receive(:get_xpack_info)
|
79
|
+
|
80
|
+
subject.client.pool.adapter.manticore.respond_with(:body => "{}")
|
81
|
+
|
62
82
|
allow(subject).to receive(:logger).and_return(logger)
|
63
83
|
allow(logger).to receive(:info)
|
64
84
|
|
@@ -73,6 +93,25 @@ describe LogStash::Outputs::ElasticSearch do
|
|
73
93
|
end
|
74
94
|
end
|
75
95
|
|
96
|
+
context "on a reachable ES instance" do
|
97
|
+
let(:events) { [ ::LogStash::Event.new("foo" => "bar1"), ::LogStash::Event.new("foo" => "bar2") ] }
|
98
|
+
|
99
|
+
let(:logger) { double("logger") }
|
100
|
+
|
101
|
+
before(:each) do
|
102
|
+
allow(subject).to receive(:logger).and_return(logger)
|
103
|
+
allow(logger).to receive(:info)
|
104
|
+
|
105
|
+
allow(subject).to receive(:pipeline_shutdown_requested?).and_return(true)
|
106
|
+
allow(subject).to receive(:retrying_submit)
|
107
|
+
end
|
108
|
+
|
109
|
+
it "the #multi_receive doesn't abort when waiting for a connection on alive ES and a shutdown is requested" do
|
110
|
+
subject.multi_receive(events)
|
111
|
+
expect(logger).to_not have_received(:info).with(/Aborting the batch due to shutdown request while waiting for connections to become live/i)
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
76
115
|
context "when a connected ES becomes unreachable" do
|
77
116
|
# let(:error) do
|
78
117
|
# ::LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError.new(
|
@@ -116,6 +155,9 @@ describe LogStash::Outputs::ElasticSearch do
|
|
116
155
|
end
|
117
156
|
|
118
157
|
it "should exit the retry with an abort exception if shutdown is requested" do
|
158
|
+
# trigger the shutdown signal
|
159
|
+
allow(subject).to receive(:pipeline_shutdown_requested?) { true }
|
160
|
+
|
119
161
|
# execute in another thread because it blocks in a retry loop until the shutdown is triggered
|
120
162
|
th = Thread.new do
|
121
163
|
subject.multi_receive([event])
|
@@ -124,9 +166,6 @@ describe LogStash::Outputs::ElasticSearch do
|
|
124
166
|
e.class
|
125
167
|
end
|
126
168
|
|
127
|
-
# trigger the shutdown signal
|
128
|
-
allow(subject).to receive(:pipeline_shutdown_requested?) { true }
|
129
|
-
|
130
169
|
expect(th.value).to eq(org.logstash.execution.AbortedBatchException)
|
131
170
|
end
|
132
171
|
end
|
@@ -55,7 +55,7 @@ describe "SSL options" do
|
|
55
55
|
|
56
56
|
it "should pass the flag to the ES client" do
|
57
57
|
expect(::Manticore::Client).to receive(:new) do |args|
|
58
|
-
expect(args[:ssl]).to match hash_including(:enabled => true, :verify => :
|
58
|
+
expect(args[:ssl]).to match hash_including(:enabled => true, :verify => :default)
|
59
59
|
end.and_return(manticore_double)
|
60
60
|
|
61
61
|
subject.register
|
@@ -132,7 +132,7 @@ describe "SSL options" do
|
|
132
132
|
:truststore => ssl_truststore_path,
|
133
133
|
:truststore_type => "jks",
|
134
134
|
:truststore_password => "foo",
|
135
|
-
:verify => :
|
135
|
+
:verify => :default,
|
136
136
|
:cipher_suites => ["TLS_DHE_RSA_WITH_AES_256_CBC_SHA256"],
|
137
137
|
:protocols => ["TLSv1.3"],
|
138
138
|
)
|
@@ -168,7 +168,7 @@ describe "SSL options" do
|
|
168
168
|
:ca_file => ssl_certificate_authorities_path,
|
169
169
|
:client_cert => ssl_certificate_path,
|
170
170
|
:client_key => ssl_key_path,
|
171
|
-
:verify => :
|
171
|
+
:verify => :default,
|
172
172
|
:cipher_suites => ["TLS_DHE_RSA_WITH_AES_256_CBC_SHA256"],
|
173
173
|
:protocols => ["TLSv1.3"],
|
174
174
|
)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-elasticsearch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 11.15.
|
4
|
+
version: 11.15.7
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|