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: ceph#1852
Reported-by: Bryon Nevis <[email protected]>
Signed-off-by: Niels de Vos <[email protected]>
(cherry picked from commit 582d004)
  • Loading branch information
nixpanic committed Feb 2, 2021
1 parent 50aede0 commit 1d1f330
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 1d1f330

Please sign in to comment.