logstash-input-http 3.2.1-java → 3.2.2-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/VERSION +1 -1
- data/lib/logstash-input-http_jars.rb +1 -1
- data/lib/logstash/inputs/http.rb +9 -8
- data/spec/inputs/http_spec.rb +55 -3
- data/vendor/jar-dependencies/org/logstash/plugins/input/http/logstash-input-http/{3.2.1/logstash-input-http-3.2.1.jar → 3.2.2/logstash-input-http-3.2.2.jar} +0 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ff21efab29549806ebbdb005b2cd9f6d91a69a2aa1558e2ceb48e78d867e426
|
4
|
+
data.tar.gz: 37bbbf9e61f85a24b79030a3d5f8d5b90083fa6f916aa6bd1bde1b47db7561f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9d443f81399d5bfc1481f1d9db071a469c9d8ed1e565469d3dd91a4e3c4806d4ceb62a8bce70ea886324641b832e7ba59cbe3125f224a0536c143c99af5582c
|
7
|
+
data.tar.gz: ba1d68ce3df79043e6af91c34fc84f9311e35b6781aac188c2f9640bdd068bfd4fadebea81864849f33ad64eae07f56ea1af7a5697d60af40d55500ddcdf89ab
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.2.
|
1
|
+
3.2.2
|
@@ -4,4 +4,4 @@ require 'jar_dependencies'
|
|
4
4
|
require_jar('io.netty', 'netty-all', '4.1.18.Final')
|
5
5
|
require_jar('io.netty', 'netty-tcnative-boringssl-static', '2.0.7.Final')
|
6
6
|
require_jar('org.apache.logging.log4j', 'log4j-api', '2.6.2')
|
7
|
-
require_jar('org.logstash.plugins.input.http', 'logstash-input-http', '3.2.
|
7
|
+
require_jar('org.logstash.plugins.input.http', 'logstash-input-http', '3.2.2')
|
data/lib/logstash/inputs/http.rb
CHANGED
@@ -191,10 +191,14 @@ class LogStash::Inputs::Http < LogStash::Inputs::Base
|
|
191
191
|
raise LogStash::ConfigurationError, "Certificate or JKS must be configured"
|
192
192
|
end
|
193
193
|
|
194
|
-
if @ssl && original_params.key?("verify_mode")
|
195
|
-
if original_params.key?("ssl_verify_mode")
|
194
|
+
if @ssl && (original_params.key?("verify_mode") && original_params.key?("ssl_verify_mode"))
|
196
195
|
raise LogStash::ConfigurationError, "Both 'ssl_verify_mode' and 'verify_mode' were set. Use only 'ssl_verify_mode'."
|
197
|
-
|
196
|
+
elsif original_params.key?("verify_mode")
|
197
|
+
@ssl_verify_mode_final = @verify_mode
|
198
|
+
elsif original_params.key?("ssl_verify_mode")
|
199
|
+
@ssl_verify_mode_final = @ssl_verify_mode
|
200
|
+
else
|
201
|
+
@ssl_verify_mode_final = @ssl_verify_mode
|
198
202
|
end
|
199
203
|
|
200
204
|
if @ssl && require_certificate_authorities? && !client_authentication?
|
@@ -213,11 +217,9 @@ class LogStash::Inputs::Http < LogStash::Inputs::Base
|
|
213
217
|
return nil unless @ssl
|
214
218
|
|
215
219
|
ssl_builder = nil
|
216
|
-
verify_mode_string = nil
|
217
220
|
|
218
221
|
if @keystore && @keystore_password
|
219
222
|
ssl_builder = org.logstash.plugins.inputs.http.util.JksSslBuilder.new(@keystore, @keystore_password.value)
|
220
|
-
verify_mode_string = @verify_mode.upcase if original_params.key?("verify_mode")
|
221
223
|
else
|
222
224
|
begin
|
223
225
|
ssl_builder = org.logstash.plugins.inputs.http.util.SslSimpleBuilder.new(@ssl_certificate, @ssl_key, @ssl_key_passphrase.nil? ? nil : @ssl_key_passphrase.value)
|
@@ -227,14 +229,13 @@ class LogStash::Inputs::Http < LogStash::Inputs::Base
|
|
227
229
|
end
|
228
230
|
|
229
231
|
if client_authentication?
|
230
|
-
verify_mode_string = @ssl_verify_mode.upcase
|
231
232
|
ssl_builder.setCertificateAuthorities(@ssl_certificate_authorities)
|
232
233
|
end
|
233
234
|
end
|
234
235
|
|
235
236
|
ssl_context = ssl_builder.build()
|
236
237
|
ssl_handler_provider = org.logstash.plugins.inputs.http.util.SslHandlerProvider.new(ssl_context)
|
237
|
-
ssl_handler_provider.setVerifyMode(
|
238
|
+
ssl_handler_provider.setVerifyMode(@ssl_verify_mode_final.upcase)
|
238
239
|
ssl_handler_provider.setProtocols(convert_protocols)
|
239
240
|
ssl_handler_provider.setHandshakeTimeoutMilliseconds(@ssl_handshake_timeout)
|
240
241
|
|
@@ -254,7 +255,7 @@ class LogStash::Inputs::Http < LogStash::Inputs::Base
|
|
254
255
|
end
|
255
256
|
|
256
257
|
def require_certificate_authorities?
|
257
|
-
@
|
258
|
+
@ssl_verify_mode_final == "force_peer" || @ssl_verify_mode_final == "peer"
|
258
259
|
end
|
259
260
|
|
260
261
|
def normalized_ciphers
|
data/spec/inputs/http_spec.rb
CHANGED
@@ -6,6 +6,8 @@ require "stud/temporary"
|
|
6
6
|
require "zlib"
|
7
7
|
require "stringio"
|
8
8
|
|
9
|
+
java_import "io.netty.handler.ssl.util.SelfSignedCertificate"
|
10
|
+
|
9
11
|
describe LogStash::Inputs::Http do
|
10
12
|
|
11
13
|
before do
|
@@ -355,15 +357,65 @@ describe LogStash::Inputs::Http do
|
|
355
357
|
end
|
356
358
|
end
|
357
359
|
context "with :ssl_certificate" do
|
358
|
-
let(:
|
359
|
-
let(:
|
360
|
+
let(:ssc) { SelfSignedCertificate.new }
|
361
|
+
let(:ssl_certificate) { ssc.certificate }
|
362
|
+
let(:ssl_key) { ssc.private_key }
|
363
|
+
|
364
|
+
after(:each) { ssc.delete }
|
365
|
+
|
360
366
|
subject { LogStash::Inputs::Http.new("port" => port, "ssl" => true,
|
361
367
|
"ssl_certificate" => ssl_certificate.path,
|
362
368
|
"ssl_key" => ssl_key.path) }
|
363
369
|
it "should not raise exception" do
|
364
|
-
expect(subject).to receive(:build_ssl_params)
|
365
370
|
expect { subject.register }.to_not raise_exception
|
366
371
|
end
|
372
|
+
|
373
|
+
context "with ssl_verify_mode = none" do
|
374
|
+
subject { LogStash::Inputs::Http.new("port" => port, "ssl" => true,
|
375
|
+
"ssl_certificate" => ssl_certificate.path,
|
376
|
+
"ssl_key" => ssl_key.path,
|
377
|
+
"ssl_verify_mode" => "none"
|
378
|
+
) }
|
379
|
+
it "should not raise exception" do
|
380
|
+
expect { subject.register }.to_not raise_exception
|
381
|
+
end
|
382
|
+
end
|
383
|
+
["peer", "force_peer"].each do |verify_mode|
|
384
|
+
context "with ssl_verify_mode = #{verify_mode}" do
|
385
|
+
subject { LogStash::Inputs::Http.new("port" => port, "ssl" => true,
|
386
|
+
"ssl_certificate" => ssl_certificate.path,
|
387
|
+
"ssl_certificate_authorities" => ssl_certificate.path,
|
388
|
+
"ssl_key" => ssl_key.path,
|
389
|
+
"ssl_verify_mode" => verify_mode
|
390
|
+
) }
|
391
|
+
it "should not raise exception" do
|
392
|
+
expect { subject.register }.to_not raise_exception
|
393
|
+
end
|
394
|
+
end
|
395
|
+
end
|
396
|
+
context "with verify_mode = none" do
|
397
|
+
subject { LogStash::Inputs::Http.new("port" => port, "ssl" => true,
|
398
|
+
"ssl_certificate" => ssl_certificate.path,
|
399
|
+
"ssl_key" => ssl_key.path,
|
400
|
+
"verify_mode" => "none"
|
401
|
+
) }
|
402
|
+
it "should not raise exception" do
|
403
|
+
expect { subject.register }.to_not raise_exception
|
404
|
+
end
|
405
|
+
end
|
406
|
+
["peer", "force_peer"].each do |verify_mode|
|
407
|
+
context "with verify_mode = #{verify_mode}" do
|
408
|
+
subject { LogStash::Inputs::Http.new("port" => port, "ssl" => true,
|
409
|
+
"ssl_certificate" => ssl_certificate.path,
|
410
|
+
"ssl_certificate_authorities" => ssl_certificate.path,
|
411
|
+
"ssl_key" => ssl_key.path,
|
412
|
+
"verify_mode" => verify_mode
|
413
|
+
) }
|
414
|
+
it "should not raise exception" do
|
415
|
+
expect { subject.register }.to_not raise_exception
|
416
|
+
end
|
417
|
+
end
|
418
|
+
end
|
367
419
|
end
|
368
420
|
end
|
369
421
|
end
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.2
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -141,7 +141,7 @@ files:
|
|
141
141
|
- vendor/jar-dependencies/io/netty/netty-all/4.1.18.Final/netty-all-4.1.18.Final.jar
|
142
142
|
- vendor/jar-dependencies/io/netty/netty-tcnative-boringssl-static/2.0.7.Final/netty-tcnative-boringssl-static-2.0.7.Final.jar
|
143
143
|
- vendor/jar-dependencies/org/apache/logging/log4j/log4j-api/2.6.2/log4j-api-2.6.2.jar
|
144
|
-
- vendor/jar-dependencies/org/logstash/plugins/input/http/logstash-input-http/3.2.
|
144
|
+
- vendor/jar-dependencies/org/logstash/plugins/input/http/logstash-input-http/3.2.2/logstash-input-http-3.2.2.jar
|
145
145
|
homepage: http://www.elastic.co/guide/en/logstash/current/index.html
|
146
146
|
licenses:
|
147
147
|
- Apache License (2.0)
|