logstash-output-http 5.6.1 → 5.7.1

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: 23e48e61a55be36ec256a7a4449f2aaf555f56253f3bb15d67e250e03cd39bf9
4
- data.tar.gz: b61f7df593739a7ba2d892c62e29952c514d9274a5219c321bd6c96b09d33adb
3
+ metadata.gz: 4ee250c7e18f8f86d45a9976fdad992c6b329d862c153c1ee786032bb1fca022
4
+ data.tar.gz: 346c7c1027d694bb03288a271a72bdde0f8f1d37a162dd2b2f6b6e8073e45f37
5
5
  SHA512:
6
- metadata.gz: a331795a25242f9f82c11746e6a3ecb619c18917dc91b77fb1f6ef8060a5ceb91d5effbfd171eeaac67ed8e7c12ad93ca3230ed279828ff8396dad71bd935882
7
- data.tar.gz: 0fb511bb512aecf1caf602c44ed755c4be7c0c5a4781c651623dcaba5fc633f253611a7dd7bd25be2d1a66d52730ceb3e7e56ac031dfa8b093896f3e0bae63fc
6
+ metadata.gz: 889fc141a67c6eddc1dc35f87da3fde5fcc56c5f294662a370bcc401a8a7848937ad5e1c912d1234ae68f1de3779bab2648e8588249c6f3e6ef6087dbf5c0a34
7
+ data.tar.gz: d6ef06b950a4763025625ca3dc9e8c09bd086f50a42d0bce35f0de64ab445cac4a3e54980343374a69ab615fdc1940a7df4b57e9077c3ddcc956213e11476bdb
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 5.7.1
2
+ - Added new development `rackup` dependency to fix tests
3
+
4
+ ## 5.7.0
5
+ - Added new `ssl_enabled` setting for enabling/disabling the SSL configurations [#144](https://github.com/logstash-plugins/logstash-output-http/pull/144)
6
+
1
7
  ## 5.6.1
2
8
  - Added body logging for non 2xx responses [#142](https://github.com/logstash-plugins/logstash-output-http/pull/142)
3
9
 
data/docs/index.asciidoc CHANGED
@@ -103,6 +103,7 @@ This plugin supports the following configuration options plus the <<plugins-{typ
103
103
  | <<plugins-{type}s-{plugin}-ssl_certificate>> |<<path,path>>|No
104
104
  | <<plugins-{type}s-{plugin}-ssl_certificate_authorities>> |list of <<path,path>>|No
105
105
  | <<plugins-{type}s-{plugin}-ssl_cipher_suites>> |list of <<string,string>>|No
106
+ | <<plugins-{type}s-{plugin}-ssl_enabled>> |<<boolean,boolean>>|No
106
107
  | <<plugins-{type}s-{plugin}-ssl_keystore_password>> |<<password,password>>|No
107
108
  | <<plugins-{type}s-{plugin}-ssl_keystore_path>> |<<path,path>>|No
108
109
  | <<plugins-{type}s-{plugin}-ssl_keystore_type>> |<<string,string>>|No
@@ -420,6 +421,15 @@ The .cer or .pem CA files to validate the server's certificate.
420
421
  The list of cipher suites to use, listed by priorities.
421
422
  Supported cipher suites vary depending on the Java and protocol versions.
422
423
 
424
+ [id="plugins-{type}s-{plugin}-ssl_enabled"]
425
+ ===== `ssl_enabled`
426
+
427
+ * Value type is <<boolean,boolean>>
428
+ * Default value is `true`
429
+
430
+ Enable SSL/TLS secured communication. It must be `true` for other `ssl_` options
431
+ to take effect.
432
+
423
433
  [id="plugins-{type}s-{plugin}-ssl_key"]
424
434
  ===== `ssl_key`
425
435
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-http'
3
- s.version = '5.6.1'
3
+ s.version = '5.7.1'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = "Sends events to a generic HTTP or HTTPS endpoint"
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"
@@ -20,9 +20,12 @@ Gem::Specification.new do |s|
20
20
 
21
21
  # Gem dependencies
22
22
  s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
23
- s.add_runtime_dependency "logstash-mixin-http_client", ">= 7.3.0", "< 8.0.0"
23
+ s.add_runtime_dependency "logstash-mixin-http_client", ">= 7.4.0", "< 8.0.0"
24
24
 
25
25
  s.add_development_dependency 'logstash-devutils'
26
26
  s.add_development_dependency 'sinatra'
27
27
  s.add_development_dependency 'webrick'
28
+
29
+ # Pin to avoid using new Fiber-based implementation that breaks tests here
30
+ s.add_development_dependency 'rackup', "< 2.1.0"
28
31
  end
@@ -255,7 +255,7 @@ describe LogStash::Outputs::Http do
255
255
  end
256
256
 
257
257
  let(:last_request) { TestApp.last_request }
258
- let(:body) { last_request.body.read }
258
+ let(:body) { read_last_request_body(last_request) }
259
259
  let(:content_type) { last_request.env["CONTENT_TYPE"] }
260
260
 
261
261
  it "should receive the request" do
@@ -304,7 +304,7 @@ describe LogStash::Outputs::Http do
304
304
  let(:config) {
305
305
  base_config.merge({"url" => url, "http_method" => "post", "pool_max" => 1})
306
306
  }
307
- let(:expected_body) { LogStash::Json.dump(event) }
307
+ let(:expected_body) { event.to_json }
308
308
  let(:expected_content_type) { "application/json" }
309
309
 
310
310
  include_examples("a received event")
@@ -458,7 +458,7 @@ RSpec.describe LogStash::Outputs::Http do # different block as we're starting we
458
458
  after { subject.close }
459
459
 
460
460
  let(:last_request) { TestApp.last_request }
461
- let(:last_request_body) { last_request.body.read }
461
+ let(:last_request_body) { read_last_request_body(last_request) }
462
462
 
463
463
  let(:event) { LogStash::Event.new("message" => "hello!") }
464
464
 
@@ -530,3 +530,10 @@ RSpec.describe LogStash::Outputs::Http do # different block as we're starting we
530
530
  end if tls_version_enabled_by_default?('TLSv1.3') && JOpenSSL::VERSION > '0.12' # due WEBrick uses OpenSSL
531
531
 
532
532
  end
533
+
534
+ # Pre-emptively rewind the retrieval of `last_request.body` - for form based endpoints, the body
535
+ # is placed in params, and body is empty, requiring a `rewind` for the body to be available for comparison
536
+ def read_last_request_body(last_request)
537
+ last_request.body.rewind
538
+ last_request.body.read
539
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.6.1
4
+ version: 5.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-04 00:00:00.000000000 Z
11
+ date: 2024-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -20,8 +20,8 @@ dependencies:
20
20
  - !ruby/object:Gem::Version
21
21
  version: '2.99'
22
22
  name: logstash-core-plugin-api
23
- prerelease: false
24
23
  type: :runtime
24
+ prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
@@ -35,18 +35,18 @@ dependencies:
35
35
  requirements:
36
36
  - - ">="
37
37
  - !ruby/object:Gem::Version
38
- version: 7.3.0
38
+ version: 7.4.0
39
39
  - - "<"
40
40
  - !ruby/object:Gem::Version
41
41
  version: 8.0.0
42
42
  name: logstash-mixin-http_client
43
- prerelease: false
44
43
  type: :runtime
44
+ prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: 7.3.0
49
+ version: 7.4.0
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
52
  version: 8.0.0
@@ -57,8 +57,8 @@ dependencies:
57
57
  - !ruby/object:Gem::Version
58
58
  version: '0'
59
59
  name: logstash-devutils
60
- prerelease: false
61
60
  type: :development
61
+ prerelease: false
62
62
  version_requirements: !ruby/object:Gem::Requirement
63
63
  requirements:
64
64
  - - ">="
@@ -71,8 +71,8 @@ dependencies:
71
71
  - !ruby/object:Gem::Version
72
72
  version: '0'
73
73
  name: sinatra
74
- prerelease: false
75
74
  type: :development
75
+ prerelease: false
76
76
  version_requirements: !ruby/object:Gem::Requirement
77
77
  requirements:
78
78
  - - ">="
@@ -85,13 +85,27 @@ dependencies:
85
85
  - !ruby/object:Gem::Version
86
86
  version: '0'
87
87
  name: webrick
88
- prerelease: false
89
88
  type: :development
89
+ prerelease: false
90
90
  version_requirements: !ruby/object:Gem::Requirement
91
91
  requirements:
92
92
  - - ">="
93
93
  - !ruby/object:Gem::Version
94
94
  version: '0'
95
+ - !ruby/object:Gem::Dependency
96
+ requirement: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - "<"
99
+ - !ruby/object:Gem::Version
100
+ version: 2.1.0
101
+ name: rackup
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - "<"
107
+ - !ruby/object:Gem::Version
108
+ version: 2.1.0
95
109
  description: This gem is a Logstash plugin required to be installed on top of the
96
110
  Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This
97
111
  gem is not a stand-alone program
@@ -133,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
147
  - !ruby/object:Gem::Version
134
148
  version: '0'
135
149
  requirements: []
136
- rubygems_version: 3.2.33
150
+ rubygems_version: 3.3.26
137
151
  signing_key:
138
152
  specification_version: 4
139
153
  summary: Sends events to a generic HTTP or HTTPS endpoint