logstash-input-http 3.4.5-java → 3.6.0-java
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 +9 -0
- data/VERSION +1 -1
- data/docs/index.asciidoc +47 -14
- data/lib/logstash/inputs/http/tls.rb +2 -1
- data/lib/logstash/inputs/http.rb +62 -29
- data/lib/logstash-input-http_jars.rb +1 -1
- data/logstash-input-http.gemspec +1 -1
- data/spec/fixtures/certs/generate.sh +40 -0
- data/spec/fixtures/certs/generated/README.txt +2 -0
- data/spec/fixtures/certs/generated/client_from_root.crt +35 -0
- data/spec/fixtures/certs/generated/client_from_root.jks +0 -0
- data/spec/fixtures/certs/generated/client_from_root.key +51 -0
- data/spec/fixtures/certs/generated/client_from_root.key.pkcs8 +52 -0
- data/spec/fixtures/certs/generated/client_from_root.p12 +0 -0
- data/spec/fixtures/certs/generated/root.crt +32 -0
- data/spec/fixtures/certs/generated/root.key +51 -0
- data/spec/fixtures/certs/generated/root.key.pkcs8 +52 -0
- data/spec/fixtures/certs/generated/server_from_root.crt +37 -0
- data/spec/fixtures/certs/generated/server_from_root.key +51 -0
- data/spec/fixtures/certs/generated/server_from_root.key.pkcs8 +52 -0
- data/spec/fixtures/certs/openssl.cnf +47 -0
- data/spec/inputs/http_spec.rb +243 -29
- data/vendor/jar-dependencies/org/logstash/plugins/input/http/logstash-input-http/{3.4.5/logstash-input-http-3.4.5.jar → 3.6.0/logstash-input-http-3.6.0.jar} +0 -0
- metadata +31 -3
@@ -0,0 +1,52 @@
|
|
1
|
+
-----BEGIN PRIVATE KEY-----
|
2
|
+
MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQCwVfl113eqoUSL
|
3
|
+
cw0Xrp1H0UoRLrQoo4h88HtspnJwuTok2PiEIbhUebufzK0nF2ZybVJYiC0ZJJuS
|
4
|
+
qicMCm9VpznJVRNNT/a7gMcF4j0lYdT2Y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OlCbcAadiGQm409btL/rgIXm810OynMPthOttA9TI
|
45
|
+
pGB6dcwxF57RxPaO8RsyUF7Rmq35IXam7uG4Z9zR/owwvaXHV33WH+Om3KJAN2WK
|
46
|
+
rQKCAQEA7UXJ80kxH52DkxLXga24x0keFy3TG5XcC68HSphsdhpmdst/UBkVDujd
|
47
|
+
/mi/8sNeBigsxoCQcTJuD7gH+Z7KRRslgEeozzZYyZtrCBz4JgtEMGtwlup9vu4G
|
48
|
+
9/+TxhHQqQYr9cidLbHTGWg9iYMUp5PealTWKvgw5C7ZU07jrU3EdrO/UVxv9GNl
|
49
|
+
57ALerwKyXAHN7R/k/KrAZiVW+tGnkbNiYe54uoHo/PbnTVzMTVClwknx9yYWpPC
|
50
|
+
V+lAnmso4H0IPupFM6tU10MFB8tS7LECl4E0KboE3hMf0H8b7cwPurE3QUr3ppDD
|
51
|
+
2ovkeMh05cseiXfaeEaXgvoABDrwog==
|
52
|
+
-----END PRIVATE KEY-----
|
@@ -0,0 +1,47 @@
|
|
1
|
+
[ req ]
|
2
|
+
distinguished_name= req_distinguished_name
|
3
|
+
attributes= req_attributes
|
4
|
+
|
5
|
+
[ req_distinguished_name ]
|
6
|
+
countryName= Country Name (2 letter code)
|
7
|
+
countryName_min= 2
|
8
|
+
countryName_max= 2
|
9
|
+
stateOrProvinceName= State or Province Name (full name)
|
10
|
+
localityName= Locality Name (eg, city)
|
11
|
+
0.organizationName= Organization Name (eg, company)
|
12
|
+
organizationalUnitName= Organizational Unit Name (eg, section)
|
13
|
+
commonName= Common Name (eg, fully qualified host name)
|
14
|
+
commonName_max= 64
|
15
|
+
emailAddress= Email Address
|
16
|
+
emailAddress_max= 64
|
17
|
+
|
18
|
+
[ req_attributes ]
|
19
|
+
challengePassword= A challenge password
|
20
|
+
challengePassword_min= 4
|
21
|
+
challengePassword_max= 20
|
22
|
+
|
23
|
+
[ ca ]
|
24
|
+
subjectKeyIdentifier = hash
|
25
|
+
authorityKeyIdentifier = keyid:always,issuer
|
26
|
+
basicConstraints = critical, CA:true
|
27
|
+
keyUsage = critical, digitalSignature, cRLSign, keyCertSign
|
28
|
+
|
29
|
+
[ client_cert ]
|
30
|
+
basicConstraints = CA:FALSE
|
31
|
+
nsCertType = client, email
|
32
|
+
nsComment = "OpenSSL Generated Client Certificate"
|
33
|
+
subjectKeyIdentifier = hash
|
34
|
+
authorityKeyIdentifier = keyid,issuer
|
35
|
+
keyUsage = critical, nonRepudiation, digitalSignature, keyEncipherment
|
36
|
+
extendedKeyUsage = clientAuth, emailProtection
|
37
|
+
subjectAltName = "DNS:localhost, IP:127.0.0.1"
|
38
|
+
|
39
|
+
[ server_cert ]
|
40
|
+
basicConstraints = CA:FALSE
|
41
|
+
nsCertType = server
|
42
|
+
nsComment = "OpenSSL Generated Server Certificate"
|
43
|
+
subjectKeyIdentifier = hash
|
44
|
+
authorityKeyIdentifier = keyid,issuer:always
|
45
|
+
keyUsage = critical, digitalSignature, keyEncipherment
|
46
|
+
extendedKeyUsage = serverAuth
|
47
|
+
subjectAltName = "DNS:localhost, IP:127.0.0.1"
|
data/spec/inputs/http_spec.rb
CHANGED
@@ -20,6 +20,11 @@ describe LogStash::Inputs::Http do
|
|
20
20
|
let(:client_options) { { } }
|
21
21
|
let(:logstash_queue) { Queue.new }
|
22
22
|
let(:port) { rand(5000) + 1025 }
|
23
|
+
let(:url) { "http://127.0.0.1:#{port}" }
|
24
|
+
|
25
|
+
let(:config) { { "port" => port } }
|
26
|
+
|
27
|
+
subject { described_class.new(config) }
|
23
28
|
|
24
29
|
it_behaves_like "an interruptible input plugin" do
|
25
30
|
let(:config) { { "port" => port } }
|
@@ -32,7 +37,6 @@ describe LogStash::Inputs::Http do
|
|
32
37
|
end
|
33
38
|
|
34
39
|
describe "request handling" do
|
35
|
-
subject { LogStash::Inputs::Http.new("port" => port) }
|
36
40
|
|
37
41
|
before :each do
|
38
42
|
setup_server_client
|
@@ -49,7 +53,7 @@ describe LogStash::Inputs::Http do
|
|
49
53
|
"socket_timeout" => 0.1
|
50
54
|
} }
|
51
55
|
|
52
|
-
|
56
|
+
let(:config) { { "port" => port, "threads" => threads, "max_pending_requests" => max_pending_requests } }
|
53
57
|
|
54
58
|
context "when sending more requests than queue slots" do
|
55
59
|
it "should block when the queue is full" do
|
@@ -74,7 +78,7 @@ describe LogStash::Inputs::Http do
|
|
74
78
|
end
|
75
79
|
|
76
80
|
context "with default codec" do
|
77
|
-
|
81
|
+
|
78
82
|
context "when receiving a text/plain request" do
|
79
83
|
it "should process the request normally" do
|
80
84
|
client.post("http://127.0.0.1:#{port}/meh.json",
|
@@ -84,6 +88,7 @@ describe LogStash::Inputs::Http do
|
|
84
88
|
expect(event.get("message")).to eq("hello")
|
85
89
|
end
|
86
90
|
end
|
91
|
+
|
87
92
|
context "when receiving a deflate compressed text/plain request" do
|
88
93
|
it "should process the request normally" do
|
89
94
|
client.post("http://127.0.0.1:#{port}/meh.json",
|
@@ -93,16 +98,18 @@ describe LogStash::Inputs::Http do
|
|
93
98
|
expect(event.get("message")).to eq("hello")
|
94
99
|
end
|
95
100
|
end
|
101
|
+
|
96
102
|
context "when receiving a deflate text/plain request that cannot be decompressed" do
|
97
103
|
let(:response) do
|
98
|
-
|
99
|
-
|
100
|
-
|
104
|
+
client.post("http://127.0.0.1:#{port}/meh.json",
|
105
|
+
:headers => { "content-type" => "text/plain", "content-encoding" => "deflate" },
|
106
|
+
:body => "hello").call
|
101
107
|
end
|
102
108
|
it "should respond with 400" do
|
103
109
|
expect(response.code).to eq(400)
|
104
110
|
end
|
105
111
|
end
|
112
|
+
|
106
113
|
context "when receiving a gzip compressed text/plain request" do
|
107
114
|
it "should process the request normally" do
|
108
115
|
wio = StringIO.new("w")
|
@@ -118,6 +125,7 @@ describe LogStash::Inputs::Http do
|
|
118
125
|
expect(event.get("message")).to eq("hello")
|
119
126
|
end
|
120
127
|
end
|
128
|
+
|
121
129
|
context "when receiving a gzip text/plain request that cannot be decompressed" do
|
122
130
|
let(:response) do
|
123
131
|
client.post("http://127.0.0.1:#{port}",
|
@@ -128,6 +136,7 @@ describe LogStash::Inputs::Http do
|
|
128
136
|
expect(response.code).to eq(400)
|
129
137
|
end
|
130
138
|
end
|
139
|
+
|
131
140
|
context "when receiving an application/json request" do
|
132
141
|
it "should parse the json body" do
|
133
142
|
client.post("http://127.0.0.1:#{port}/meh.json",
|
@@ -140,16 +149,108 @@ describe LogStash::Inputs::Http do
|
|
140
149
|
end
|
141
150
|
|
142
151
|
context "with json codec" do
|
143
|
-
|
152
|
+
let(:config) { super().merge("codec" => "json") }
|
153
|
+
let(:url) { "http://127.0.0.1:#{port}/meh.json" }
|
154
|
+
let(:response) do
|
155
|
+
client.post(url, :body => { "message" => "Hello" }.to_json).call
|
156
|
+
end
|
157
|
+
|
144
158
|
it "should parse the json body" do
|
145
|
-
response
|
159
|
+
expect(response.code).to eq(200)
|
146
160
|
event = logstash_queue.pop
|
147
161
|
expect(event.get("message")).to eq("Hello")
|
148
162
|
end
|
163
|
+
|
164
|
+
context 'with ssl' do
|
165
|
+
|
166
|
+
let(:url) { super().sub('http://', 'https://') }
|
167
|
+
|
168
|
+
certs_dir = File.expand_path('../fixtures/certs/generated', File.dirname(__FILE__))
|
169
|
+
|
170
|
+
let(:config) do
|
171
|
+
super().merge 'ssl' => true,
|
172
|
+
'ssl_certificate_authorities' => [ File.join(certs_dir, 'root.crt') ],
|
173
|
+
'ssl_certificate' => File.join(certs_dir, 'server_from_root.crt'),
|
174
|
+
'ssl_key' => File.join(certs_dir, 'server_from_root.key.pkcs8'),
|
175
|
+
'ssl_verify_mode' => 'peer'
|
176
|
+
end
|
177
|
+
|
178
|
+
let(:client_options) do
|
179
|
+
super().merge ssl: {
|
180
|
+
verify: false,
|
181
|
+
ca_file: File.join(certs_dir, 'root.crt'),
|
182
|
+
client_cert: File.join(certs_dir, 'client_from_root.crt'),
|
183
|
+
client_key: File.join(certs_dir, 'client_from_root.key.pkcs8'),
|
184
|
+
}
|
185
|
+
end
|
186
|
+
|
187
|
+
it "should parse the json body" do
|
188
|
+
# [DEBUG][io.netty.handler.ssl.SslHandler] [id: 0xcaf869ff, L:/127.0.0.1:5610 - R:/127.0.0.1:32890] HANDSHAKEN: protocol:TLSv1.2 cipher suite:TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
|
189
|
+
# [DEBUG][org.apache.http.conn.ssl.SSLConnectionSocketFactory] Secure session established
|
190
|
+
# [DEBUG][org.apache.http.conn.ssl.SSLConnectionSocketFactory] negotiated protocol: TLSv1.2
|
191
|
+
# [DEBUG][org.apache.http.conn.ssl.SSLConnectionSocketFactory] negotiated cipher suite: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
|
192
|
+
expect(response.code).to eq(200)
|
193
|
+
event = logstash_queue.pop
|
194
|
+
expect(event.get("message")).to eq("Hello")
|
195
|
+
end
|
196
|
+
|
197
|
+
TLS13_ENABLED_BY_DEFAULT = begin
|
198
|
+
context = javax.net.ssl.SSLContext.getInstance('TLS')
|
199
|
+
context.init nil, nil, nil
|
200
|
+
context.getDefaultSSLParameters.getProtocols.include? 'TLSv1.3'
|
201
|
+
rescue => e
|
202
|
+
warn "failed to detect TLSv1.3 support: #{e.inspect}"
|
203
|
+
nil
|
204
|
+
end
|
205
|
+
|
206
|
+
context 'with TLSv1.3 client' do
|
207
|
+
|
208
|
+
let(:client_options) do
|
209
|
+
super().tap do |opts|
|
210
|
+
opts.fetch(:ssl).merge! protocols: ['TLSv1.3']
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
it "should parse the json body" do
|
215
|
+
expect(response.code).to eq(200)
|
216
|
+
event = logstash_queue.pop
|
217
|
+
expect(event.get("message")).to eq("Hello")
|
218
|
+
end
|
219
|
+
|
220
|
+
context 'enforced TLSv1.3 in plugin' do
|
221
|
+
|
222
|
+
let(:config) { super().merge 'ssl_supported_protocols' => ['TLSv1.3'],
|
223
|
+
'ssl_cipher_suites' => [ 'TLS_AES_128_GCM_SHA256' ] }
|
224
|
+
|
225
|
+
it "should parse the json body" do
|
226
|
+
expect(response.code).to eq(200)
|
227
|
+
event = logstash_queue.pop
|
228
|
+
expect(event.get("message")).to eq("Hello")
|
229
|
+
end
|
230
|
+
|
231
|
+
end
|
232
|
+
|
233
|
+
context 'enforced TLSv1.3 (deprecated options)' do
|
234
|
+
|
235
|
+
let(:config) { super().merge 'tls_min_version' => 1.3,
|
236
|
+
'cipher_suites' => [ 'TLS_AES_128_GCM_SHA256' ] }
|
237
|
+
|
238
|
+
it "should parse the json body" do
|
239
|
+
expect(response.code).to eq(200)
|
240
|
+
event = logstash_queue.pop
|
241
|
+
expect(event.get("message")).to eq("Hello")
|
242
|
+
end
|
243
|
+
|
244
|
+
end
|
245
|
+
|
246
|
+
end if TLS13_ENABLED_BY_DEFAULT
|
247
|
+
|
248
|
+
end
|
249
|
+
|
149
250
|
end
|
150
251
|
|
151
252
|
context "with json_lines codec without final delimiter" do
|
152
|
-
|
253
|
+
let(:config) { super().merge("codec" => "json_lines") }
|
153
254
|
let(:line1) { '{"foo": 1}' }
|
154
255
|
let(:line2) { '{"foo": 2}' }
|
155
256
|
it "should parse all json_lines in body including last one" do
|
@@ -169,7 +270,7 @@ describe LogStash::Inputs::Http do
|
|
169
270
|
body = { "message" => "Hello" }.to_json
|
170
271
|
client.post("http://127.0.0.1:#{port}/meh.json",
|
171
272
|
:headers => { "content-type" => "application/json" },
|
172
|
-
|
273
|
+
:body => body).call
|
173
274
|
event = logstash_queue.pop
|
174
275
|
expect(event.get("message")).to eq(body)
|
175
276
|
end
|
@@ -388,15 +489,18 @@ describe LogStash::Inputs::Http do
|
|
388
489
|
end
|
389
490
|
|
390
491
|
# wait until server is ready
|
391
|
-
def setup_server_client
|
492
|
+
def setup_server_client(url = self.url)
|
392
493
|
subject.register
|
393
|
-
t = Thread.
|
494
|
+
t = Thread.start { subject.run(logstash_queue) }
|
394
495
|
ok = false
|
395
496
|
until ok
|
396
497
|
begin
|
397
|
-
client.post(
|
398
|
-
rescue => e
|
399
|
-
#
|
498
|
+
client.post(url, :body => '{}').call
|
499
|
+
rescue Manticore::SocketException => e
|
500
|
+
puts "retry client.post due #{e}" if $VERBOSE
|
501
|
+
rescue Manticore::ManticoreException => e
|
502
|
+
warn e.inspect
|
503
|
+
raise e.cause ? e.cause : e
|
400
504
|
else
|
401
505
|
ok = true
|
402
506
|
end
|
@@ -447,6 +551,12 @@ describe LogStash::Inputs::Http do
|
|
447
551
|
expect { subject.register }.to raise_exception(LogStash::ConfigurationError)
|
448
552
|
end
|
449
553
|
end
|
554
|
+
context "with invalid cipher suites" do
|
555
|
+
it "should raise a configuration error" do
|
556
|
+
invalid_config = config.merge("ssl_cipher_suites" => "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA38")
|
557
|
+
expect { LogStash::Inputs::Http.new(invalid_config) }.to raise_error(LogStash::ConfigurationError)
|
558
|
+
end
|
559
|
+
end
|
450
560
|
context "with :ssl_certificate" do
|
451
561
|
let(:ssc) { SelfSignedCertificate.new }
|
452
562
|
let(:ssl_certificate) { ssc.certificate }
|
@@ -505,18 +615,6 @@ describe LogStash::Inputs::Http do
|
|
505
615
|
end
|
506
616
|
end
|
507
617
|
|
508
|
-
context "with invalid cipher_suites" do
|
509
|
-
let(:config) { super().merge("cipher_suites" => "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA38") }
|
510
|
-
|
511
|
-
it "should raise a configuration error" do
|
512
|
-
expect( subject.logger ).to receive(:error) do |msg, opts|
|
513
|
-
expect( msg ).to match /.*?configuration invalid/
|
514
|
-
expect( opts[:message] ).to match /TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA38.*? not available/
|
515
|
-
end
|
516
|
-
expect { subject.register }.to raise_error(LogStash::ConfigurationError)
|
517
|
-
end
|
518
|
-
end
|
519
|
-
|
520
618
|
context "with invalid ssl certificate" do
|
521
619
|
before do
|
522
620
|
cert = File.readlines path = config["ssl_certificate"]
|
@@ -548,8 +646,7 @@ describe LogStash::Inputs::Http do
|
|
548
646
|
|
549
647
|
context "with invalid ssl certificate_authorities" do
|
550
648
|
let(:config) do
|
551
|
-
super().merge("ssl_verify_mode" => "peer",
|
552
|
-
"ssl_certificate_authorities" => [ ssc.certificate.path, ssc.private_key.path ])
|
649
|
+
super().merge("ssl_verify_mode" => "peer", "ssl_certificate_authorities" => [ ssc.certificate.path, ssc.private_key.path ])
|
553
650
|
end
|
554
651
|
|
555
652
|
it "should raise a cert error" do
|
@@ -565,6 +662,123 @@ describe LogStash::Inputs::Http do
|
|
565
662
|
end
|
566
663
|
end
|
567
664
|
|
665
|
+
context "with both verify_mode options set" do
|
666
|
+
let(:config) do
|
667
|
+
super().merge('ssl_verify_mode' => 'peer', 'verify_mode' => 'none')
|
668
|
+
end
|
669
|
+
|
670
|
+
it "should raise a configuration error" do
|
671
|
+
expect { subject.register }.to raise_error LogStash::ConfigurationError, /Use only .?ssl_verify_mode.?/i
|
672
|
+
end
|
673
|
+
end
|
674
|
+
|
675
|
+
context "with ssl_cipher_suites and cipher_suites set" do
|
676
|
+
let(:config) do
|
677
|
+
super().merge('ssl_cipher_suites' => ['TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384'],
|
678
|
+
'cipher_suites' => ['TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384'])
|
679
|
+
end
|
680
|
+
|
681
|
+
it "should raise a configuration error" do
|
682
|
+
expect { subject.register }.to raise_error LogStash::ConfigurationError, /Use only .?ssl_cipher_suites.?/i
|
683
|
+
end
|
684
|
+
end
|
685
|
+
|
686
|
+
context "with ssl_supported_protocols and tls_min_version set" do
|
687
|
+
let(:config) do
|
688
|
+
super().merge('ssl_supported_protocols' => ['TLSv1.2'], 'tls_min_version' => 1.0)
|
689
|
+
end
|
690
|
+
|
691
|
+
it "should raise a configuration error" do
|
692
|
+
expect { subject.register }.to raise_error LogStash::ConfigurationError, /Use only .?ssl_supported_protocols.?/i
|
693
|
+
end
|
694
|
+
end
|
695
|
+
|
696
|
+
context "with ssl_supported_protocols and tls_max_version set" do
|
697
|
+
let(:config) do
|
698
|
+
super().merge('ssl_supported_protocols' => ['TLSv1.2'], 'tls_max_version' => 1.2)
|
699
|
+
end
|
700
|
+
|
701
|
+
it "should raise a configuration error" do
|
702
|
+
expect { subject.register }.to raise_error LogStash::ConfigurationError, /Use only .?ssl_supported_protocols.?/i
|
703
|
+
end
|
704
|
+
end
|
705
|
+
|
706
|
+
end
|
707
|
+
end
|
708
|
+
end
|
709
|
+
|
710
|
+
# If we have a setting called `pipeline.ecs_compatibility`, we need to
|
711
|
+
# ensure that our additional_codecs are instantiated with the proper
|
712
|
+
# execution context in order to ensure that the pipeline setting is
|
713
|
+
# respected.
|
714
|
+
if LogStash::SETTINGS.registered?('pipeline.ecs_compatibility')
|
715
|
+
|
716
|
+
def setting_value_supported?(name, value)
|
717
|
+
setting = ::LogStash::SETTINGS.clone.get_setting(name)
|
718
|
+
setting.set(value)
|
719
|
+
setting.validate_value
|
720
|
+
true
|
721
|
+
rescue
|
722
|
+
false
|
723
|
+
end
|
724
|
+
|
725
|
+
describe LogStash::Inputs::Http do
|
726
|
+
context 'additional_codecs' do
|
727
|
+
let(:port) { rand(1025...5000) }
|
728
|
+
|
729
|
+
%w(disabled v1 v8).each do |spec|
|
730
|
+
if setting_value_supported?('pipeline.ecs_compatibility', spec)
|
731
|
+
context "with `pipeline.ecs_compatibility: #{spec}`" do
|
732
|
+
# Override DevUtils's `new_pipeline` default to inject pipeline settings that
|
733
|
+
# are different than our global settings, so that we can validate the condition
|
734
|
+
# where pipeline settings override global settings.
|
735
|
+
def new_pipeline(config_parts, pipeline_id = :main, settings = pipeline_settings)
|
736
|
+
super(config_parts, pipeline_id, settings)
|
737
|
+
end
|
738
|
+
|
739
|
+
let(:pipeline_settings) do
|
740
|
+
::LogStash::SETTINGS.clone.tap do |s|
|
741
|
+
s.set('pipeline.ecs_compatibility', spec)
|
742
|
+
end
|
743
|
+
end
|
744
|
+
|
745
|
+
it 'propagates the ecs_compatibility pipeline setting to the additional_codecs' do
|
746
|
+
# Ensure plugins pick up pipeline-level setting over the global default.
|
747
|
+
aggregate_failures('precondition') do
|
748
|
+
expect(::LogStash::SETTINGS).to_not be_set('pipeline.ecs_compatibility')
|
749
|
+
expect(pipeline_settings).to be_set('pipeline.ecs_compatibility')
|
750
|
+
end
|
751
|
+
|
752
|
+
input("input { http { port => #{port} additional_codecs => { 'application/json' => 'json' 'text/plain' => 'plain' } } }") do |pipeline, queue|
|
753
|
+
http_input = pipeline.inputs.first
|
754
|
+
aggregate_failures('initialization precondition') do
|
755
|
+
expect(http_input).to be_a_kind_of(described_class)
|
756
|
+
expect(http_input.execution_context&.pipeline&.settings&.to_hash).to eq(pipeline_settings.to_hash)
|
757
|
+
end
|
758
|
+
|
759
|
+
http_input.codecs.each do |key, value|
|
760
|
+
aggregate_failures("Codec for `#{key}`") do
|
761
|
+
expect(value.ecs_compatibility).to eq(spec.to_sym)
|
762
|
+
end
|
763
|
+
end
|
764
|
+
end
|
765
|
+
end
|
766
|
+
end
|
767
|
+
end
|
768
|
+
end
|
769
|
+
|
770
|
+
it 'propagates the execution context from the input to the codecs' do
|
771
|
+
input("input { http { port => #{port} } }") do |pipeline, queue|
|
772
|
+
http_input = pipeline.inputs.first
|
773
|
+
expect(http_input).to be_a_kind_of(described_class) # precondition
|
774
|
+
|
775
|
+
http_input.codecs.each do |key, value|
|
776
|
+
aggregate_failures("Codec for `#{key}`") do
|
777
|
+
expect(value.execution_context).to be http_input.execution_context
|
778
|
+
end
|
779
|
+
end
|
780
|
+
end
|
781
|
+
end
|
568
782
|
end
|
569
783
|
end
|
570
784
|
end
|