Update default_verify() to correctly respect the VAULT_SKIP_VERIFY env var
#160
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi! The
vaultrscrate currently does not correctly handle this environment variable. Expected behaviour (reference to Vault docs) is as follows:VAULT_SKIP_VERIFY=true: TLS verification is skipped, i.e. verification is not performedVAULT_SKIP_VERIFY=false: TLS verification is not skipped, i.e. verification is performedVAULT_SKIP_VERIFYis not set : TLS verification is performed by defaultThe current behaviour is correct when the env var is not set, but is inverted in the case that it is. In other words, currently using
VAULT_SKIP_VERIFY=truewithvaultrsmeans that verification is performed (and vice versa). The unit tests are also backwards.This PR corrects
default_verify()to handle this properly and updates the unit tests for consistency.