Skip to content

Commit b82d75c

Browse files
committed
Add explicit default, tidy docs and set property correctly
Initial PR was calling '.value' on configuration property which does not exist for a string type Fixes #213
1 parent ef92fc7 commit b82d75c

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

docs/index.asciidoc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@ This plugin supports the following configuration options plus the <<plugins-{typ
8282
| <<plugins-{type}s-{plugin}-sasl_mechanism>> |<<string,string>>|No
8383
| <<plugins-{type}s-{plugin}-security_protocol>> |<<string,string>>, one of `["PLAINTEXT", "SSL", "SASL_PLAINTEXT", "SASL_SSL"]`|No
8484
| <<plugins-{type}s-{plugin}-send_buffer_bytes>> |<<number,number>>|No
85+
| <<plugins-{type}s-{plugin}-ssl_endpoint_identification_algorithm>> |<<string,string>>|No
8586
| <<plugins-{type}s-{plugin}-ssl_key_password>> |<<password,password>>|No
8687
| <<plugins-{type}s-{plugin}-ssl_keystore_location>> |a valid filesystem path|No
8788
| <<plugins-{type}s-{plugin}-ssl_keystore_password>> |<<password,password>>|No
8889
| <<plugins-{type}s-{plugin}-ssl_keystore_type>> |<<string,string>>|No
8990
| <<plugins-{type}s-{plugin}-ssl_truststore_location>> |a valid filesystem path|No
9091
| <<plugins-{type}s-{plugin}-ssl_truststore_password>> |<<password,password>>|No
9192
| <<plugins-{type}s-{plugin}-ssl_truststore_type>> |<<string,string>>|No
92-
| <<plugins-{type}s-{plugin}-ssl_endpoint_identification_algorithm>> |<<string,string>>|No
9393
| <<plugins-{type}s-{plugin}-topic_id>> |<<string,string>>|Yes
9494
| <<plugins-{type}s-{plugin}-value_serializer>> |<<string,string>>|No
9595
|=======================================================================
@@ -333,6 +333,14 @@ Security protocol to use, which can be either of PLAINTEXT,SSL,SASL_PLAINTEXT,SA
333333

334334
The size of the TCP send buffer to use when sending data.
335335

336+
[id="plugins-{type}s-{plugin}-ssl_endpoint_identification_algorithm"]
337+
===== `ssl_endpoint_identification_algorithm`
338+
339+
* Value type is <<string,string>>
340+
* Default value is `"https"`
341+
342+
The endpoint identification algorithm, defaults to "https". Set to empty string "" to disable
343+
336344
[id="plugins-{type}s-{plugin}-ssl_key_password"]
337345
===== `ssl_key_password`
338346

@@ -389,14 +397,6 @@ The truststore password
389397

390398
The truststore type.
391399

392-
[id="plugins-{type}s-{plugin}-ssl_endpoint_identification_algorithm"]
393-
===== `ssl_endpoint_identification_algorithm`
394-
395-
* Value type is <<string,string>>
396-
* Default value is `"https"`
397-
398-
The endpoint identification algorithm, defaults to "https". Set to empty string "" to disable
399-
400400
[id="plugins-{type}s-{plugin}-topic_id"]
401401
===== `topic_id`
402402

lib/logstash/outputs/kafka.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class LogStash::Outputs::Kafka < LogStash::Outputs::Base
141141
# The password of the private key in the key store file.
142142
config :ssl_key_password, :validate => :password
143143
# Algorithm to use when verifying host. Set to "" to disable
144-
config :ssl_endpoint_identification_algorithm, :validate => :string
144+
config :ssl_endpoint_identification_algorithm, :validate => :string, :default => 'https'
145145
# Security protocol to use, which can be either of PLAINTEXT,SSL,SASL_PLAINTEXT,SASL_SSL
146146
config :security_protocol, :validate => ["PLAINTEXT", "SSL", "SASL_PLAINTEXT", "SASL_SSL"], :default => "PLAINTEXT"
147147
# http://kafka.apache.org/documentation.html#security_sasl[SASL mechanism] used for client connections.
@@ -367,7 +367,7 @@ def set_trustore_keystore_config(props)
367367
props.put("ssl.key.password", ssl_key_password.value) unless ssl_key_password.nil?
368368
props.put("ssl.keystore.location", ssl_keystore_location) unless ssl_keystore_location.nil?
369369
props.put("ssl.keystore.password", ssl_keystore_password.value) unless ssl_keystore_password.nil?
370-
props.put("ssl.endpoint.identification.algorithm", ssl_endpoint_identification_algorithm.value) unless ssl_endpoint_identification_algorithm.nil?
370+
props.put("ssl.endpoint.identification.algorithm", ssl_endpoint_identification_algorithm) unless ssl_endpoint_identification_algorithm.nil?
371371
end
372372

373373
def set_sasl_config(props)

0 commit comments

Comments
 (0)