fix(agent): present client cert on relay dial (relay is mTLS-only) (VA-77) #82
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/VA-77-relay-mtls-client-cert"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Follow-up defect to VA-76 (#81). After that merged, the control channel connects but the relay dial fails with
tunnel WS connect failed: IO error: received fatal alert: CertificateRequired, blocking every relay usage (files, terminal, desktop, vnc, rdp, mcp).Root cause: VA-76's
net::relay_tls_configusedwith_no_client_auth(), assuming the relay authenticated the agent via the rendezvousrauthtoken alone. The relay port is the same mTLS port as the control channel (api.vervain.a8n.systems:15444serves both/api/v1/agentand/api/v1/relay), so the server requires the client certificate at the TLS layer and aborts withCertificateRequiredwhen none is presented.Changes
net.rs:relay_tls_config(resolver, server_ca_pem)now builds an mTLS config (delegates tobuild_steady_state_configwith a throwaway leaf capture), presenting the same enrolled client cert as the control channel. The relay config is built once per session inrun_connectionfrom the control channel's resolver and pinned server CA.Arc<ClientConfig>:Session::new->Dispatcher::set_relay_tls_config->handle_msg_tunnel->tunnel::spawn/open/dial_relay.host/tunnel.rs:dial_relayuses the provided mTLS config directly (TlsConnector::from) forwss://;ws://(dev) unchanged. Stale VA-76 doc comments corrected.Testing
just pre-commitgreen (fmt, clippy--deny warnings, build, windows target, lib + tpm tests). The livewss://mTLS handshake against:15444is not exercised by tests; verify on the desktop-02 agent by opening the Files tab.Fixes VA-77. Relates to VA-76.
🤖 Generated with Claude Code