Skip to content

TLS config flexibility - #13

Merged
gabe-l-hart merged 9 commits into
mainfrom
TLSConfigFlexibility
Jun 4, 2026
Merged

TLS config flexibility#13
gabe-l-hart merged 9 commits into
mainfrom
TLSConfigFlexibility

Conversation

@gabe-l-hart

@gabe-l-hart gabe-l-hart commented Jun 4, 2026

Copy link
Copy Markdown
Member

Description

This PR makes the TLS config surface more flexible in the following ways:

  1. Client connections (host and client processes) can load without needing access to the server's key/cert or the CA used to sign their credentials
  2. The server can boot with only the server's key/pair and the trusted CA used to sign the client's cert
  3. The client may opt to skip hostname verification for the server
  4. During remote-control init, the user can specify DNS names and IP addresses for the generated TLS credentials

Additionally, the env var overrides for the trusted CAs have been clarified to avoid the ambiguity of REMOTE_CONTROL_SERVER_CA (unclear if it's the CA that signed the server's cert or the CA the server should trust).

Security

This PR makes it possible for the client processes to boot without needing to hold the keys to the server which makes security much stronger. The option to skip hostname verification slightly weakens security, but is common for using self-signed certs where the server will be accessed via a variable DNS lookup on a private LAN or VPN. The full cryptographic verification is still performed, so the only loss in security is the mitigation against Man-In-The-Middle attacks. This option should only be used on a trusted network that is itself secured against MitM.

Branch: TLSConfigFlexibility
AI-usage: full (Hermes + Qwen3.6-35b)
Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
Branch: TLSConfigFlexibility
AI-usage: full (Hermes + Qwen3.6-35b)
Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
Branch: TLSConfigFlexibility
AI-usage: Full (OpenCode + Qwdn3.6-35b)
Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
Branch: TLSConfigFlexibility
AI-usage: full (OpenCode + Qwen3.6-35b)
Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
Previously, the name REMOTE_CONTROL_CLIENT_CA was ambiguous as to whether
it was the CA used to sign the client cert or the CA that the client should
trust (ie the CA used to sign the server cert). The new names line up with
the values internally that make it clear (cfg.ClientTLS.TrustedCAFile is
the CA used to sign the server that the client shoudl trust)

Branch: TLSConfigFlexibility
AI-usage: none
Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
… verification

According to the documentation, VerifyConnection runs on all handshakes
whereas VerifyPeerCertificate only runs on initial connections. This also
fixes setting InsecureSkipVerify to skip the default verification. The
custom verification always runs, regardless of the InsecureSkipVerify value

See: https://pkg.go.dev/crypto/tls#Config

Branch: TLSConfigFlexibility
AI-usage: draft (Bob)
Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
The names should match across json and CLI even if snake vs kebab case are
different

Branch: TLSConfigFlexibility
AI-usage: none
Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
Branch: TLSConfigFlexibility
AI-usage: none
Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
@gabe-l-hart

Copy link
Copy Markdown
Member Author

Looking over the code so far, I'm also going to add flexibility to the init command to allow the user to specify the correct DNS names and IPs so they don't need to rely on skipping hostname verification.

Branch: TLSConfigFlexibility
AI-usage: full (OpenCode + Qwen3.6-35b)
Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
@gabe-l-hart
gabe-l-hart merged commit 0be15e9 into main Jun 4, 2026
2 checks passed
@gabe-l-hart
gabe-l-hart deleted the TLSConfigFlexibility branch June 4, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant