logstash-mixin-http_client 7.1.0 → 7.2.0

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: 97fab7f4d10ff4a671b1e2bace7d0b2c4bf6a661b84361040a0f8acf28896291
4
- data.tar.gz: 3be65e03ac4c5f269ce331b01f1d27529a293a46f31756a709dbd0f4e3372295
3
+ metadata.gz: 967d2306be29d709b80a1e2483e09c7eb06acdbc5079af3090ef265427377b33
4
+ data.tar.gz: 6d358bd6a4b819a14cd669af4d14ea3f130b2802bec6872e6ef03f27b8c5e186
5
5
  SHA512:
6
- metadata.gz: bd2a4e6610601b961fe6ebe6e88723ca0067b4a07bb66a2f84699843ade8fc6c613707d697bb288587cd7dce95a65fd23551891e9d7a2274136d684aebf7c8b6
7
- data.tar.gz: 816a31d07cbacb997a2d71750d282089f404d52f6e6a8e092045fb29521746029dbb64391201f936a1edd83dcf32e01e49ca8ded8932d73d942c0fe1239bd34b
6
+ metadata.gz: a0ad4d31a8e1a72d38686466b141ff16c22b24821d8c9dc9d8a0df6d2745d05b7a4e644a26b869c4c6bacac4d73e27aaa2fa065dcbbd67d1bbda2b35153e08cf
7
+ data.tar.gz: b3bf2076187e018a00b19c0c2ec9eb770ae241879fc798aad60ec8b6bb02f79ce508aa23f9ff5c29ba03280288cd2cc3d5e002a87aebda51f680d2f322fe6880
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 7.2.0
2
+ - Feat: add `ssl_supported_protocols` option [#40](https://github.com/logstash-plugins/logstash-mixin-http_client/pull/40)
3
+
1
4
  ## 7.1.0
2
5
  - Feat: add `ssl_verification_mode` [#39](https://github.com/logstash-plugins/logstash-mixin-http_client/pull/39)
3
6
 
@@ -76,6 +76,9 @@ module LogStash::PluginMixins::HttpClient
76
76
  # none: no verification of the server’s certificate
77
77
  config :ssl_verification_mode, :validate => ['full', 'none'], :default => 'full'
78
78
 
79
+ # NOTE: the default setting [] uses Java SSL engine defaults.
80
+ config :ssl_supported_protocols, :validate => ['TLSv1.1', 'TLSv1.2', 'TLSv1.3'], :default => [], :list => true
81
+
79
82
  # If you need to use a custom truststore (`.jks`) specify that here. This does not work with .pem certs!
80
83
  config :truststore, :validate => :path
81
84
 
@@ -187,6 +190,10 @@ module LogStash::PluginMixins::HttpClient
187
190
  c[:ssl][:verify] = :disable
188
191
  end
189
192
 
193
+ if @ssl_supported_protocols && @ssl_supported_protocols.any?
194
+ c[:ssl][:protocols] = @ssl_supported_protocols
195
+ end
196
+
190
197
  c
191
198
  end
192
199
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-mixin-http_client'
3
- s.version = '7.1.0'
3
+ s.version = '7.2.0'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = "AWS mixins to provide a unified interface for Amazon Webservice"
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"
@@ -216,4 +216,39 @@ describe LogStash::PluginMixins::HttpClient do
216
216
  end
217
217
 
218
218
  end
219
+
220
+ describe "with supported protocols" do
221
+ context "default" do
222
+ let(:conf) { basic_config }
223
+
224
+ it "does not set manticore protocols option" do
225
+ expect( Dummy.new(conf).client_config[:ssl] ).to_not include :protocols
226
+ end
227
+ end
228
+
229
+ context "empty" do
230
+ let(:conf) { basic_config.merge("ssl_supported_protocols" => []) }
231
+
232
+ it "does not set manticore protocols option" do
233
+ expect( Dummy.new(conf).client_config[:ssl] ).to_not include :protocols
234
+ end
235
+ end
236
+
237
+ context "'TLSv1.3'" do
238
+ let(:conf) { basic_config.merge("ssl_supported_protocols" => ['TLSv1.3']) }
239
+
240
+ it "sets manticore protocols option" do
241
+ expect( Dummy.new(conf).client_config[:ssl] ).to include :protocols => ['TLSv1.3']
242
+ end
243
+ end
244
+
245
+ context "'TLSv1.2' and 'TLSv1.3'" do
246
+ let(:conf) { basic_config.merge("ssl_supported_protocols" => ['TLSv1.3', 'TLSv1.2']) }
247
+
248
+ it "sets manticore protocols option" do
249
+ expect( Dummy.new(conf).client_config[:ssl] ).to include :protocols => ['TLSv1.3', 'TLSv1.2']
250
+ end
251
+ end
252
+
253
+ end
219
254
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-mixin-http_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.0
4
+ version: 7.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-25 00:00:00.000000000 Z
11
+ date: 2022-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement