Repository navigation
Description
Summary
Please add an optional TLS 1.3 transport mode that lets the JSON-RPC client and server authenticate each other using a pre-shared token. TLS would encrypt requests and responses; the shared secret would authenticate the peers during the handshake. No certificates or external tunnel should be required in this mode.
Use case
I run Robot Framework tests against a remote keyword server. I can provision a shared secret on both hosts and would like to use it to protect keyword calls and their results without deploying another service on either host.
Current behavior
My setup uses two stunnel instances: the client connects to a local plaintext listener, stunnel carries the traffic across the network using TLS 1.3 with a PSK, and the server-side tunnel forwards it to the local JSON-RPC service. This works, but I have to configure and maintain two extra processes.
flowchart LR
C["JSON-RPC client"] <-->|"Plaintext (loopback)"| CT["Client-side stunnel"]
CT <-->|"TLS 1.3 + PSK (network)"| ST["Server-side stunnel"]
ST <-->|"Plaintext (loopback)"| S["JSON-RPC server"]
Alternative: SSH local port forwarding. The JSON-RPC client connects to a loopback port on the client host. An SSH client forwards that traffic over an encrypted, authenticated SSH connection to the server host, where the SSH server connects to the JSON-RPC service on loopback. This avoids running stunnel but still requires SSH access with port forwarding enabled and a tunnel maintained outside the library.
Proposed behavior
flowchart LR
C["JSON-RPC client"] <-->|"Native TLS 1.3 + token"| S["JSON-RPC server"]
- Let the server configure the corresponding identity and key without exposing the secret in test suites, command-line arguments, or logs.
- With matching credentials, existing remote keywords should work over the encrypted connection without changes to the keywords themselves.
- With an unknown identity, a missing key, or an incorrect key, the connection must fail before any keyword executes. A TLS-enabled endpoint must not fall back to plaintext.
- Keep existing configurations unchanged unless TLS is enabled, and document a minimal client/server example using placeholder credentials.
Activity