logstash-output-http 5.6.0 → 5.7.0

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: 652d47afcc760258e4dd50ff4ecc7c5418e0e8b70a07e72e23e8c62bde080158
4
- data.tar.gz: 38ecc6f8941d7e6690967d8601a39d43f365add3df4a5be3d553b5db3427ba44
3
+ metadata.gz: ea9e1064040e6d7b09ea61a4f77de09bd1a56186d824ec6c26b870c2ac466975
4
+ data.tar.gz: b1ae025edddfc791309aeb4edd7a0a93a2b961358b73484b83625ad029cfceb7
5
5
  SHA512:
6
- metadata.gz: a1f800d614b94d7c86fd1b00a3334c444ece5b44ac47937789d400ec033705b816f05c2f2f0a8f204a1badb0b7c1e885f4ce54be8a1ce89377a9d2ab526c74aa
7
- data.tar.gz: 047f61872bf497e485658acf016d55af655bbdaa3a04a5e521036a20e8b50ccb2ef5a89699d7879aa387030b0d6f1efcb08fc4ed69f92cb97f419a66aa15cb69
6
+ metadata.gz: 2594c607190fcf16a6c6793a19ee2c14bab9d787f688f567ec1ec0a06669a771d7213e0189e5675ef211e9bc0d313b728a0cc613817bc2af554ea6ad04b4d554
7
+ data.tar.gz: 74ae9117f75b81e93e706d2acefe4c8e42d15139521aa4cf5310a21a7a9f4756763fbfa242de552cc222ed0550a03501489c55ccc56a16e0c71658c5d8c9e66e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 5.7.0
2
+ - Added new `ssl_enabled` setting for enabling/disabling the SSL configurations [#144](https://github.com/logstash-plugins/logstash-output-http/pull/144)
3
+
4
+ ## 5.6.1
5
+ - Added body logging for non 2xx responses [#142](https://github.com/logstash-plugins/logstash-output-http/pull/142)
6
+
1
7
  ## 5.6.0
2
8
  - Added standardized SSL settings and deprecates their non-standard counterparts. Deprecated settings will continue to work, and will provide pipeline maintainers with guidance toward using their standardized counterparts [#140](https://github.com/logstash-plugins/logstash-output-http/pull/140)
3
9
  - Added new `ssl_truststore_path`, `ssl_truststore_password`, and `ssl_truststore_type` settings for configuring SSL-trust using a PKCS-12 or JKS trust store, deprecating their `truststore`, `truststore_password`, and `truststore_type` counterparts.
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
 
@@ -154,12 +154,12 @@ class LogStash::Outputs::Http < LogStash::Outputs::Base
154
154
  end
155
155
 
156
156
  def log_error_response(response, url, event)
157
- log_failure(
158
- "Encountered non-2xx HTTP code #{response.code}",
159
- :response_code => response.code,
160
- :url => url,
161
- :event => event
162
- )
157
+ log_details = {
158
+ :code => response.code,
159
+ :body => response.body,
160
+ :url => url,
161
+ }
162
+ log_failure("Encountered non-2xx HTTP code", log_details)
163
163
  end
164
164
 
165
165
  def send_events(events)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-http'
3
- s.version = '5.6.0'
3
+ s.version = '5.7.0'
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,7 +20,7 @@ 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'
@@ -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")
@@ -417,10 +417,10 @@ end
417
417
 
418
418
  RSpec.describe LogStash::Outputs::Http do # different block as we're starting web server with TLS
419
419
 
420
- @@default_server_settings = TestApp.server_settings.dup
420
+ let(:default_server_settings) { TestApp.server_settings.dup }
421
421
 
422
422
  before do
423
- TestApp.server_settings = @@default_server_settings.merge(webrick_config)
423
+ TestApp.server_settings = default_server_settings.merge(webrick_config)
424
424
 
425
425
  TestApp.last_request = nil
426
426
 
@@ -441,7 +441,7 @@ RSpec.describe LogStash::Outputs::Http do # different block as we're starting we
441
441
  @server.shutdown # WEBrick::HTTPServer
442
442
 
443
443
  TestApp.stop! rescue nil
444
- TestApp.server_settings = @@default_server_settings
444
+ TestApp.server_settings = default_server_settings
445
445
  end
446
446
 
447
447
  let(:ssl_cert_host) { 'localhost' }
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.0
4
+ version: 5.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-01 00:00:00.000000000 Z
11
+ date: 2024-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -35,7 +35,7 @@ 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
@@ -46,7 +46,7 @@ dependencies:
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