logstash-output-elasticsearch 11.15.5-java → 11.15.7-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a43c2d3780ba862c30d3149ca123c980bc131a6752c02b81e20fd29d2930779
4
- data.tar.gz: be8ab42869f43e35f94ae6eb550e1718de545fef9a85584b98ed0471d14e9e89
3
+ metadata.gz: af8e8cfe5c9fa5cf8f363ab815476c526a7933735eb857e2d3976136c9c0193c
4
+ data.tar.gz: 8a15434d71177085ed47a7ee9664d3f0e26d4b57f89f4108342a04634c2b3fa1
5
5
  SHA512:
6
- metadata.gz: 45d6399c0d788768210f8196fdc392c64c654d99c387e3684c33467cd85e5f972a1404783ab00f255bd76f485a36a801906737526132e90bbf1ca3d98b98bcdb
7
- data.tar.gz: 2d5172a5cac98a2836fe907dacdf0193af6ee2f1f30369ae15ac064e60628e57d253b696b5f9eef2c37a961bd75bdbcdea5f7d83f572a3d81eff6c85b5ac154f
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
- 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
- ssl_options[:verify] = :strict
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.5'
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
- MIIFDDCCAvQCAQEwDQYJKoZIhvcNAQEFBQAwTDELMAkGA1UEBhMCUFQxCzAJBgNV
2
+ MIIFDDCCA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0UomAm2MD3MRR10UCkVFXM4/cUfiMrAgG232yDwRLiGp1EmY3uHyD
28
+ 8/5mRJzBtLsGQKbfBPPNExiFqDzXr2ZwE7tyfsB8auSV3mkVjYjYYFnDfE835U+y
29
29
  -----END CERTIFICATE-----
@@ -1 +1 @@
1
- 3e1c908fb2d7f1634643bb75462119c55a7cc392cd1877dd91d9f15f87e86757
1
+ 86a8abdffc0dd114d50cb20c7cc635bdb4bdcb16370fdee5aa5c05b4861faacd
@@ -1,7 +1,7 @@
1
1
  -----BEGIN CERTIFICATE-----
2
- MIIFEzCCAvsCAQEwDQYJKoZIhvcNAQEFBQAwTDELMAkGA1UEBhMCUFQxCzAJBgNV
2
+ MIIFEzCCAvsCAQEwDQYJKoZIhvcNAQELBQAwTDELMAkGA1UEBhMCUFQxCzAJBgNV
3
3
  BAgMAk5BMQ8wDQYDVQQHDAZMaXNib24xDjAMBgNVBAoMBU15TGFiMQ8wDQYDVQQD
4
- DAZSb290Q0EwHhcNMjIwNTIzMTcyODU1WhcNMjMwNTIzMTcyODU1WjBTMQswCQYD
4
+ DAZSb290Q0EwHhcNMjMwNTMwMTUxMDM4WhcNMjQwNTI5MTUxMDM4WjBTMQswCQYD
5
5
  VQQGEwJQVDELMAkGA1UECAwCTkExDzANBgNVBAcMBkxpc2JvbjEOMAwGA1UECgwF
6
6
  TXlMYWIxFjAUBgNVBAMMDWVsYXN0aWNzZWFyY2gwggIiMA0GCSqGSIb3DQEBAQUA
7
7
  A4ICDwAwggIKAoICAQDGIT9szzhN5HvZ2nivnCDzVfdYbbqBhgEbPppWPyFcV0r2
@@ -15,16 +15,16 @@ QcDuDDHfObWhzb4rS55BERIwDUqD1LgCRd0ikRxPSvI1AM4cl35b4DTaDLcnM6EO
15
15
  fy+QTYsgNoftU1PI1onDQ7ZdfgrTrIBFQQRwOqfyB4bB2zWVj62LSDvZoYYicNUe
16
16
  cqyE1542WNKzmyE8Mrf3uknN2J6EH7EhmiyRBtGg3NEQCwIYM4/kWPNP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k+C2qfiIKVx6a0U0lXjkp1fwrpGsG0dUL8GAibcX+BYD91uTMTAmg
22
+ SB4O2xMR6kKCCH3SDuRnkI+iC4MZL64JTrGzn+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
- dca380f330bdf3d4b242b3c48d541c4698eaffa0d532316b27e6080443e601b5
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 => :strict)
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 => :strict,
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 => :strict,
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.5
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-05-18 00:00:00.000000000 Z
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