logstash-input-elasticsearch 4.21.2 → 5.0.0

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: 70af2192f555f8afff4ef2f96072f2b215a2039207dfa12a9449f507f7b13f7b
4
- data.tar.gz: 73621246eccfd1fbb385be5e9ca5ef9a071cdb64008cb539a1e80a08c7a0ed34
3
+ metadata.gz: b34b6c6d814152e88f320525ea0bb80bbf1e63ff962e022aaac0a2385dd087b6
4
+ data.tar.gz: d142df9148ad69bf838d62badeec71382118741938db61e6aad0676bdb918a37
5
5
  SHA512:
6
- metadata.gz: bbc5c842d77204339e0bb64174f98ffb8bb1728957a1f64d1f83e1f5bad27ad76fc24f44b23a64d23247b26a806cfee7cbd52a16ea34e5490f1355bcdbb98303
7
- data.tar.gz: 7b258f80ca64e5dd16593a65d7326a5f3695f840cbf32fdeac9363a6a19d4747de9135065a7b940602cd77f43a02910b74d667761184ccb846a864e128334a20
6
+ metadata.gz: 19b2b1325ded83b5b93966365f855f104ba1881f2c991ffdbe92216e08d12d18a7b3ddd4a14d755f6d55c85c98e00d12ca566188c63706d6db1f0aa5b085048b
7
+ data.tar.gz: ff5de17e75281d8ddd0be70167f2c4dee0a90eef328c7e486b704e79fe10db7b7108b733f77438386a7abb18d504efbef5aaf7b0f34a6c8edd62791640514b7b
data/CHANGELOG.md CHANGED
@@ -1,12 +1,10 @@
1
- ## 4.21.2
2
- - Add elastic-transport client support used in elasticsearch-ruby 8.x [#225](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/225)
3
-
4
- ## 4.21.1
5
- - Fix: prevent plugin crash when hits contain illegal structure [#183](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/183)
6
- - When a hit cannot be converted to an event, the input now emits an event tagged with `_elasticsearch_input_failure` with an `[event][original]` containing a JSON-encoded string representation of the entire hit.
7
-
8
- ## 4.21.0
9
- - Add support for custom headers [#217](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/217)
1
+ ## 5.0.0
2
+ - SSL settings that were marked deprecated in version `4.17.0` are now marked obsolete, and will prevent the plugin from starting.
3
+ - These settings are:
4
+ - `ssl`, which should bre replaced by `ssl_enabled`
5
+ - `ca_file`, which should bre replaced by `ssl_certificate_authorities`
6
+ - `ssl_certificate_verification`, which should bre replaced by `ssl_verification_mode`
7
+ - [#213](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/213)
10
8
 
11
9
  ## 4.20.5
12
10
  - Add `x-elastic-product-origin` header to Elasticsearch requests [#211](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/211)
data/docs/index.asciidoc CHANGED
@@ -93,20 +93,16 @@ The plugin logs a warning when ECS is enabled and `target` isn't set.
93
93
 
94
94
  TIP: Set the `target` option to avoid potential schema conflicts.
95
95
 
96
- [id="plugins-{type}s-{plugin}-failure-handling"]
97
- ==== Failure handling
98
-
99
- When this input plugin cannot create a structured `Event` from a hit result, it will instead create an `Event` that is tagged with `_elasticsearch_input_failure` whose `[event][original]` is a JSON-encoded string representation of the entire hit.
100
-
101
- Common causes are:
102
-
103
- - When the hit result contains top-level fields that are {logstash-ref}/processing.html#reserved-fields[reserved in Logstash] but do not have the expected shape. Use the <<plugins-{type}s-{plugin}-target>> directive to avoid conflicts with the top-level namespace.
104
- - When <<plugins-{type}s-{plugin}-docinfo>> is enabled and the docinfo fields cannot be merged into the hit result. Combine <<plugins-{type}s-{plugin}-target>> and <<plugins-{type}s-{plugin}-docinfo_target>> to avoid conflict.
105
-
106
96
  [id="plugins-{type}s-{plugin}-options"]
107
97
  ==== Elasticsearch Input configuration options
108
98
 
109
- This plugin supports the following configuration options plus the <<plugins-{type}s-{plugin}-common-options>> and the <<plugins-{type}s-{plugin}-deprecated-options>> described later.
99
+ This plugin supports these configuration options plus the <<plugins-{type}s-{plugin}-common-options>> described later.
100
+
101
+ NOTE: As of version `5.0.0` of this plugin, a number of previously deprecated settings related to SSL have been removed.
102
+ Please check out <<plugins-{type}s-{plugin}-obsolete-options>> for details.
103
+
104
+ NOTE: As of version `5.0.0` of this plugin, a number of previously deprecated settings related to SSL have been removed.
105
+ Please check out <<plugins-{type}s-{plugin}-obsolete-options>> for details.
110
106
 
111
107
  [cols="<,<,<",options="header",]
112
108
  |=======================================================================
@@ -499,6 +495,8 @@ Enable SSL/TLS secured communication to Elasticsearch cluster.
499
495
  Leaving this unspecified will use whatever scheme is specified in the URLs listed in <<plugins-{type}s-{plugin}-hosts>> or extracted from the <<plugins-{type}s-{plugin}-cloud_id>>.
500
496
  If no explicit protocol is specified plain HTTP will be used.
501
497
 
498
+ When not explicitly set, SSL will be automatically enabled if any of the specified hosts use HTTPS.
499
+
502
500
  [id="plugins-{type}s-{plugin}-ssl_key"]
503
501
  ===== `ssl_key`
504
502
  * Value type is <<path,path>>
@@ -629,56 +627,21 @@ option when authenticating to the Elasticsearch server. If set to an
629
627
  empty string authentication will be disabled.
630
628
 
631
629
 
632
- [id="plugins-{type}s-{plugin}-deprecated-options"]
633
- ==== Elasticsearch Input deprecated configuration options
630
+ [id="plugins-{type}s-{plugin}-obsolete-options"]
631
+ ==== Elasticsearch Input Obsolete Configuration Options
634
632
 
635
- This plugin supports the following deprecated configurations.
633
+ WARNING: As of version `5.0.0` of this plugin, some configuration options have been replaced.
634
+ The plugin will fail to start if it contains any of these obsolete options.
636
635
 
637
- WARNING: Deprecated options are subject to removal in future releases.
638
636
 
639
- [cols="<,<,<",options="header",]
637
+ [cols="<,<",options="header",]
640
638
  |=======================================================================
641
- |Setting|Input type|Replaced by
642
- | <<plugins-{type}s-{plugin}-ca_file>> |a valid filesystem path|<<plugins-{type}s-{plugin}-ssl_certificate_authorities>>
643
- | <<plugins-{type}s-{plugin}-ssl>> |<<boolean,boolean>>|<<plugins-{type}s-{plugin}-ssl_enabled>>
644
- | <<plugins-{type}s-{plugin}-ssl_certificate_verification>> |<<boolean,boolean>>|<<plugins-{type}s-{plugin}-ssl_verification_mode>>
639
+ |Setting|Replaced by
640
+ | ca_file | <<plugins-{type}s-{plugin}-ssl_certificate_authorities>>
641
+ | ssl | <<plugins-{type}s-{plugin}-ssl_enabled>>
642
+ | ssl_certificate_verification | <<plugins-{type}s-{plugin}-ssl_verification_mode>>
645
643
  |=======================================================================
646
644
 
647
- [id="plugins-{type}s-{plugin}-ca_file"]
648
- ===== `ca_file`
649
- deprecated[4.17.0, Replaced by <<plugins-{type}s-{plugin}-ssl_certificate_authorities>>]
650
-
651
- * Value type is <<path,path>>
652
- * There is no default value for this setting.
653
-
654
- SSL Certificate Authority file in PEM encoded format, must also include any chain certificates as necessary.
655
-
656
- [id="plugins-{type}s-{plugin}-ssl"]
657
- ===== `ssl`
658
- deprecated[4.17.0, Replaced by <<plugins-{type}s-{plugin}-ssl_enabled>>]
659
-
660
- * Value type is <<boolean,boolean>>
661
- * Default value is `false`
662
-
663
- If enabled, SSL will be used when communicating with the Elasticsearch
664
- server (i.e. HTTPS will be used instead of plain HTTP).
665
-
666
-
667
- [id="plugins-{type}s-{plugin}-ssl_certificate_verification"]
668
- ===== `ssl_certificate_verification`
669
- deprecated[4.17.0, Replaced by <<plugins-{type}s-{plugin}-ssl_verification_mode>>]
670
-
671
- * Value type is <<boolean,boolean>>
672
- * Default value is `true`
673
-
674
- Option to validate the server's certificate. Disabling this severely compromises security.
675
- When certificate validation is disabled, this plugin implicitly trusts the machine
676
- resolved at the given address without validating its proof-of-identity.
677
- In this scenario, the plugin can transmit credentials to or process data from an untrustworthy
678
- man-in-the-middle or other compromised infrastructure.
679
- More information on the importance of certificate verification:
680
- **https://www.cs.utexas.edu/~shmat/shmat_ccs12.pdf**.
681
-
682
645
  [id="plugins-{type}s-{plugin}-common-options"]
683
646
  include::{include_path}/{type}.asciidoc[]
684
647
 
@@ -13,7 +13,9 @@ require "logstash/plugin_mixins/normalize_config_support"
13
13
  require "base64"
14
14
 
15
15
  require "elasticsearch"
16
- require "manticore"
16
+ require "elasticsearch/transport/transport/http/manticore"
17
+ require_relative "elasticsearch/patches/_elasticsearch_transport_http_manticore"
18
+ require_relative "elasticsearch/patches/_elasticsearch_transport_connections_selector"
17
19
 
18
20
  # .Compatibility Note
19
21
  # [NOTE]
@@ -199,23 +201,12 @@ class LogStash::Inputs::Elasticsearch < LogStash::Inputs::Base
199
201
  # Set the address of a forward HTTP proxy.
200
202
  config :proxy, :validate => :uri_or_empty
201
203
 
202
- # SSL
203
- config :ssl, :validate => :boolean, :default => false, :deprecated => "Set 'ssl_enabled' instead."
204
-
205
- # SSL Certificate Authority file in PEM encoded format, must also include any chain certificates as necessary
206
- config :ca_file, :validate => :path, :deprecated => "Set 'ssl_certificate_authorities' instead."
207
-
208
204
  # OpenSSL-style X.509 certificate certificate to authenticate the client
209
205
  config :ssl_certificate, :validate => :path
210
206
 
211
207
  # SSL Certificate Authority files in PEM encoded format, must also include any chain certificates as necessary
212
208
  config :ssl_certificate_authorities, :validate => :path, :list => true
213
209
 
214
- # Option to validate the server's certificate. Disabling this severely compromises security.
215
- # For more information on the importance of certificate verification please read
216
- # https://www.cs.utexas.edu/~shmat/shmat_ccs12.pdf
217
- config :ssl_certificate_verification, :validate => :boolean, :default => true, :deprecated => "Set 'ssl_verification_mode' instead."
218
-
219
210
  # The list of cipher suites to use, listed by priorities.
220
211
  # Supported cipher suites vary depending on which version of Java is used.
221
212
  config :ssl_cipher_suites, :validate => :string, :list => true
@@ -243,7 +234,6 @@ class LogStash::Inputs::Elasticsearch < LogStash::Inputs::Base
243
234
  config :ssl_truststore_password, :validate => :password
244
235
 
245
236
  # The JKS truststore to validate the server's certificate.
246
- # Use either `:ssl_truststore_path` or `:ssl_certificate_authorities`
247
237
  config :ssl_truststore_path, :validate => :path
248
238
 
249
239
  # The format of the truststore file. It must be either jks or pkcs12
@@ -265,6 +255,11 @@ class LogStash::Inputs::Elasticsearch < LogStash::Inputs::Base
265
255
  # If set, the _source of each hit will be added nested under the target instead of at the top-level
266
256
  config :target, :validate => :field_reference
267
257
 
258
+ # Obsolete Settings
259
+ config :ssl, :obsolete => "Set 'ssl_enabled' instead."
260
+ config :ca_file, :obsolete => "Set 'ssl_certificate_authorities' instead."
261
+ config :ssl_certificate_verification, :obsolete => "Set 'ssl_verification_mode' instead."
262
+
268
263
  # config :ca_trusted_fingerprint, :validate => :sha_256_hex
269
264
  include LogStash::PluginMixins::CATrustedFingerprintSupport
270
265
 
@@ -321,7 +316,7 @@ class LogStash::Inputs::Elasticsearch < LogStash::Inputs::Base
321
316
  @client_options = {
322
317
  :hosts => hosts,
323
318
  :transport_options => transport_options,
324
- :transport_class => get_transport_client_class,
319
+ :transport_class => ::Elasticsearch::Transport::Transport::HTTP::Manticore,
325
320
  :ssl => ssl_options
326
321
  }
327
322
 
@@ -351,20 +346,10 @@ class LogStash::Inputs::Elasticsearch < LogStash::Inputs::Base
351
346
  # This can be called externally from the query_executor
352
347
  public
353
348
  def push_hit(hit, output_queue, root_field = '_source')
354
- event = event_from_hit(hit, root_field)
355
- decorate(event)
356
- output_queue << event
357
- end
358
-
359
- def event_from_hit(hit, root_field)
360
349
  event = targeted_event_factory.new_event hit[root_field]
361
350
  set_docinfo_fields(hit, event) if @docinfo
362
-
363
- event
364
- rescue => e
365
- serialized_hit = hit.to_json
366
- logger.warn("Event creation error, original data now in [event][original] field", message: e.message, exception: e.class, data: serialized_hit)
367
- return event_factory.new_event('event' => { 'original' => serialized_hit }, 'tags' => ['_elasticsearch_input_failure'])
351
+ decorate(event)
352
+ output_queue << event
368
353
  end
369
354
 
370
355
  def set_docinfo_fields(hit, event)
@@ -372,8 +357,10 @@ class LogStash::Inputs::Elasticsearch < LogStash::Inputs::Base
372
357
  docinfo_target = event.get(@docinfo_target) || {}
373
358
 
374
359
  unless docinfo_target.is_a?(Hash)
375
- # expect error to be handled by `#event_from_hit`
376
- fail RuntimeError, "Incompatible event; unable to merge docinfo fields into docinfo_target=`#{@docinfo_target}`"
360
+ @logger.error("Incompatible Event, incompatible type for the docinfo_target=#{@docinfo_target} field in the `_source` document, expected a hash got:", :docinfo_target_type => docinfo_target.class, :event => event.to_hash_with_metadata)
361
+
362
+ # TODO: (colin) I am not sure raising is a good strategy here?
363
+ raise Exception.new("Elasticsearch input: incompatible event")
377
364
  end
378
365
 
379
366
  @docinfo_fields.each do |field|
@@ -418,8 +405,6 @@ class LogStash::Inputs::Elasticsearch < LogStash::Inputs::Base
418
405
  ssl_options[:ssl] = true if @ssl_enabled
419
406
 
420
407
  unless @ssl_enabled
421
- # Keep it backward compatible with the deprecated `ssl` option
422
- ssl_options[:trust_strategy] = trust_strategy_for_ca_trusted_fingerprint if original_params.include?('ssl')
423
408
  return ssl_options
424
409
  end
425
410
 
@@ -483,38 +468,11 @@ class LogStash::Inputs::Elasticsearch < LogStash::Inputs::Base
483
468
  end
484
469
 
485
470
  def setup_ssl_params!
486
- @ssl_enabled = normalize_config(:ssl_enabled) do |normalize|
487
- normalize.with_deprecated_alias(:ssl)
471
+ # Only infer ssl_enabled if it wasn't explicitly set
472
+ unless original_params.include?('ssl_enabled')
473
+ @ssl_enabled = effectively_ssl?
474
+ params['ssl_enabled'] = @ssl_enabled
488
475
  end
489
-
490
- # Infer the value if neither the deprecate `ssl` and `ssl_enabled` were set
491
- infer_ssl_enabled_from_hosts
492
-
493
- @ssl_certificate_authorities = normalize_config(:ssl_certificate_authorities) do |normalize|
494
- normalize.with_deprecated_mapping(:ca_file) do |ca_file|
495
- [ca_file]
496
- end
497
- end
498
-
499
- @ssl_verification_mode = normalize_config(:ssl_verification_mode) do |normalize|
500
- normalize.with_deprecated_mapping(:ssl_certificate_verification) do |ssl_certificate_verification|
501
- if ssl_certificate_verification == true
502
- "full"
503
- else
504
- "none"
505
- end
506
- end
507
- end
508
-
509
- params['ssl_enabled'] = @ssl_enabled
510
- params['ssl_certificate_authorities'] = @ssl_certificate_authorities unless @ssl_certificate_authorities.nil?
511
- params['ssl_verification_mode'] = @ssl_verification_mode unless @ssl_verification_mode.nil?
512
- end
513
-
514
- def infer_ssl_enabled_from_hosts
515
- return if original_params.include?('ssl') || original_params.include?('ssl_enabled')
516
-
517
- @ssl_enabled = params['ssl_enabled'] = effectively_ssl?
518
476
  end
519
477
 
520
478
  def setup_hosts
@@ -676,20 +634,6 @@ class LogStash::Inputs::Elasticsearch < LogStash::Inputs::Base
676
634
  end
677
635
  end
678
636
 
679
- def get_transport_client_class
680
- # LS-core includes `elasticsearch` gem. The gem is composed of two separate gems: `elasticsearch-api` and `elasticsearch-transport`
681
- # And now `elasticsearch-transport` is old, instead we have `elastic-transport`.
682
- # LS-core updated `elasticsearch` > 8: https://github.com/elastic/logstash/pull/17161
683
- # Following source bits are for the compatibility to support both `elasticsearch-transport` and `elastic-transport` gems
684
- require "elasticsearch/transport/transport/http/manticore"
685
- require_relative "elasticsearch/patches/_elasticsearch_transport_http_manticore"
686
- require_relative "elasticsearch/patches/_elasticsearch_transport_connections_selector"
687
- ::Elasticsearch::Transport::Transport::HTTP::Manticore
688
- rescue ::LoadError
689
- require "elastic/transport/transport/http/manticore"
690
- ::Elastic::Transport::Transport::HTTP::Manticore
691
- end
692
-
693
637
  module URIOrEmptyValidator
694
638
  ##
695
639
  # @override to provide :uri_or_empty validator
@@ -1,13 +1,13 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-input-elasticsearch'
4
- s.version = '4.21.2'
4
+ s.version = '5.0.0'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Reads query results from an Elasticsearch cluster"
7
7
  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"
8
8
  s.authors = ["Elastic"]
9
9
  s.email = 'info@elastic.co'
10
- s.homepage = "https://elastic.co/logstash"
10
+ s.homepage = "http://www.elastic.co/guide/en/logstash/current/index.html"
11
11
  s.require_paths = ["lib"]
12
12
 
13
13
  # Files
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
26
26
  s.add_runtime_dependency "logstash-mixin-validator_support", '~> 1.0'
27
27
  s.add_runtime_dependency "logstash-mixin-scheduler", '~> 1.0'
28
28
 
29
- s.add_runtime_dependency 'elasticsearch', '>= 7.17.9', '< 9'
29
+ s.add_runtime_dependency 'elasticsearch', '>= 7.17.9'
30
30
  s.add_runtime_dependency 'logstash-mixin-ca_trusted_fingerprint_support', '~> 1.0'
31
31
  s.add_runtime_dependency 'logstash-mixin-normalize_config_support', '~>1.0'
32
32
 
@@ -1,19 +1,20 @@
1
1
  -----BEGIN CERTIFICATE-----
2
- MIIDFTCCAf2gAwIBAgIBATANBgkqhkiG9w0BAQsFADA0MTIwMAYDVQQDEylFbGFz
3
- dGljIENlcnRpZmljYXRlIFRvb2wgQXV0b2dlbmVyYXRlZCBDQTAeFw0yNDEyMjYy
4
- MjI3MTVaFw0yNTEyMjYyMjI3MTVaMDQxMjAwBgNVBAMTKUVsYXN0aWMgQ2VydGlm
5
- aWNhdGUgVG9vbCBBdXRvZ2VuZXJhdGVkIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC
6
- AQ8AMIIBCgKCAQEArUe66xG4Y2zO13gRC+rBwyvxe+c01pqV6ukw6isIbJIQWs1/
7
- QfEMhUwYwKs6/UXxK+VwardcA2zYwngXbGGEtms+mpUfH5CdJnrqW7lHz1BVK4yH
8
- 90IzGE0GU4D90OW/L4QkGX0fv3VQbL8KGFKBoF04pXIaSGMStFN4wirutHtQboYv
9
- 99X4kbLjVSIuubUpA/v9dUP1TNl8ar+HKUWRM96ijHkFTF3FR0NnZyt44gP5qC0h
10
- i4lUiR6Uo9D6WMFjeRYFF7GolCy/I1SzWBmmOnNhQLO5VxcNG4ldhBcapZeGwE98
11
- m/5lxLIwgFR9ZP8bXdxZTWLC58/LQ2NqOjA9mwIDAQABozIwMDAPBgNVHRMBAf8E
12
- BTADAQH/MB0GA1UdDgQWBBTIJMnuftpfkxNCOkbF0R4xgcKQRjANBgkqhkiG9w0B
13
- AQsFAAOCAQEAhfg/cm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BBYEFMgkye5+2l+TE0I6RsXRHjGBwpBGMB8GA1UdIwQY
13
+ MBaAFMgkye5+2l+TE0I6RsXRHjGBwpBGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZI
14
+ hvcNAQELBQADggEBAIgtJW8sy5lBpzPRHkmWSS/SCZIPsABW+cHqQ3e0udrI3CLB
15
+ G9n7yqAPWOBTbdqC2GM8dvAS/Twx4Bub/lWr84dFCu+t0mQq4l5kpJMVRS0KKXPL
16
+ DwJbUN3oPNYy4uPn5Xi+XY3BYFce5vwJUsqIxeAbIOxVTNx++k5DFnB0ESAM23QL
17
+ sgUZl7xl3/DkdO4oHj30gmTRW9bjCJ6umnHIiO3JoJatrprurUIt80vHC4Ndft36
18
+ NBQ9mZpequ4RYjpSZNLcVsxyFAYwEY4g8MvH0MoMo2RRLfehmMCzXnI/Wh2qEyYz
19
+ emHprBii/5y1HieKXlX9CZRb5qEPHckDVXW3znw=
19
20
  -----END CERTIFICATE-----
@@ -1 +1 @@
1
- b1e955819b0d14f64f863adb103c248ddacf2e17bea48d04ee4b57c64814ccc4
1
+ 195a7e7b1bc29f3d7913a918a44721704d27fa56facea0cd72a8093c7107c283
@@ -1,19 +1,20 @@
1
1
  -----BEGIN CERTIFICATE-----
2
- MIIDIzCCAgugAwIBAgIBATANBgkqhkiG9w0BAQsFADA0MTIwMAYDVQQDEylFbGFz
3
- dGljIENlcnRpZmljYXRlIFRvb2wgQXV0b2dlbmVyYXRlZCBDQTAeFw0yNDEyMjYy
4
- MjI3MTVaFw0yNTEyMjYyMjI3MTVaMA0xCzAJBgNVBAMTAmVzMIIBIjANBgkqhkiG
5
- 9w0BAQEFAAOCAQ8AMIIBCgKCAQEArZLZvLSWDK7Ul+AaBnjU81dsfaow8zOjCC5V
6
- V21nXpYzQJoQbuWcvGYxwL7ZDs2ca4Wc8BVCj1NDduHuP7U+QIlUdQpl8kh5a0Zz
7
- 36pcFw7UyF51/AzWixJrht/Azzkb5cpZtE22ZK0KhS4oCsj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tZ16WM0CaEG7lnLxmMcC+2Q7NnGuFnPAVQo9T
7
+ Q3bh7j+1PkCJVHUKZfJIeWtGc9+qXBcO1MhedfwM1osSa4bfwM85G+XKWbRNtmSt
8
+ CoUuKArIyZkzdBAAQLBoQyPf3DIza1Au4j9Hb3zrswD6e7n2PN4ffIyil1GFduLJ
9
+ 2275qqFiOhkEDUhv7BKNftVBh/89O/5lSqAQGuQ1aDRr8TdHwhO71u4ZIU/Pn6yX
10
+ LGBWrQG53+qpdCsxGvJTfbtIEYUDTN83CirIxDKJgc1QXOEldylztHf4xnQ7ZarJ
11
+ tqF6pUzHbRsCAwEAAaNnMGUwHQYDVR0OBBYEFFQUK+6Cg2kExRj1xSDzEi4kkgKX
12
+ MB8GA1UdIwQYMBaAFMgkye5+2l+TE0I6RsXRHjGBwpBGMBgGA1UdEQQRMA+CDWVs
13
+ YXN0aWNzZWFyY2gwCQYDVR0TBAIwADANBgkqhkiG9w0BAQsFAAOCAQEAinaknZIc
14
+ 7xtQNwUwa+kdET+I4lMz+TJw9vTjGKPJqe082n81ycKU5b+a/OndG90z+dTwhShW
15
+ f0oZdIe/1rDCdiRU4ceCZA4ybKrFDIbW8gOKZOx9rsgEx9XNELj4ocZTBqxjQmNE
16
+ Ho91fli5aEm0EL2vJgejh4hcfDeElQ6go9gtvAHQ57XEADQSenvt69jOICOupnS+
17
+ LSjDVhv/VLi3CAip0B+lD5fX/DVQdrJ62eRGuQYxoouE3saCO58qUUrKB39yD9KA
18
+ qRA/sVxyLogxaU+5dLfc0NJdOqSzStxQ2vdMvAWo9tZZ2UBGFrk5SdwCQe7Yv5mX
19
+ qi02i4q6meHGcw==
19
20
  -----END CERTIFICATE-----
@@ -21,13 +21,6 @@ describe LogStash::Inputs::Elasticsearch, :ecs_compatibility_support do
21
21
  let(:es_version) { "7.5.0" }
22
22
  let(:cluster_info) { {"version" => {"number" => es_version, "build_flavor" => build_flavor}, "tagline" => "You Know, for Search"} }
23
23
 
24
- def elastic_ruby_v8_client_available?
25
- Elasticsearch::Transport
26
- false
27
- rescue NameError # NameError: uninitialized constant Elasticsearch::Transport if Elastic Ruby client is not available
28
- true
29
- end
30
-
31
24
  before(:each) do
32
25
  Elasticsearch::Client.send(:define_method, :ping) { } # define no-action ping method
33
26
  allow_any_instance_of(Elasticsearch::Client).to receive(:info).and_return(cluster_info)
@@ -65,6 +58,19 @@ describe LogStash::Inputs::Elasticsearch, :ecs_compatibility_support do
65
58
  end
66
59
  end
67
60
 
61
+ describe 'handling obsolete settings' do
62
+ [{:name => 'ssl', :replacement => 'ssl_enabled', :sample_value => true},
63
+ {:name => 'ca_file', :replacement => 'ssl_certificate_authorities', :sample_value => 'spec/fixtures/test_certs/ca.crt'},
64
+ {:name => 'ssl_certificate_verification', :replacement => 'ssl_verification_mode', :sample_value => false }].each do | obsolete_setting|
65
+ context "with obsolete #{obsolete_setting[:name]}" do
66
+ let (:config) { {obsolete_setting[:name] => obsolete_setting[:sample_value]} }
67
+ it "should raise a config error with the appropriate message" do
68
+ expect { plugin.register }.to raise_error LogStash::ConfigurationError, /The setting `#{obsolete_setting[:name]}` in plugin `elasticsearch` is obsolete and is no longer available. Set '#{obsolete_setting[:replacement]}' instead/i
69
+ end
70
+ end
71
+ end
72
+ end
73
+
68
74
  context "against not authentic Elasticsearch" do
69
75
  before(:each) do
70
76
  Elasticsearch::Client.send(:define_method, :ping) { raise Elasticsearch::UnsupportedProductError.new("Fake error") } # define error ping method
@@ -86,11 +92,9 @@ describe LogStash::Inputs::Elasticsearch, :ecs_compatibility_support do
86
92
 
87
93
  before do
88
94
  allow(Elasticsearch::Client).to receive(:new).and_return(es_client)
89
- if elastic_ruby_v8_client_available?
90
- allow(es_client).to receive(:info).and_raise(Elastic::Transport::Transport::Errors::BadRequest.new)
91
- else
92
- allow(es_client).to receive(:info).and_raise(Elasticsearch::Transport::Transport::Errors::BadRequest.new)
93
- end
95
+ allow(es_client).to receive(:info).and_raise(
96
+ Elasticsearch::Transport::Transport::Errors::BadRequest.new
97
+ )
94
98
  end
95
99
 
96
100
  it "raises an exception" do
@@ -662,28 +666,11 @@ describe LogStash::Inputs::Elasticsearch, :ecs_compatibility_support do
662
666
  context 'if the `docinfo_target` exist but is not of type hash' do
663
667
  let(:config) { base_config.merge 'docinfo' => true, "docinfo_target" => 'metadata_with_string' }
664
668
  let(:do_register) { false }
665
- let(:mock_queue) { double('Queue', :<< => nil) }
666
- let(:hit) { response.dig('hits', 'hits').first }
667
-
668
- it 'emits a tagged event with JSON-serialized event in [event][original]' do
669
- allow(plugin).to receive(:logger).and_return(double('Logger').as_null_object)
670
669
 
670
+ it 'raises an exception if the `docinfo_target` exist but is not of type hash' do
671
+ expect(client).not_to receive(:clear_scroll)
671
672
  plugin.register
672
- plugin.run(mock_queue)
673
-
674
- expect(mock_queue).to have_received(:<<) do |event|
675
- expect(event).to be_a_kind_of LogStash::Event
676
-
677
- expect(event.get('tags')).to include("_elasticsearch_input_failure")
678
- expect(event.get('[event][original]')).to be_a_kind_of String
679
- expect(JSON.load(event.get('[event][original]'))).to eq hit
680
- end
681
-
682
- expect(plugin.logger)
683
- .to have_received(:warn).with(
684
- a_string_including("Event creation error, original data now in [event][original] field"),
685
- a_hash_including(:message => a_string_including('unable to merge docinfo fields into docinfo_target=`metadata_with_string`'),
686
- :data => a_string_including('"_id":"C5b2xLQwTZa76jBmHIbwHQ"')))
673
+ expect { plugin.run([]) }.to raise_error(Exception, /incompatible event/)
687
674
  end
688
675
 
689
676
  end
@@ -740,13 +727,8 @@ describe LogStash::Inputs::Elasticsearch, :ecs_compatibility_support do
740
727
  it "should set host(s)" do
741
728
  plugin.register
742
729
  client = plugin.send(:client)
743
- target_field = :@seeds
744
- begin
745
- Elasticsearch::Transport::Client
746
- rescue
747
- target_field = :@hosts
748
- end
749
- expect( client.transport.instance_variable_get(target_field) ).to eql [{
730
+
731
+ expect( client.transport.instance_variable_get(:@seeds) ).to eql [{
750
732
  :scheme => "https",
751
733
  :host => "ac31ebb90241773157043c34fd26fd46.us-central1.gcp.cloud.es.io",
752
734
  :port => 9243,
@@ -1266,88 +1248,6 @@ describe LogStash::Inputs::Elasticsearch, :ecs_compatibility_support do
1266
1248
  end
1267
1249
  end
1268
1250
 
1269
- context '#push_hit' do
1270
- let(:config) do
1271
- {
1272
- 'docinfo' => true, # include ids
1273
- 'docinfo_target' => '[@metadata][docinfo]'
1274
- }
1275
- end
1276
-
1277
- let(:hit) do
1278
- JSON.load(<<~EOJSON)
1279
- {
1280
- "_index" : "test_bulk_index_2",
1281
- "_type" : "_doc",
1282
- "_id" : "sHe6A3wBesqF7ydicQvG",
1283
- "_score" : 1.0,
1284
- "_source" : {
1285
- "@timestamp" : "2021-09-20T15:02:02.557Z",
1286
- "message" : "ping",
1287
- "@version" : "17",
1288
- "sequence" : 7,
1289
- "host" : {
1290
- "name" : "maybe.local",
1291
- "ip" : "127.0.0.1"
1292
- }
1293
- }
1294
- }
1295
- EOJSON
1296
- end
1297
-
1298
- let(:mock_queue) { double('queue', :<< => nil) }
1299
-
1300
- it 'pushes a generated event to the queue' do
1301
- plugin.send(:push_hit, hit, mock_queue)
1302
- expect(mock_queue).to have_received(:<<) do |event|
1303
- expect(event).to be_a_kind_of LogStash::Event
1304
-
1305
- # fields overriding defaults
1306
- expect(event.timestamp.to_s).to eq("2021-09-20T15:02:02.557Z")
1307
- expect(event.get('@version')).to eq("17")
1308
-
1309
- # structure from hit's _source
1310
- expect(event.get('message')).to eq("ping")
1311
- expect(event.get('sequence')).to eq(7)
1312
- expect(event.get('[host][name]')).to eq("maybe.local")
1313
- expect(event.get('[host][ip]')).to eq("127.0.0.1")
1314
-
1315
- # docinfo fields
1316
- expect(event.get('[@metadata][docinfo][_index]')).to eq("test_bulk_index_2")
1317
- expect(event.get('[@metadata][docinfo][_type]')).to eq("_doc")
1318
- expect(event.get('[@metadata][docinfo][_id]')).to eq("sHe6A3wBesqF7ydicQvG")
1319
- end
1320
- end
1321
-
1322
- context 'when event creation fails' do
1323
- before(:each) do
1324
- allow(plugin).to receive(:logger).and_return(double('Logger').as_null_object)
1325
-
1326
- allow(plugin.event_factory).to receive(:new_event).and_call_original
1327
- allow(plugin.event_factory).to receive(:new_event).with(a_hash_including hit['_source']).and_raise(RuntimeError, 'intentional')
1328
- end
1329
-
1330
- it 'pushes a tagged event containing a JSON-encoded hit in [event][original]' do
1331
- plugin.send(:push_hit, hit, mock_queue)
1332
-
1333
- expect(mock_queue).to have_received(:<<) do |event|
1334
- expect(event).to be_a_kind_of LogStash::Event
1335
-
1336
- expect(event.get('tags')).to include("_elasticsearch_input_failure")
1337
- expect(event.get('[event][original]')).to be_a_kind_of String
1338
- expect(JSON.load(event.get('[event][original]'))).to eq hit
1339
- end
1340
-
1341
- expect(plugin.logger)
1342
- .to have_received(:warn).with(
1343
- a_string_including("Event creation error, original data now in [event][original] field"),
1344
- a_hash_including(:message => a_string_including('intentional'),
1345
- :data => a_string_including('"_id":"sHe6A3wBesqF7ydicQvG"')))
1346
-
1347
- end
1348
- end
1349
- end
1350
-
1351
1251
  # @note can be removed once we depends on elasticsearch gem >= 6.x
1352
1252
  def extract_transport(client) # on 7.x client.transport is a ES::Transport::Client
1353
1253
  client.transport.respond_to?(:transport) ? client.transport.transport : client.transport
@@ -4,7 +4,7 @@ require "logstash/plugin"
4
4
  require "logstash/inputs/elasticsearch"
5
5
  require_relative "../../../spec/es_helper"
6
6
 
7
- describe LogStash::Inputs::Elasticsearch do
7
+ describe LogStash::Inputs::Elasticsearch, :integration => true do
8
8
 
9
9
  SECURE_INTEGRATION = ENV['SECURE_INTEGRATION'].eql? 'true'
10
10
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-elasticsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.21.2
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-03-17 00:00:00.000000000 Z
11
+ date: 2024-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -92,9 +92,6 @@ dependencies:
92
92
  - - ">="
93
93
  - !ruby/object:Gem::Version
94
94
  version: 7.17.9
95
- - - "<"
96
- - !ruby/object:Gem::Version
97
- version: '9'
98
95
  name: elasticsearch
99
96
  type: :runtime
100
97
  prerelease: false
@@ -103,9 +100,6 @@ dependencies:
103
100
  - - ">="
104
101
  - !ruby/object:Gem::Version
105
102
  version: 7.17.9
106
- - - "<"
107
- - !ruby/object:Gem::Version
108
- version: '9'
109
103
  - !ruby/object:Gem::Dependency
110
104
  requirement: !ruby/object:Gem::Requirement
111
105
  requirements:
@@ -283,19 +277,16 @@ files:
283
277
  - lib/logstash/inputs/elasticsearch/patches/_elasticsearch_transport_http_manticore.rb
284
278
  - logstash-input-elasticsearch.gemspec
285
279
  - spec/es_helper.rb
286
- - spec/fixtures/test_certs/GENERATED_AT
287
280
  - spec/fixtures/test_certs/ca.crt
288
281
  - spec/fixtures/test_certs/ca.der.sha256
289
282
  - spec/fixtures/test_certs/ca.key
290
- - spec/fixtures/test_certs/es.chain.crt
291
283
  - spec/fixtures/test_certs/es.crt
292
284
  - spec/fixtures/test_certs/es.key
293
- - spec/fixtures/test_certs/renew.sh
294
285
  - spec/inputs/elasticsearch_spec.rb
295
286
  - spec/inputs/elasticsearch_ssl_spec.rb
296
287
  - spec/inputs/integration/elasticsearch_spec.rb
297
288
  - spec/inputs/paginated_search_spec.rb
298
- homepage: https://elastic.co/logstash
289
+ homepage: http://www.elastic.co/guide/en/logstash/current/index.html
299
290
  licenses:
300
291
  - Apache License (2.0)
301
292
  metadata:
@@ -322,14 +313,11 @@ specification_version: 4
322
313
  summary: Reads query results from an Elasticsearch cluster
323
314
  test_files:
324
315
  - spec/es_helper.rb
325
- - spec/fixtures/test_certs/GENERATED_AT
326
316
  - spec/fixtures/test_certs/ca.crt
327
317
  - spec/fixtures/test_certs/ca.der.sha256
328
318
  - spec/fixtures/test_certs/ca.key
329
- - spec/fixtures/test_certs/es.chain.crt
330
319
  - spec/fixtures/test_certs/es.crt
331
320
  - spec/fixtures/test_certs/es.key
332
- - spec/fixtures/test_certs/renew.sh
333
321
  - spec/inputs/elasticsearch_spec.rb
334
322
  - spec/inputs/elasticsearch_ssl_spec.rb
335
323
  - spec/inputs/integration/elasticsearch_spec.rb
@@ -1 +0,0 @@
1
- 2024-12-26T22:27:15+00:00
@@ -1,38 +0,0 @@
1
- -----BEGIN CERTIFICATE-----
2
- MIIDIzCCAgugAwIBAgIBATANBgkqhkiG9w0BAQsFADA0MTIwMAYDVQQDEylFbGFz
3
- dGljIENlcnRpZmljYXRlIFRvb2wgQXV0b2dlbmVyYXRlZCBDQTAeFw0yNDEyMjYy
4
- MjI3MTVaFw0yNTEyMjYyMjI3MTVaMA0xCzAJBgNVBAMTAmVzMIIBIjANBgkqhkiG
5
- 9w0BAQEFAAOCAQ8AMIIBCgKCAQEArZLZvLSWDK7Ul+AaBnjU81dsfaow8zOjCC5V
6
- V21nXpYzQJoQbuWcvGYxwL7ZDs2ca4Wc8BVCj1NDduHuP7U+QIlUdQpl8kh5a0Zz
7
- 36pcFw7UyF51/AzWixJrht/Azzkb5cpZtE22ZK0KhS4oCsjJmTN0EABAsGhDI9/c
8
- MjNrUC7iP0dvfOuzAPp7ufY83h98jKKXUYV24snbbvmqoWI6GQQNSG/sEo1+1UGH
9
- /z07/mVKoBAa5DVoNGvxN0fCE7vW7hkhT8+frJcsYFatAbnf6ql0KzEa8lN9u0gR
10
- hQNM3zcKKsjEMomBzVBc4SV3KXO0d/jGdDtlqsm2oXqlTMdtGwIDAQABo2cwZTAY
11
- BgNVHREEETAPgg1lbGFzdGljc2VhcmNoMAkGA1UdEwQCMAAwHQYDVR0OBBYEFFQU
12
- K+6Cg2kExRj1xSDzEi4kkgKXMB8GA1UdIwQYMBaAFMgkye5+2l+TE0I6RsXRHjGB
13
-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bXdxZTWLC58/LQ2NqOjA9mwIDAQABozIwMDAPBgNVHRMBAf8E
31
- BTADAQH/MB0GA1UdDgQWBBTIJMnuftpfkxNCOkbF0R4xgcKQRjANBgkqhkiG9w0B
32
- AQsFAAOCAQEAhfg/cmXc4Uh90yiXU8jOW8saQjTsq4ZMDQiLfJsNmNNYmHFN0vhv
33
- lJRI1STdy7+GpjS5QbrMjQIxWSS8X8xysE4Rt81IrWmLuao35TRFyoiE1seBQ5sz
34
- p/BxZUe57JvWi9dyzv2df4UfWFdGBhzdr80odZmz4i5VIv6qCKJKsGikcuLpepmp
35
- E/UKnKHeR/dFWsxzA9P2OzHTUNBMOOA2PyAUL49pwoChwJeOWN/zAgwMWLbuHFG0
36
- IN0u8swAmeH98QdvzbhiOatGNpqfTNvQEDc19yVjfXKpBVZQ79WtronYSqrbrUa1
37
- T2zD8bIVP7CdddD/UmpT1SSKh4PJxudy5Q==
38
- -----END CERTIFICATE-----
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- set -e
4
- cd "$(dirname "$0")"
5
-
6
- openssl x509 -x509toreq -in ca.crt -copy_extensions copyall -signkey ca.key -out ca.csr
7
- openssl x509 -req -copy_extensions copyall -days 365 -in ca.csr -set_serial 0x01 -signkey ca.key -out ca.crt && rm ca.csr
8
- openssl x509 -in ca.crt -outform der | sha256sum | awk '{print $1}' > ca.der.sha256
9
-
10
- openssl x509 -x509toreq -in es.crt -copy_extensions copyall -signkey es.key -out es.csr
11
- openssl x509 -req -copy_extensions copyall -days 365 -in es.csr -set_serial 0x01 -CA ca.crt -CAkey ca.key -out es.crt && rm es.csr
12
- cat es.crt ca.crt > es.chain.crt
13
-
14
- # output ISO8601 timestamp to file
15
- date -Iseconds > GENERATED_AT