Files
rustfs/crates/kms
唐小鸭 e4781e763a fix(kms): apply the configured skip-TLS-verify to every Vault client
VaultConnectionSettings carried no TLS state, so both backend constructors
dropped VaultConfig::tls on the floor and build_client never called
VaultClientSettingsBuilder::verify. vaultrs 0.8.0 then fell back to its own
default, leaving verification on: with RUSTFS_KMS_VAULT_SKIP_TLS_VERIFY=true
and RUSTFS_KMS_ALLOW_INSECURE_DEV_DEFAULTS=true against a self-signed Vault,
startup still failed the handshake with UnknownIssuer.

Carry skip_tls_verify on the connection settings and set verify explicitly on
every client generation, authenticated and login alike. Setting it
unconditionally also closes a bypass in the other direction: left unset, vaultrs
derives verify from its own VAULT_SKIP_VERIFY variable, so a stray value in the
environment disabled certificate verification without passing the KMS
insecure-defaults gate.

The restore path pins verification on: VaultRestoreTarget carries no TLS
settings, and recovery is the last path that should accept an unauthenticated
Vault. The remaining TlsConfig fields (ca_cert_path, client_cert_path,
client_key_path) are still unused, but no supported input can set them — every
constructor leaves them None.
2026-08-14 12:54:29 +08:00
..