logstash-filter-elasticsearch 4.3.1 → 4.4.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 +4 -4
- data/CHANGELOG.md +6 -0
- data/docs/index.asciidoc +5 -2
- data/lib/logstash/filters/elasticsearch/client.rb +26 -19
- data/lib/logstash/filters/elasticsearch.rb +2 -4
- data/logstash-filter-elasticsearch.gemspec +3 -3
- data/spec/filters/elasticsearch_dsl_spec.rb +0 -30
- data/spec/filters/elasticsearch_spec.rb +34 -37
- data/spec/filters/elasticsearch_ssl_spec.rb +1 -1
- data/spec/filters/fixtures/test_certs/ca.crt +30 -30
- data/spec/filters/fixtures/test_certs/ca.der.sha256 +1 -1
- data/spec/filters/fixtures/test_certs/ca.key +52 -51
- data/spec/filters/fixtures/test_certs/es.chain.crt +62 -61
- data/spec/filters/fixtures/test_certs/es.crt +32 -31
- data/spec/filters/fixtures/test_certs/es.der.sha256 +1 -1
- data/spec/filters/fixtures/test_certs/es.key +52 -51
- data/spec/filters/fixtures/test_certs/ls.chain.crt +58 -58
- data/spec/filters/fixtures/test_certs/ls.chain.jks +0 -0
- data/spec/filters/fixtures/test_certs/ls.chain.p12 +0 -0
- data/spec/filters/fixtures/test_certs/ls.crt +28 -28
- data/spec/filters/fixtures/test_certs/ls.der.sha256 +1 -1
- data/spec/filters/fixtures/test_certs/ls.key +52 -51
- data/spec/filters/integration/elasticsearch_spec.rb +1 -9
- data/version +1 -0
- metadata +7 -9
- data/lib/logstash/filters/elasticsearch/patches/_elasticsearch_transport_http_manticore.rb +0 -44
- data/spec/filters/fixtures/elasticsearch_7.x_hits_total_as_object.json +0 -70
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 460b1e72f53335af42fd95c998fb8fe158a705beeaf60e53d199aa8b9c64ab6f
|
|
4
|
+
data.tar.gz: 1d031b1b9783a30d7d849c320dc0ca7fec747192ee6e6a818b5873eb7a678875
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 24c037f834fadb3d4c5f988d197f2bc3de60c657bc00be9d04ee97e979adcd18c8e99deefda37e836ab49976402b659e0cb6d71c4b2f1a0e01e0d7fc9703f0e3
|
|
7
|
+
data.tar.gz: 8bcf2cf0303eb4339b1ebdffeb01a2588c5826ec8178fdffd8d0fc755008f3fffbfa8edf31abc80c0e4078536f2c18d36e14919902ced4046d562f5ba9946b2d
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## 4.4.1
|
|
2
|
+
- Support Elastic Cloud API keys in the `api_key` option, which now accepts an `id:api_key` pair, its base64-encoded form, or an `essu_` Cloud API key, and rejects an unrecognized format at startup [#215](https://github.com/logstash-plugins/logstash-filter-elasticsearch/pull/215)
|
|
3
|
+
|
|
4
|
+
## 4.4.0
|
|
5
|
+
- Drop a support for Logstash 7.x by requiring `elasticsearch` gem >= 8. Logstash 8+ continues to work as before. [#213](https://github.com/logstash-plugins/logstash-filter-elasticsearch/pull/213)
|
|
6
|
+
|
|
1
7
|
## 4.3.1
|
|
2
8
|
- Added support for encoded and non encoded api-key formats on plugin configuration [#203](https://github.com/logstash-plugins/logstash-filter-elasticsearch/pull/203)
|
|
3
9
|
|
data/docs/index.asciidoc
CHANGED
|
@@ -307,8 +307,11 @@ Example:
|
|
|
307
307
|
Authenticate using Elasticsearch API key. Note that this option also requires
|
|
308
308
|
enabling the <<plugins-{type}s-{plugin}-ssl_enabled>> option.
|
|
309
309
|
|
|
310
|
-
|
|
311
|
-
Elasticsearch {ref}/security-api-create-api-key.html[Create API key API].
|
|
310
|
+
The format is `id:api_key`, where `id` and `api_key` are as returned by the
|
|
311
|
+
Elasticsearch {ref}/security-api-create-api-key.html[Create API key API]. The
|
|
312
|
+
base64-encoded form of that pair is also accepted, as is an
|
|
313
|
+
https://www.elastic.co/docs/deploy-manage/api-keys/elastic-cloud-api-keys[Elastic Cloud API key]
|
|
314
|
+
(prefixed with `essu_`), which is used as-is.
|
|
312
315
|
|
|
313
316
|
[id="plugins-{type}s-{plugin}-ca_trusted_fingerprint"]
|
|
314
317
|
===== `ca_trusted_fingerprint`
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
-
require "elasticsearch"
|
|
3
2
|
require "base64"
|
|
4
|
-
|
|
3
|
+
require "elasticsearch"
|
|
4
|
+
require "elastic/transport/transport/http/manticore"
|
|
5
5
|
|
|
6
6
|
module LogStash
|
|
7
7
|
module Filters
|
|
8
8
|
class ElasticsearchClient
|
|
9
9
|
|
|
10
10
|
attr_reader :client
|
|
11
|
-
attr_reader :es_transport_client_type
|
|
12
11
|
|
|
13
12
|
BUILD_FLAVOR_SERVERLESS = 'serverless'.freeze
|
|
14
13
|
DEFAULT_EAV_HEADER = { "Elastic-Api-Version" => "2023-10-31" }.freeze
|
|
@@ -44,7 +43,7 @@ module LogStash
|
|
|
44
43
|
|
|
45
44
|
client_options = {
|
|
46
45
|
hosts: hosts,
|
|
47
|
-
transport_class:
|
|
46
|
+
transport_class: ::Elastic::Transport::Transport::HTTP::Manticore,
|
|
48
47
|
transport_options: transport_options,
|
|
49
48
|
ssl: ssl_options,
|
|
50
49
|
retry_on_failure: options[:retry_on_failure],
|
|
@@ -103,29 +102,37 @@ module LogStash
|
|
|
103
102
|
def setup_api_key(api_key)
|
|
104
103
|
return {} unless (api_key&.value)
|
|
105
104
|
|
|
106
|
-
token =
|
|
105
|
+
token = resolve_api_key(api_key.value)
|
|
107
106
|
{ 'Authorization' => "ApiKey #{token}" }
|
|
108
107
|
end
|
|
109
108
|
|
|
109
|
+
# Resolves the `api_key` value into the credential used in the
|
|
110
|
+
# `Authorization: ApiKey` header. An already base64-encoded key and an
|
|
111
|
+
# Elastic Cloud API key are used as-is; a raw `id:api_key` pair is
|
|
112
|
+
# base64-encoded. An unrecognized value is rejected so a malformed key
|
|
113
|
+
# surfaces at startup rather than as a later authentication failure.
|
|
114
|
+
def resolve_api_key(key_value)
|
|
115
|
+
if base64?(key_value) || cloud_api_key?(key_value)
|
|
116
|
+
key_value
|
|
117
|
+
elsif key_value.match?(/\A[^:]+:[^:]+\z/)
|
|
118
|
+
Base64.strict_encode64(key_value)
|
|
119
|
+
else
|
|
120
|
+
raise LogStash::ConfigurationError, "Invalid api_key format. Expected a base64-encoded key, an 'id:api_key' pair, or a Cloud API key (essu_ prefix)."
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Elastic Cloud API keys (such as the unified Serverless keys) are opaque
|
|
125
|
+
# tokens prefixed with `essu_` that Elasticsearch accepts verbatim in the
|
|
126
|
+
# `Authorization: ApiKey` header, with no base64 encoding.
|
|
127
|
+
def cloud_api_key?(string)
|
|
128
|
+
string.match?(/\Aessu_.+/)
|
|
129
|
+
end
|
|
130
|
+
|
|
110
131
|
def base64?(string)
|
|
111
132
|
string == Base64.strict_encode64(Base64.strict_decode64(string))
|
|
112
133
|
rescue ArgumentError
|
|
113
134
|
false
|
|
114
135
|
end
|
|
115
|
-
|
|
116
|
-
def get_transport_client_class
|
|
117
|
-
# LS-core includes `elasticsearch` gem. The gem is composed of two separate gems: `elasticsearch-api` and `elasticsearch-transport`
|
|
118
|
-
# And now `elasticsearch-transport` is old, instead we have `elastic-transport`.
|
|
119
|
-
# LS-core updated `elasticsearch` > 8: https://github.com/elastic/logstash/pull/17161
|
|
120
|
-
# Following source bits are for the compatibility to support both `elasticsearch-transport` and `elastic-transport` gems
|
|
121
|
-
require "elasticsearch/transport/transport/http/manticore"
|
|
122
|
-
es_transport_client_type = "elasticsearch_transport"
|
|
123
|
-
::Elasticsearch::Transport::Transport::HTTP::Manticore
|
|
124
|
-
rescue ::LoadError
|
|
125
|
-
require "elastic/transport/transport/http/manticore"
|
|
126
|
-
es_transport_client_type = "elastic_transport"
|
|
127
|
-
::Elastic::Transport::Transport::HTTP::Manticore
|
|
128
|
-
end
|
|
129
136
|
end
|
|
130
137
|
end
|
|
131
138
|
end
|
|
@@ -72,7 +72,8 @@ class LogStash::Filters::Elasticsearch < LogStash::Filters::Base
|
|
|
72
72
|
config :cloud_auth, :validate => :password
|
|
73
73
|
|
|
74
74
|
# Authenticate using Elasticsearch API key.
|
|
75
|
-
#
|
|
75
|
+
# Format is either the `id:api_key` pair (as returned by https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html[Create API key]),
|
|
76
|
+
# its base64-encoded form, or an https://www.elastic.co/docs/deploy-manage/api-keys/elastic-cloud-api-keys[Elastic Cloud API key] (prefixed with `essu_`) can be used.
|
|
76
77
|
config :api_key, :validate => :password
|
|
77
78
|
|
|
78
79
|
# Set the address of a forward HTTP proxy.
|
|
@@ -209,9 +210,6 @@ class LogStash::Filters::Elasticsearch < LogStash::Filters::Base
|
|
|
209
210
|
test_connection!
|
|
210
211
|
validate_es_for_esql_support! if @query_type == "esql"
|
|
211
212
|
setup_serverless
|
|
212
|
-
if get_client.es_transport_client_type == "elasticsearch_transport"
|
|
213
|
-
require_relative "elasticsearch/patches/_elasticsearch_transport_http_manticore"
|
|
214
|
-
end
|
|
215
213
|
end # def register
|
|
216
214
|
|
|
217
215
|
def filter(event)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
|
|
3
3
|
s.name = 'logstash-filter-elasticsearch'
|
|
4
|
-
s.version = '
|
|
4
|
+
s.version = ::File.read('version').split("\n").first
|
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
|
6
6
|
s.summary = "Copies fields from previous log events in Elasticsearch to current events "
|
|
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"
|
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
|
|
|
11
11
|
s.require_paths = ["lib"]
|
|
12
12
|
|
|
13
13
|
# Files
|
|
14
|
-
s.files = Dir["lib/**/*","spec/**/*","*.gemspec","*.md","CONTRIBUTORS","Gemfile","LICENSE","NOTICE.TXT", "vendor/jar-dependencies/**/*.jar", "vendor/jar-dependencies/**/*.rb", "VERSION", "docs/**/*"]
|
|
14
|
+
s.files = Dir["lib/**/*","spec/**/*","*.gemspec","*.md","CONTRIBUTORS","Gemfile","LICENSE","NOTICE.TXT", "vendor/jar-dependencies/**/*.jar", "vendor/jar-dependencies/**/*.rb", "VERSION", "version", "docs/**/*"]
|
|
15
15
|
|
|
16
16
|
# Tests
|
|
17
17
|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
|
|
|
21
21
|
|
|
22
22
|
# Gem dependencies
|
|
23
23
|
s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
|
|
24
|
-
s.add_runtime_dependency 'elasticsearch',
|
|
24
|
+
s.add_runtime_dependency 'elasticsearch', '>= 8', '< 10'
|
|
25
25
|
s.add_runtime_dependency 'manticore', ">= 0.7.1"
|
|
26
26
|
s.add_runtime_dependency 'logstash-mixin-ecs_compatibility_support', '~> 1.3'
|
|
27
27
|
s.add_runtime_dependency 'logstash-mixin-ca_trusted_fingerprint_support', '~> 1.0'
|
|
@@ -58,11 +58,6 @@ describe LogStash::Filters::Elasticsearch::DslExecutor do
|
|
|
58
58
|
|
|
59
59
|
before(:each) do
|
|
60
60
|
allow(LogStash::Filters::ElasticsearchClient).to receive(:new).and_return(client)
|
|
61
|
-
if defined?(Elastic::Transport)
|
|
62
|
-
allow(client).to receive(:es_transport_client_type).and_return('elastic_transport')
|
|
63
|
-
else
|
|
64
|
-
allow(client).to receive(:es_transport_client_type).and_return('elasticsearch_transport')
|
|
65
|
-
end
|
|
66
61
|
allow(client).to receive(:search).and_return(response)
|
|
67
62
|
allow(plugin).to receive(:test_connection!)
|
|
68
63
|
allow(plugin).to receive(:setup_serverless)
|
|
@@ -123,26 +118,6 @@ describe LogStash::Filters::Elasticsearch::DslExecutor do
|
|
|
123
118
|
end
|
|
124
119
|
end
|
|
125
120
|
|
|
126
|
-
context 'when Elasticsearch 7.x gives us a totals object instead of an integer' do
|
|
127
|
-
let(:plugin_config) do
|
|
128
|
-
{
|
|
129
|
-
"hosts" => ["localhost:9200"],
|
|
130
|
-
"query" => "response: 404",
|
|
131
|
-
"fields" => { "response" => "code" },
|
|
132
|
-
"result_size" => 10
|
|
133
|
-
}
|
|
134
|
-
end
|
|
135
|
-
|
|
136
|
-
let(:response) do
|
|
137
|
-
LogStash::Json.load(File.read(File.join(File.dirname(__FILE__), "fixtures", "elasticsearch_7.x_hits_total_as_object.json")))
|
|
138
|
-
end
|
|
139
|
-
|
|
140
|
-
it "should enhance the current event with new data" do
|
|
141
|
-
plugin.filter(event)
|
|
142
|
-
expect(event.get("[@metadata][total_hits]")).to eq(13476)
|
|
143
|
-
end
|
|
144
|
-
end
|
|
145
|
-
|
|
146
121
|
context "if something wrong happen during connection" do
|
|
147
122
|
|
|
148
123
|
before(:each) do
|
|
@@ -307,11 +282,6 @@ describe LogStash::Filters::Elasticsearch::DslExecutor do
|
|
|
307
282
|
|
|
308
283
|
before do
|
|
309
284
|
allow(plugin).to receive(:get_client).and_return(client_double)
|
|
310
|
-
if defined?(Elastic::Transport)
|
|
311
|
-
allow(client_double).to receive(:es_transport_client_type).and_return('elastic_transport')
|
|
312
|
-
else
|
|
313
|
-
allow(client_double).to receive(:es_transport_client_type).and_return('elasticsearch_transport')
|
|
314
|
-
end
|
|
315
285
|
allow(client_double).to receive(:client).and_return(transport_double)
|
|
316
286
|
end
|
|
317
287
|
|
|
@@ -4,6 +4,7 @@ require "logstash/plugin"
|
|
|
4
4
|
require "logstash/filters/elasticsearch"
|
|
5
5
|
require "logstash/json"
|
|
6
6
|
require "cabin"
|
|
7
|
+
require "manticore"
|
|
7
8
|
require "webrick"
|
|
8
9
|
require "uri"
|
|
9
10
|
|
|
@@ -61,17 +62,9 @@ describe LogStash::Filters::Elasticsearch do
|
|
|
61
62
|
allow(filter_client).to receive(:serverless?).and_return(true)
|
|
62
63
|
allow(filter_client).to receive(:client).and_return(es_client)
|
|
63
64
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
:headers => LogStash::Filters::ElasticsearchClient::DEFAULT_EAV_HEADER))
|
|
68
|
-
.and_raise(Elastic::Transport::Transport::Errors::BadRequest.new)
|
|
69
|
-
else
|
|
70
|
-
allow(es_client).to receive(:info)
|
|
71
|
-
.with(a_hash_including(
|
|
72
|
-
:headers => LogStash::Filters::ElasticsearchClient::DEFAULT_EAV_HEADER))
|
|
73
|
-
.and_raise(Elasticsearch::Transport::Transport::Errors::BadRequest.new)
|
|
74
|
-
end
|
|
65
|
+
allow(es_client).to receive(:info)
|
|
66
|
+
.with(a_hash_including(:headers => LogStash::Filters::ElasticsearchClient::DEFAULT_EAV_HEADER))
|
|
67
|
+
.and_raise(Elastic::Transport::Transport::Errors::BadRequest.new)
|
|
75
68
|
end
|
|
76
69
|
|
|
77
70
|
it "raises an exception when Elastic Api Version is not supported" do
|
|
@@ -118,15 +111,15 @@ describe LogStash::Filters::Elasticsearch do
|
|
|
118
111
|
"cluster_name": "docker-cluster",
|
|
119
112
|
"cluster_uuid": "DyR1hN03QvuCWXRy3jtb0g",
|
|
120
113
|
"version": {
|
|
121
|
-
"number": "
|
|
114
|
+
"number": "8.0.0",
|
|
122
115
|
"build_flavor": "default",
|
|
123
116
|
"build_type": "docker",
|
|
124
117
|
"build_hash": "9a7758028e4ea59bcab41c12004603c5a7dd84a9",
|
|
125
118
|
"build_date": "2021-05-28T17:40:59.346932922Z",
|
|
126
119
|
"build_snapshot": false,
|
|
127
|
-
"lucene_version": "
|
|
128
|
-
"minimum_wire_compatibility_version": "
|
|
129
|
-
"minimum_index_compatibility_version": "
|
|
120
|
+
"lucene_version": "9.0.0",
|
|
121
|
+
"minimum_wire_compatibility_version": "7.17.0",
|
|
122
|
+
"minimum_index_compatibility_version": "7.0.0"
|
|
130
123
|
},
|
|
131
124
|
"tagline": "You Know, for Search"
|
|
132
125
|
}
|
|
@@ -187,17 +180,6 @@ describe LogStash::Filters::Elasticsearch do
|
|
|
187
180
|
end
|
|
188
181
|
let(:plugin) { described_class.new(config) }
|
|
189
182
|
let(:event) { LogStash::Event.new({}) }
|
|
190
|
-
|
|
191
|
-
# elasticsearch-ruby 7.17.9 initialize two user agent headers, `user-agent` and `User-Agent`
|
|
192
|
-
# hence, fail this header size test case
|
|
193
|
-
xit "client should sent the expect user-agent" do
|
|
194
|
-
plugin.register
|
|
195
|
-
|
|
196
|
-
request = webserver.wait_receive_request
|
|
197
|
-
|
|
198
|
-
expect(request.header['user-agent'].size).to eq(1)
|
|
199
|
-
expect(request.header['user-agent'][0]).to match(/logstash\/\d*\.\d*\.\d* \(OS=.*; JVM=.*\) logstash-filter-elasticsearch\/\d*\.\d*\.\d*/)
|
|
200
|
-
end
|
|
201
183
|
end
|
|
202
184
|
end
|
|
203
185
|
|
|
@@ -225,12 +207,7 @@ describe LogStash::Filters::Elasticsearch do
|
|
|
225
207
|
# this spec is a safeguard to trigger an assessment of thread-safety should
|
|
226
208
|
# we choose a different transport adapter in the future.
|
|
227
209
|
transport_class = extract_transport(client).options.fetch(:transport_class)
|
|
228
|
-
|
|
229
|
-
allow(client).to receive(:es_transport_client_type).and_return("elastic_transport")
|
|
230
|
-
expect(transport_class).to equal ::Elastic::Transport::Transport::HTTP::Manticore
|
|
231
|
-
else
|
|
232
|
-
expect(transport_class).to equal ::Elasticsearch::Transport::Transport::HTTP::Manticore
|
|
233
|
-
end
|
|
210
|
+
expect(transport_class).to equal ::Elastic::Transport::Transport::HTTP::Manticore
|
|
234
211
|
end
|
|
235
212
|
|
|
236
213
|
it 'uses a client with sufficient connection pool size' do
|
|
@@ -348,6 +325,31 @@ describe LogStash::Filters::Elasticsearch do
|
|
|
348
325
|
it_behaves_like "a plugin that sets the ApiKey authorization header"
|
|
349
326
|
end
|
|
350
327
|
|
|
328
|
+
context "with an Elastic Cloud API key (essu_ prefix)" do
|
|
329
|
+
# The suffix is intentionally not canonical base64: a Cloud key is opaque
|
|
330
|
+
# and must be forwarded verbatim regardless of its payload encoding.
|
|
331
|
+
let(:api_key_value) { "essu_VFZGblZreFhTekJ4ZDB4M2NHUnZRMEU2YzNWd1pYSnpaV055WlhRPQ==AAAAAAAA" }
|
|
332
|
+
|
|
333
|
+
it "sets the Authorization header verbatim without re-encoding" do
|
|
334
|
+
plugin.register
|
|
335
|
+
client = plugin.send(:get_client).client
|
|
336
|
+
auth_header = extract_transport(client).options[:transport_options][:headers]['Authorization']
|
|
337
|
+
|
|
338
|
+
expect(auth_header).to eql("ApiKey #{api_key_value}")
|
|
339
|
+
end
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
context "with an unrecognized api_key format" do
|
|
343
|
+
let(:api_key_value) { "not-a-valid-key" }
|
|
344
|
+
|
|
345
|
+
# `test_connection!` and `setup_serverless` are stubbed here, so the
|
|
346
|
+
# client is built explicitly, as in the other api_key examples.
|
|
347
|
+
it "fails to build a client with a configuration error" do
|
|
348
|
+
plugin.register
|
|
349
|
+
expect { plugin.send(:get_client) }.to raise_error(LogStash::ConfigurationError, /Invalid api_key format/)
|
|
350
|
+
end
|
|
351
|
+
end
|
|
352
|
+
|
|
351
353
|
context 'user also set' do
|
|
352
354
|
let(:config) { super().merge({ 'api_key' => 'foo:bar', 'user' => 'another' }) }
|
|
353
355
|
|
|
@@ -559,11 +561,6 @@ describe LogStash::Filters::Elasticsearch do
|
|
|
559
561
|
|
|
560
562
|
before(:each) do
|
|
561
563
|
allow(LogStash::Filters::ElasticsearchClient).to receive(:new).and_return(client)
|
|
562
|
-
if defined?(Elastic::Transport)
|
|
563
|
-
allow(client).to receive(:es_transport_client_type).and_return('elastic_transport')
|
|
564
|
-
else
|
|
565
|
-
allow(client).to receive(:es_transport_client_type).and_return('elasticsearch_transport')
|
|
566
|
-
end
|
|
567
564
|
allow(plugin).to receive(:test_connection!)
|
|
568
565
|
allow(plugin).to receive(:setup_serverless)
|
|
569
566
|
plugin.register
|
|
@@ -15,7 +15,7 @@ describe "SSL options" do
|
|
|
15
15
|
before do
|
|
16
16
|
allow(es_client_double).to receive(:close)
|
|
17
17
|
allow(es_client_double).to receive(:ping).with(any_args).and_return(double("pong").as_null_object)
|
|
18
|
-
allow(es_client_double).to receive(:info).with(any_args).and_return({"version" => {"number" => "
|
|
18
|
+
allow(es_client_double).to receive(:info).with(any_args).and_return({"version" => {"number" => "8.0.0", "build_flavor" => "default"},
|
|
19
19
|
"tagline" => "You Know, for Search"})
|
|
20
20
|
allow(Elasticsearch::Client).to receive(:new).and_return(es_client_double)
|
|
21
21
|
end
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
-----BEGIN CERTIFICATE-----
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
2
|
+
MIIFkzCCA3ugAwIBAgIUAjGJl4AQnrueLCvWZR5yN89tSHEwDQYJKoZIhvcNAQEL
|
|
3
|
+
BQAwUTELMAkGA1UEBhMCTFMxCzAJBgNVBAgMAk5BMRMwEQYDVQQHDApIdHRwIElu
|
|
4
|
+
cHV0MREwDwYDVQQKDAhMb2dzdGFzaDENMAsGA1UEAwwEcm9vdDAeFw0yNTEwMTcx
|
|
5
|
+
NDU0NTRaFw0zMDEwMTcxNDU0NT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