fluent-plugin-elasticsearch 2.11.0 → 2.11.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b98a52f6ea81dcfb963cb072468dfdbbfd0ad23202c9974d1e19032ad3059b56
4
- data.tar.gz: 79ab8568a0d34dd71adb9c8b3e1016bdad3cabda102603a3da49cd19f9f15e1e
3
+ metadata.gz: 13413388e6afd8f9a4676e70d15952f5f2305876aac4499814f79b11b8613679
4
+ data.tar.gz: bb54ccf3fd39f494e62f1425fbb54558e4a6c3fe116fe5995c8905dd0b9de52a
5
5
  SHA512:
6
- metadata.gz: 843a03b70c2e6da558da1674b877b4771bbfe55f8ce444cd2c53a279b47772413c680059a09b57e420638f4bf6b91549f680177ef4881f32d4258c02780de105
7
- data.tar.gz: 321d22427a0f2c0770dd48f13ebcc710390a44b908329853cac4f4b7c69e6eda0d31591af507c58b99e71bacbd70f9a9fc80a793a4651336f4c21cf43172ede7
6
+ metadata.gz: 89b96d887e5a342c3d28db5109eb14b7a0b46179110ff9359166c4526377b7cfd507d7dfb9af4210697562ce8800d764f48f8c760f4e5719a08f4cc2857b99c3
7
+ data.tar.gz: 8d0d6b4dc17edac48dc986f119fca2dd27d3df89ed44f44fb8e155af679d8be8a563d8ae150aa05c0383607852eae15ac8b32e2ec071a8ab56a027c670da6ec6
data/README.md CHANGED
@@ -633,6 +633,8 @@ If you want to configure SSL/TLS version, you can specify ssl\_version parameter
633
633
  ssl_version TLSv1_2 # or [SSLv23, TLSv1, TLSv1_1]
634
634
  ```
635
635
 
636
+ :warning: If SSL/TLS enabled, it might have to be required to set ssl\_version.
637
+
636
638
  ### Proxy Support
637
639
 
638
640
  Starting with version 0.8.0, this gem uses excon, which supports proxy with environment variables - https://github.com/excon/excon#proxy-support
@@ -3,7 +3,7 @@ $:.push File.expand_path('../lib', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'fluent-plugin-elasticsearch'
6
- s.version = '2.11.0'
6
+ s.version = '2.11.1'
7
7
  s.authors = ['diogo', 'pitr']
8
8
  s.email = ['pitr.vern@gmail.com', 'me@diogoterror.com']
9
9
  s.description = %q{Elasticsearch output plugin for Fluent event collector}
@@ -192,6 +192,14 @@ EOC
192
192
  log.warn "Detected ES 7.x or above: `_doc` will be used as the document `_type`."
193
193
  @type_name = '_doc'.freeze
194
194
  end
195
+
196
+ if @last_seen_major_version >= 6
197
+ case @ssl_version
198
+ when :SSLv23, :TLSv1, :TLSv1_1
199
+ log.warn "Detected ES 6.x or above and enabled insecure security:
200
+ You might have to specify `ssl_version TLSv1_2` in configuration."
201
+ end
202
+ end
195
203
  end
196
204
 
197
205
  def detect_es_major_version
@@ -243,6 +243,26 @@ class ElasticsearchOutput < Test::Unit::TestCase
243
243
  assert_equal '_doc', instance.type_name
244
244
  end
245
245
 
246
+ test 'Detected Elasticsearch 6 and insecure security' do
247
+ config = %{
248
+ ssl_version TLSv1_1
249
+ @log_level warn
250
+ }
251
+ instance = driver(config, 6).instance
252
+ logs = driver.logs
253
+ assert_logs_include(logs, /Detected ES 6.x or above and enabled insecure security/, 1)
254
+ end
255
+
256
+ test 'Detected Elasticsearch 7 and secure security' do
257
+ config = %{
258
+ ssl_version TLSv1_2
259
+ @log_level warn
260
+ }
261
+ instance = driver(config, 7).instance
262
+ logs = driver.logs
263
+ assert_logs_include(logs, /Detected ES 6.x or above and enabled insecure security/, 0)
264
+ end
265
+
246
266
  test 'lack of tag in chunk_keys' do
247
267
  assert_raise_message(/'tag' in chunk_keys is required./) do
248
268
  driver(Fluent::Config::Element.new(
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-elasticsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.0
4
+ version: 2.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - diogo
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-06-20 00:00:00.000000000 Z
12
+ date: 2018-07-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd