Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Validate ssl peers #80

Merged
merged 1 commit into from
Oct 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
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 },
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FAR: it would have been better to have a common base class for all endpoint types.

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