Skip to content

Commit

Permalink
Merge pull request #80 from criteo/ssl_validation
Browse files Browse the repository at this point in the history
Validate ssl peers
  • Loading branch information
PHBourquin authored Oct 7, 2021
2 parents 885314d + c338d03 commit 392537c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ AllCops:
Layout/LineLength:
Max: 175

# those metrics should be disabled
Metrics/AbcSize:
Max: 90
Max: 92

Metrics/BlockLength:
Max: 188
Expand Down
3 changes: 2 additions & 1 deletion lib/consul/async/consul_endpoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,8 @@ def _handle_error(http, consul_index)
def fetch
options = {
connect_timeout: 5, # default connection setup timeout
inactivity_timeout: conf.wait_duration + 1 + (conf.wait_duration / 16) # default connection inactivity (post-setup) timeout
inactivity_timeout: conf.wait_duration + 1 + (conf.wait_duration / 16), # default connection inactivity (post-setup) timeout
tls: { verify_peer: conf.tls_verify_peer }
}
unless conf.tls_cert_chain.nil?
options[:tls] = {
Expand Down
1 change: 1 addition & 0 deletions lib/consul/async/json_endpoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ def _handle_error(http)

def fetch
options = {
tls: { verify_peer: conf.tls_verify_peer },
connect_timeout: 5, # default connection setup timeout
inactivity_timeout: 60 # default connection inactivity (post-setup) timeout
}
Expand Down
1 change: 1 addition & 0 deletions lib/consul/async/vault_endpoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ def _handle_error(http)

def fetch
options = {
tls: { verify_peer: conf.tls_verify_peer },
connect_timeout: 5, # default connection setup timeout
inactivity_timeout: 1 # default connection inactivity (post-setup) timeout
}
Expand Down

0 comments on commit 392537c

Please # to comment.