mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-26 08:18:18 +00:00
27a7cc739e
The pulsar config validation rejected any non-`pulsar+ssl` broker whenever `tls_allow_insecure` was set or `tls_hostname_verification` was disabled. Both toggles are inert on a plaintext `pulsar://` broker — the Pulsar client only applies them for `pulsar+ssl` — so treating a non-default value as fatal is wrong. This surfaced as issue #4796: the console persists `tls_hostname_verification` as `false` (the checkbox defaults to unchecked while the server default is `on`). At creation time the value is not present in the unmerged request and falls back to the safe default, so the connectivity check passes and the target comes online. On restart the persisted config is merged and validated, the `false` is read back, and the target is rejected — permanently offline even though Pulsar is reachable. Relax both the loader-side (`validate_pulsar_broker_config`) and runtime-side (`PulsarArgs::validate`) checks so only a `tls_ca` bundle — real TLS trust material that is never defaulted to a non-empty value — requires a `pulsar+ssl` scheme. The inert toggles no longer fail the target. This also heals configs already persisted with the bad value. Add regression coverage for both paths. Co-authored-by: heihutu <heihutu@gmail.com>