logstash-input-http_poller 5.6.0 → 6.0.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: d3d161b8ee6f2170f109df31cd332fcd65d7603a0e38871a092d8360e4dd6828
4
- data.tar.gz: bb5e20020ce59c81a48541ec89197b5fac5b39f33ab81dd7d1a8cb1d3fa0007f
3
+ metadata.gz: c82b3b2751707fb8f047ba370c78965c3cd1dce8288155125fe22a74ca30f126
4
+ data.tar.gz: 3a650c567768624a232c83c199a75ac278af7862b7853911262af51adf7a463d
5
5
  SHA512:
6
- metadata.gz: f9a598a4ded7a2922406a2862ab93a991bdac616bebf099bd7a7e47670f78b147d507be911f97bc66a3afb47ce9930e68d449c6d3f052e17890e6779ea3543ee
7
- data.tar.gz: adeffbb5c09aa4bb08311da08b3c0342a30e42e230f89070ce14b201242ac40c6cd7b2abe6292300f0a251a847a21eb62f3ed3cb7e9fd5d2388d07b3e61d1007
6
+ metadata.gz: d607447eeaa6df83ba8cb66e51758b505130e2917129789097a1c92fe6a4142e9d6b89061291d4e850b06fdc1b52aaf865ce73b7c175c5aec41bc482ea72ef68
7
+ data.tar.gz: 62cf30b5e9205527baa2ccb4d8ba9a289b7c33a52ecaa25fc284905f858dc3baa92bf5df24adcc444f2e26196e691bce0f14c67b9805f3dca7f255546257c909
data/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## 6.0.0
2
+ - SSL settings that were marked deprecated in version `5.6.0` are now marked obsolete, and will prevent the plugin from starting.
3
+ - These settings are:
4
+ - `cacert`, which should be replaced by `ssl_certificate_authorities`
5
+ - `client_cert`, which should be replaced by `ssl_certificate`
6
+ - `client_key`, which should be replaced by `ssl_key`
7
+ - `keystore`, which should be replaced by `ssl_keystore_path`
8
+ - `keystore_password`, which should be replaced by `ssl_keystore_password`
9
+ - `keystore_type`, which should be replaced by `ssl_keystore_password`
10
+ - `truststore`, which should be replaced by `ssl_truststore_path>`
11
+ - `truststore_password`, which should be replaced by `ssl_truststore_password`
12
+ - `truststore_type`, which should be replaced by `ssl_truststore_type`
13
+ - [#149](https://github.com/logstash-plugins/logstash-input-http_poller/pull/149)
14
+
1
15
  ## 5.6.0
2
16
  - Added new `ssl_enabled` setting for enabling/disabling the SSL configurations [#146](https://github.com/logstash-plugins/logstash-input-http_poller/pull/146)
3
17
 
data/docs/index.asciidoc CHANGED
@@ -122,21 +122,19 @@ Here’s how ECS compatibility mode affects output.
122
122
 
123
123
  This plugin supports the following configuration options plus the <<plugins-{type}s-{plugin}-common-options>> described later.
124
124
 
125
+ NOTE: As of version `6.0.0` of this plugin, a number of previously deprecated settings related to SSL have been removed.
126
+ Please check out <<plugins-{type}s-{plugin}-obsolete-options>> for details.
127
+
128
+
125
129
  [cols="<,<,<",options="header",]
126
130
  |=======================================================================
127
131
  |Setting |Input type|Required
128
132
  | <<plugins-{type}s-{plugin}-automatic_retries>> |<<number,number>>|No
129
- | <<plugins-{type}s-{plugin}-cacert>> |a valid filesystem path|__Deprecated__
130
- | <<plugins-{type}s-{plugin}-client_cert>> |a valid filesystem path|__Deprecated__
131
- | <<plugins-{type}s-{plugin}-client_key>> |a valid filesystem path|__Deprecated__
132
133
  | <<plugins-{type}s-{plugin}-connect_timeout>> |<<number,number>>|No
133
134
  | <<plugins-{type}s-{plugin}-cookies>> |<<boolean,boolean>>|No
134
135
  | <<plugins-{type}s-{plugin}-ecs_compatibility>> | <<string,string>>|No
135
136
  | <<plugins-{type}s-{plugin}-follow_redirects>> |<<boolean,boolean>>|No
136
137
  | <<plugins-{type}s-{plugin}-keepalive>> |<<boolean,boolean>>|No
137
- | <<plugins-{type}s-{plugin}-keystore>> |a valid filesystem path|__Deprecated__
138
- | <<plugins-{type}s-{plugin}-keystore_password>> |<<password,password>>|__Deprecated__
139
- | <<plugins-{type}s-{plugin}-keystore_type>> |<<string,string>>|__Deprecated__
140
138
  | <<plugins-{type}s-{plugin}-metadata_target>> |<<string,string>>|No
141
139
  | <<plugins-{type}s-{plugin}-password>> |<<password,password>>|No
142
140
  | <<plugins-{type}s-{plugin}-pool_max>> |<<number,number>>|No
@@ -158,9 +156,6 @@ This plugin supports the following configuration options plus the <<plugins-{typ
158
156
  | <<plugins-{type}s-{plugin}-ssl_truststore_type>> |<<string,string>>|No
159
157
  | <<plugins-{type}s-{plugin}-ssl_verification_mode>> |<<string,string>>, one of `["full", "none"]`|No
160
158
  | <<plugins-{type}s-{plugin}-target>> |<<string,string>>|No
161
- | <<plugins-{type}s-{plugin}-truststore>> |a valid filesystem path|__Deprecated__
162
- | <<plugins-{type}s-{plugin}-truststore_password>> |<<password,password>>|__Deprecated__
163
- | <<plugins-{type}s-{plugin}-truststore_type>> |<<string,string>>|__Deprecated__
164
159
  | <<plugins-{type}s-{plugin}-urls>> |<<hash,hash>>|Yes
165
160
  | <<plugins-{type}s-{plugin}-user>> |<<string,string>>|No
166
161
  | <<plugins-{type}s-{plugin}-validate_after_inactivity>> |<<number,number>>|No
@@ -181,33 +176,6 @@ How many times should the client retry a failing URL. We highly recommend NOT se
181
176
  to zero if keepalive is enabled. Some servers incorrectly end keepalives early requiring a retry!
182
177
  Note: if `retry_non_idempotent` is set only GET, HEAD, PUT, DELETE, OPTIONS, and TRACE requests will be retried.
183
178
 
184
- [id="plugins-{type}s-{plugin}-cacert"]
185
- ===== `cacert`
186
- deprecated[5.5.0, Replaced by <<plugins-{type}s-{plugin}-ssl_certificate_authorities>>]
187
-
188
- * Value type is <<path,path>>
189
- * There is no default value for this setting.
190
-
191
- If you need to use a custom X.509 CA (.pem certs) specify the path to that here
192
-
193
- [id="plugins-{type}s-{plugin}-client_cert"]
194
- ===== `client_cert`
195
- deprecated[5.5.0, Replaced by <<plugins-{type}s-{plugin}-ssl_certificate>>]
196
-
197
- * Value type is <<path,path>>
198
- * There is no default value for this setting.
199
-
200
- If you'd like to use a client certificate (note, most people don't want this) set the path to the x509 cert here
201
-
202
- [id="plugins-{type}s-{plugin}-client_key"]
203
- ===== `client_key`
204
- deprecated[5.5.0, Replaced by <<plugins-{type}s-{plugin}-ssl_key>>]
205
-
206
- * Value type is <<path,path>>
207
- * There is no default value for this setting.
208
-
209
- If you're using a client certificate specify the path to the encryption key here
210
-
211
179
  [id="plugins-{type}s-{plugin}-connect_timeout"]
212
180
  ===== `connect_timeout`
213
181
 
@@ -317,34 +285,6 @@ Should redirects be followed? Defaults to `true`
317
285
  Turn this on to enable HTTP keepalive support. We highly recommend setting `automatic_retries` to at least
318
286
  one with this to fix interactions with broken keepalive implementations.
319
287
 
320
- [id="plugins-{type}s-{plugin}-keystore"]
321
- ===== `keystore`
322
- deprecated[5.5.0, Replaced by <<plugins-{type}s-{plugin}-ssl_keystore_path>>]
323
-
324
- * Value type is <<path,path>>
325
- * There is no default value for this setting.
326
-
327
- If you need to use a custom keystore (`.jks`) specify that here. This does not work with .pem keys!
328
-
329
- [id="plugins-{type}s-{plugin}-keystore_password"]
330
- ===== `keystore_password`
331
- deprecated[5.5.0, Replaced by <<plugins-{type}s-{plugin}-ssl_keystore_password>>]
332
-
333
- * Value type is <<password,password>>
334
- * There is no default value for this setting.
335
-
336
- Specify the keystore password here.
337
- Note, most .jks files created with keytool require a password!
338
-
339
- [id="plugins-{type}s-{plugin}-keystore_type"]
340
- ===== `keystore_type`
341
- deprecated[5.5.0, Replaced by <<plugins-{type}s-{plugin}-ssl_keystore_type>>]
342
-
343
- * Value type is <<string,string>>
344
- * Default value is `"JKS"`
345
-
346
- Specify the keystore type here. One of `JKS` or `PKCS12`. Default is `JKS`
347
-
348
288
  [id="plugins-{type}s-{plugin}-metadata_target"]
349
289
  ===== `metadata_target`
350
290
 
@@ -569,35 +509,6 @@ Define the target field for placing the received data. If this setting is omitte
569
509
  TIP: When ECS is enabled, set `target` in the codec (if the codec has a `target` option).
570
510
  Example: `codec => json { target => "TARGET_FIELD_NAME" }`
571
511
 
572
-
573
- [id="plugins-{type}s-{plugin}-truststore"]
574
- ===== `truststore`
575
- deprecated[5.5.0, Replaced by <<plugins-{type}s-{plugin}-ssl_truststore_path>>]
576
-
577
- * Value type is <<path,path>>
578
- * There is no default value for this setting.
579
-
580
- If you need to use a custom truststore (`.jks`) specify that here. This does not work with .pem certs!
581
-
582
- [id="plugins-{type}s-{plugin}-truststore_password"]
583
- ===== `truststore_password`
584
- deprecated[5.5.0, Replaced by <<plugins-{type}s-{plugin}-ssl_truststore_password>>]
585
-
586
- * Value type is <<password,password>>
587
- * There is no default value for this setting.
588
-
589
- Specify the truststore password here.
590
- Note, most .jks files created with keytool require a password!
591
-
592
- [id="plugins-{type}s-{plugin}-truststore_type"]
593
- ===== `truststore_type`
594
- deprecated[5.5.0, Replaced by <<plugins-{type}s-{plugin}-ssl_truststore_type>>]
595
-
596
- * Value type is <<string,string>>
597
- * Default value is `"JKS"`
598
-
599
- Specify the truststore type here. One of `JKS` or `PKCS12`. Default is `JKS`
600
-
601
512
  [id="plugins-{type}s-{plugin}-urls"]
602
513
  ===== `urls`
603
514
 
@@ -663,6 +574,28 @@ being leased to the consumer. Non-positive value passed to this method disables
663
574
  connection validation. This check helps detect connections that have become
664
575
  stale (half-closed) while kept inactive in the pool."
665
576
 
577
+
578
+ [id="plugins-{type}s-{plugin}-obsolete-options"]
579
+ ==== HTTP Poller Input Obsolete Configuration Options
580
+
581
+ WARNING: As of version `6.0.0` of this plugin, some configuration options have been replaced.
582
+ The plugin will fail to start if it contains any of these obsolete options.
583
+
584
+ [cols="<,<",options="header",]
585
+ |=======================================================================
586
+ |Setting|Replaced by
587
+ | cacert |<<plugins-{type}s-{plugin}-ssl_certificate_authorities>>
588
+ | client_cert |<<plugins-{type}s-{plugin}-ssl_certificate>>
589
+ | client_key |<<plugins-{type}s-{plugin}-ssl_key>>
590
+ | keystore |<<plugins-{type}s-{plugin}-ssl_keystore_path>>
591
+ | keystore_password |<<plugins-{type}s-{plugin}-ssl_keystore_password>>
592
+ | keystore_type |<<plugins-{type}s-{plugin}-ssl_keystore_password>>
593
+ | truststore |<<plugins-{type}s-{plugin}-ssl_truststore_path>>
594
+ | truststore_password |<<plugins-{type}s-{plugin}-ssl_truststore_password>>
595
+ | truststore_type |<<plugins-{type}s-{plugin}-ssl_truststore_type>>
596
+ |=======================================================================
597
+
598
+
666
599
  [id="plugins-{type}s-{plugin}-common-options"]
667
600
  include::{include_path}/{type}.asciidoc[]
668
601
 
@@ -11,7 +11,7 @@ require 'logstash/plugin_mixins/event_support/event_factory_adapter'
11
11
  require 'logstash/plugin_mixins/scheduler'
12
12
 
13
13
  class LogStash::Inputs::HTTP_Poller < LogStash::Inputs::Base
14
- include LogStash::PluginMixins::HttpClient[:with_deprecated => true]
14
+ include LogStash::PluginMixins::HttpClient[:with_obsolete => true]
15
15
  include LogStash::PluginMixins::ECSCompatibilitySupport(:disabled, :v1, :v8 => :v1)
16
16
  include LogStash::PluginMixins::ECSCompatibilitySupport::TargetCheck
17
17
  include LogStash::PluginMixins::EventSupport::EventFactoryAdapter
@@ -154,8 +154,8 @@ class LogStash::Inputs::HTTP_Poller < LogStash::Inputs::Base
154
154
  private
155
155
  def validate_request!(url_or_spec, request)
156
156
  method, url, spec = request
157
-
158
- raise LogStash::ConfigurationError, "Invalid URL #{url}" unless URI::DEFAULT_PARSER.regexp[:ABS_URI].match(url)
157
+ parser = defined?(URI::RFC2396_PARSER) ? URI::RFC2396_PARSER : URI::DEFAULT_PARSER
158
+ raise LogStash::ConfigurationError, "Invalid URL #{url}" unless parser.regexp[:ABS_URI].match(url)
159
159
 
160
160
  raise LogStash::ConfigurationError, "No URL provided for request! #{url_or_spec}" unless url
161
161
  if spec && spec[:auth]
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-input-http_poller'
3
- s.version = '5.6.0'
3
+ s.version = '6.0.0'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = "Decodes the output of an HTTP API into events"
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
  # Gem dependencies
21
21
  s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
22
22
  s.add_runtime_dependency 'logstash-codec-plain'
23
- s.add_runtime_dependency "logstash-mixin-http_client", ">= 7.4.0", "< 8.0.0"
23
+ s.add_runtime_dependency "logstash-mixin-http_client", ">= 7.5.0", "< 8.0.0"
24
24
  s.add_runtime_dependency 'logstash-mixin-scheduler', '~> 1.0'
25
25
  s.add_runtime_dependency 'logstash-mixin-ecs_compatibility_support', '~>1.3'
26
26
  s.add_runtime_dependency 'logstash-mixin-event_support', '~> 1.0', '>= 1.0.1'
@@ -210,7 +210,7 @@ describe LogStash::Inputs::HTTP_Poller do
210
210
  context "given 'at' expression" do
211
211
  let(:opts) {
212
212
  {
213
- "schedule" => { "at" => "2000-01-01 00:05:00 +0000"},
213
+ "schedule" => { "at" => "2000-01-01 00:15:00 +0000"},
214
214
  "urls" => default_urls,
215
215
  "codec" => "json",
216
216
  "metadata_target" => metadata_target
@@ -557,4 +557,34 @@ describe LogStash::Inputs::HTTP_Poller do
557
557
  let(:allowed_lag) { 10 } # CI: wait till scheduler shuts down
558
558
  end
559
559
  end
560
+
561
+ describe "obsolete settings" do
562
+ let(:default_url) { "http://localhost:2322" }
563
+ let(:config) {
564
+ {
565
+ "schedule" => { "cron" => "0 0 0 0 0 UTC" },
566
+ "urls" => default_urls,
567
+ "codec" => "json"
568
+ }
569
+ }
570
+ [{:name => 'cacert', :canonical_name => 'ssl_certificate_authorities'},
571
+ {:name => 'client_cert', :canonical_name => 'ssl_certificate'},
572
+ {:name => 'client_key', :canonical_name => 'ssl_key'},
573
+ {:name => "keystore", :canonical_name => 'ssl_keystore_path'},
574
+ {:name => 'truststore', :canonical_name => 'ssl_truststore_path'},
575
+ {:name => "keystore_password", :canonical_name => "ssl_keystore_password"},
576
+ {:name => 'truststore_password', :canonical_name => "ssl_truststore_password"},
577
+ {:name => "keystore_type", :canonical_name => "ssl_keystore_type"},
578
+ {:name => 'truststore_type', :canonical_name => 'ssl_truststore_type'}
579
+ ].each do |settings|
580
+ context "with option #{settings[:name]}" do
581
+ let(:obsolete_config) { config.merge(settings[:name] => 'test_value') }
582
+
583
+ it "emits an error about the setting `#{settings[:name]}` now being obsolete and provides guidance to use `#{settings[:canonical_name]}`" do
584
+ error_text = /The setting `#{settings[:name]}` in plugin `http_poller` is obsolete and is no longer available. Use `#{settings[:canonical_name]}` instead/i
585
+ expect { LogStash::Inputs::HTTP_Poller.new(obsolete_config)}.to raise_error LogStash::ConfigurationError, error_text
586
+ end
587
+ end
588
+ end
589
+ end
560
590
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-http_poller
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.6.0
4
+ version: 6.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-06-19 00:00:00.000000000 Z
12
+ date: 2024-12-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  requirement: !ruby/object:Gem::Requirement
@@ -21,8 +21,8 @@ dependencies:
21
21
  - !ruby/object:Gem::Version
22
22
  version: '2.99'
23
23
  name: logstash-core-plugin-api
24
- prerelease: false
25
24
  type: :runtime
25
+ prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  requirements:
28
28
  - - ">="
@@ -38,8 +38,8 @@ dependencies:
38
38
  - !ruby/object:Gem::Version
39
39
  version: '0'
40
40
  name: logstash-codec-plain
41
- prerelease: false
42
41
  type: :runtime
42
+ prerelease: false
43
43
  version_requirements: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
@@ -50,18 +50,18 @@ dependencies:
50
50
  requirements:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: 7.4.0
53
+ version: 7.5.0
54
54
  - - "<"
55
55
  - !ruby/object:Gem::Version
56
56
  version: 8.0.0
57
57
  name: logstash-mixin-http_client
58
- prerelease: false
59
58
  type: :runtime
59
+ prerelease: false
60
60
  version_requirements: !ruby/object:Gem::Requirement
61
61
  requirements:
62
62
  - - ">="
63
63
  - !ruby/object:Gem::Version
64
- version: 7.4.0
64
+ version: 7.5.0
65
65
  - - "<"
66
66
  - !ruby/object:Gem::Version
67
67
  version: 8.0.0
@@ -72,8 +72,8 @@ dependencies:
72
72
  - !ruby/object:Gem::Version
73
73
  version: '1.0'
74
74
  name: logstash-mixin-scheduler
75
- prerelease: false
76
75
  type: :runtime
76
+ prerelease: false
77
77
  version_requirements: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
@@ -86,8 +86,8 @@ dependencies:
86
86
  - !ruby/object:Gem::Version
87
87
  version: '1.3'
88
88
  name: logstash-mixin-ecs_compatibility_support
89
- prerelease: false
90
89
  type: :runtime
90
+ prerelease: false
91
91
  version_requirements: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - "~>"
@@ -103,8 +103,8 @@ dependencies:
103
103
  - !ruby/object:Gem::Version
104
104
  version: 1.0.1
105
105
  name: logstash-mixin-event_support
106
- prerelease: false
107
106
  type: :runtime
107
+ prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
110
  - - "~>"
@@ -120,8 +120,8 @@ dependencies:
120
120
  - !ruby/object:Gem::Version
121
121
  version: '1.0'
122
122
  name: logstash-mixin-validator_support
123
- prerelease: false
124
123
  type: :runtime
124
+ prerelease: false
125
125
  version_requirements: !ruby/object:Gem::Requirement
126
126
  requirements:
127
127
  - - "~>"
@@ -134,8 +134,8 @@ dependencies:
134
134
  - !ruby/object:Gem::Version
135
135
  version: '0'
136
136
  name: logstash-codec-json
137
- prerelease: false
138
137
  type: :development
138
+ prerelease: false
139
139
  version_requirements: !ruby/object:Gem::Requirement
140
140
  requirements:
141
141
  - - ">="
@@ -148,8 +148,8 @@ dependencies:
148
148
  - !ruby/object:Gem::Version
149
149
  version: '0'
150
150
  name: logstash-codec-line
151
- prerelease: false
152
151
  type: :development
152
+ prerelease: false
153
153
  version_requirements: !ruby/object:Gem::Requirement
154
154
  requirements:
155
155
  - - ">="
@@ -162,8 +162,8 @@ dependencies:
162
162
  - !ruby/object:Gem::Version
163
163
  version: '0'
164
164
  name: logstash-devutils
165
- prerelease: false
166
165
  type: :development
166
+ prerelease: false
167
167
  version_requirements: !ruby/object:Gem::Requirement
168
168
  requirements:
169
169
  - - ">="
@@ -176,8 +176,8 @@ dependencies:
176
176
  - !ruby/object:Gem::Version
177
177
  version: '0'
178
178
  name: flores
179
- prerelease: false
180
179
  type: :development
180
+ prerelease: false
181
181
  version_requirements: !ruby/object:Gem::Requirement
182
182
  requirements:
183
183
  - - ">="
@@ -190,8 +190,8 @@ dependencies:
190
190
  - !ruby/object:Gem::Version
191
191
  version: '0'
192
192
  name: timecop
193
- prerelease: false
194
193
  type: :development
194
+ prerelease: false
195
195
  version_requirements: !ruby/object:Gem::Requirement
196
196
  requirements:
197
197
  - - ">="
@@ -235,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
235
235
  - !ruby/object:Gem::Version
236
236
  version: '0'
237
237
  requirements: []
238
- rubygems_version: 3.2.33
238
+ rubygems_version: 3.3.26
239
239
  signing_key:
240
240
  specification_version: 4
241
241
  summary: Decodes the output of an HTTP API into events