8000 TLS hardening: honor GOVC_TLS_CA_CERTS / GOVC_TLS_KNOWN_HOSTS / GOVC_TLS_HANDSHAKE_TIMEOUT · Issue #43 · dominikzorgnotti/esx-hcl-check · GitHub
[go: up one dir, main page]

Skip to content

TLS hardening: honor GOVC_TLS_CA_CERTS / GOVC_TLS_KNOWN_HOSTS / GOVC_TLS_HANDSHAKE_TIMEOUT #43

Closed

Description

@dominikzorgnotti

Follow-up to the GOVC_INSECURE warning work.

Background

When GOVC_INSECURE is unset/false the tool already verifies the vCenter certificate against the host's system root CA store (Go crypto/tls default with RootCAs: nil). No change needed there.

Goal

Piggyback on govc's TLS behavior for three additional standard env vars, wiring them onto govmomi's soap.Client before the first round-trip:

  • GOVC_TLS_CA_CERTS — PEM CA bundle(s) (OS PathListSeparator-separated) trusted instead of system roots → soap.Client.SetRootCAs
  • GOVC_TLS_KNOWN_HOSTS — known_hosts file of host thumbprint fallback entries → soap.Client.LoadThumbprints
  • GOVC_TLS_HANDSHAKE_TIMEOUT — Go duration bounding the TLS handshake → DefaultTransport().TLSHandshakeTimeout

Notes

  • Misconfigured CA path / unparseable duration must fail fast (hard error), not silently weaken verification.
  • Warn loudly when GOVC_INSECURE=1 is combined with CA_CERTS/KNOWN_HOSTS, since those are then ignored.
  • No esxcli, no behavioral change to the default verification path.

Activity

  1. added a commit that references this issue on Jul 3, 2026
    9293341
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0