Skip to content

Commit

Permalink
util: store EnvVaultInsecure as string, not bool
Browse files Browse the repository at this point in the history
The configuration option `EnvVaultInsecure` is expected to be a string,
not a boolean. By converting the bool back to a string (after
verification), it is now possible to skip the certificate validation
check by setting `vaultCAVerify: false` in the Vault configuration.

Fixes: #1852
Reported-by: Bryon Nevis <[email protected]>
Signed-off-by: Niels de Vos <[email protected]>
  • Loading branch information
nixpanic authored and mergify[bot] committed Feb 2, 2021
1 parent df81022 commit 582d004
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/util/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func (vc *vaultConnection) initConnection(kmsID string, config map[string]interf
if err != nil {
return fmt.Errorf("failed to parse 'vaultCAVerify': %w", err)
}
vaultConfig[api.EnvVaultInsecure] = !vaultCAVerify
vaultConfig[api.EnvVaultInsecure] = strconv.FormatBool(!vaultCAVerify)
}

vaultCAFromSecret := "" // optional
Expand Down

0 comments on commit 582d004

Please sign in to comment.