Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Revert "Revert "Re-indroduce ssl_certificate_validation option""
This reverts commit b379f46.
  • Loading branch information
normtraxler committed Aug 2, 2019
commit d9865bcbaf42d7c712b582c331a910314f12894c
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 8.0.0
- Re-indroduce ssl_certificate_validation option

## 7.0.0
- Removed obsolete ssl_certificate_verify option

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ config :keepalive, :validate => :boolean, :default => true
# How many times should the client retry a failing URL? Default is 3
config :automatic_retries, :validate => :number, :default => 3

# If you need to disable certificate hostname validation, set to false
config :ssl_certificate_validation, :validate => :boolean, :default => true

# If you need to use a custom X.509 CA (.pem certs) specify the path to that here
config :ca_path, :validate => :path

Expand Down
9 changes: 9 additions & 0 deletions lib/logstash/plugin_mixins/http_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ def setup_http_client_config
# See https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/impl/conn/PoolingHttpClientConnectionManager.html#setValidateAfterInactivity(int)[these docs for more info]
config :validate_after_inactivity, :validate => :number, :default => 200

# If you need to disable certificate hostname validation, set to false
config :ssl_certificate_validation, :validate => :boolean, :default => true

# If you need to use a custom X.509 CA (.pem certs) specify the path to that here
config :cacert, :validate => :path

Expand Down Expand Up @@ -139,6 +142,12 @@ def client_config
c[:ssl][:ca_file] = @cacert
end

if !@ssl_certificate_validation
c[:ssl].merge!(
:verify => false
)
end

if @truststore
c[:ssl].merge!(
:truststore => @truststore,
Expand Down
2 changes: 1 addition & 1 deletion logstash-mixin-http_client.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'logstash-mixin-http_client'
s.version = '7.0.0'
s.version = '8.0.0'
s.licenses = ['Apache License (2.0)']
s.summary = "AWS mixins to provide a unified interface for Amazon Webservice"
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"
Expand Down