feat(mesh): enable peer mTLS from key_management.cache.mesh.peer_tls#558
Merged
Merged
Conversation
Wires the mesh peer-mTLS transport (the mechanism landed in #557) through to operator config. A new `peer_tls` block under `key_management.cache.mesh` takes `cert_file` / `key_file` / `ca_file`, plus an optional `server_name` (default `sbproxy-mesh`). Flow across the layers: - sbproxy-config gains MeshPeerTlsConfig on MeshClusterConfig (config schema regenerated). - key_plane reads the PEM files (fail-closed on a read error) into a PeerTlsParams on BootstrapConfig. - bootstrap builds the rustls acceptor + connector from it and threads them into TransportServer::start_with_security and TransportClientPool::with_security (which now creates TLS PeerClients). Unset keeps the plaintext transport. The transport mechanism and its end-to-end handshake tests are already in place; this is the operator-facing toggle. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X19S6eQzKKExZ9RUPAHuGy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Makes the mesh peer-mTLS transport (mechanism merged in #557) operator-configurable from
sb.yml. With this, an operator turns on mutual TLS for the mesh cache fabric with:Every inbound mesh connection must then present a CA-signed client certificate, and every outbound connection presents this node's certificate, both verified against the CA. Unset keeps the plaintext transport.
Layers wired
MeshPeerTlsConfig(cert_file/key_file/ca_file/server_name) onMeshClusterConfig; config JSON schema regenerated.key_plane: reads the PEM files (fail-closed on a read error) intoPeerTlsParamsonBootstrapConfig.bootstrap: builds the rustls acceptor + connector and threads them intoTransportServer::start_with_securityandTransportClientPool::with_security(which now constructs TLS-capablePeerClients).Tests
TransportClientPoolnow carries the connector to every client it builds.sbproxy-config(293) andsbproxy-mesh(416) lib suites pass;sbproxy-corelib suite passes; clippy-D warningsclean on config + mesh; config schema regenerated and committed (CI's schema check will confirm it matches).A misconfigured cert/key/CA fails the mesh bootstrap rather than silently downgrading the cluster to plaintext.