Post-quantum security
Tunnel's own TLS handshakes in the current development build negotiate TLS 1.3 with MLKEM1024 key exchange and TLS_AES_256_GCM_SHA384 only. Tunnel-managed certificate chains and handshake signatures use ML-DSA-87. QUIC handshakes and application data use the negotiated suite. QUIC Initial packets follow the fixed AES-128-GCM protection in RFC 9001. ML-KEM (FIPS 203) · ML-DSA (FIPS 204) · QUIC Initial (RFC 9001 §5.2)
Device connections
| Connection | Handshake and authentication |
|---|---|
Device enrollment and trust updates, 9650/UDP by default | The client connects directly over HTTP/3 and verifies the gateway's certificate chain and name. On first enrollment, it generates a private key and CSR locally. The gateway checks the device enrollment key and the CSR's proof of key possession. |
| Device control, work relay, and visitor sessions | Both peers authenticate with Tunnel device certificates. Exposed ports depend on the transport. Work relays also check the work ticket, and visitor listeners check mapping permissions. |
| Direct XTCP | The gateway issues an ML-DSA-87-signed direct-connection lease over authenticated signaling. The visitor and provider authenticate each other using short-lived certificates. Application traffic travels over QUIC between the two devices. |
| MQTT access | The gateway and client each verify the broker's ML-DSA-87 certificate chain. The MQTT 5 connection to the broker requires TLS support for MLKEM1024 and TLS_AES_256_GCM_SHA384. If the broker requires mutual TLS, each connecting peer also needs a broker client certificate and private key. A separate end-to-end mutual TLS session protects Tunnel control and application streams. |
Check the client endpoint and trust file alongside the required ports and transport. Ports and protocols · Client identity · MQTT relays
Browser and business traffic
- Public management console and API. Browsers use publicly trusted HTTPS at Nginx, which manages the public certificate and handshake settings. Nginx forwards management requests through the local management socket or over HTTP on
9650/TCP. Devices useweb_endpointto reach the gateway's UDP enrollment listener directly. HTTPS reverse proxy - Business HTTPS, WSS, and HTTP/3 terminated by Tunnel. Import an ML-DSA-87 certificate chain with a matching SAN for the business domain and its matching private key. Configure the peer to trust the root and enable the current suite. Built-in Let's Encrypt DNS-01 issuance is disabled. For public browser traffic, Nginx can terminate publicly trusted HTTPS and proxy to the Tunnel business listener over HTTP. Business routing example
- HTTPS passthrough. The gateway selects the target by SNI, and the target service completes the TLS handshake. The client follows the target service's trust and algorithm requirements. Business listeners
- Cross-protocol HTTPS and WSS targets. The provider connects to the target using the target adapter's general TLS configuration. The provider verifies the target's certificate and hostname against public roots and the deployment trust roots. Cross-protocol example
- Client plugins. Plugins that terminate TLS use an ML-DSA-87 certificate chain and matching private key. When connecting to an HTTPS upstream, the plugin validates its name and ML-DSA-87 trust root. The upstream must enable the current suite. Examples
Metrics collection
The default Prometheus configuration can run on the gateway host and scrape the dedicated /metrics endpoint over loopback HTTP. Set metrics and metrics_token_file on the server, and use credentials_file in Prometheus to read the corresponding Bearer token. /healthz checks the listener and /readyz checks the database connection. Health probes
For direct scraping on a non-loopback address, configure metrics_tls_cert and metrics_tls_key together. Supply an ML-DSA-87 PEM certificate chain and the matching PKCS #8 PEM key. The scraper must trust the chain and explicitly support TLS 1.3, pure MLKEM1024, and TLS_AES_256_GCM_SHA384. Go 1.27 does not enable pure MLKEM1024 in its default TLS configuration. A deployment that uses the default Prometheus TLS settings can use the loopback listener described above. Server configuration
Certificate deployment and rotation
When switching from a previous suite, perform a fresh installation with server and client builds from the same source revision. Prepare an empty database and newly issued ML-DSA-87 root and Tunnel CA material for the gateway. Use fresh identity directories and enrollment keys for clients. Keep the root private key in the offline signing environment and distribute the public root certificate through a trusted channel. Quick start
Gateway and device certificates on the current suite rotate every six hours by default. To rotate a Tunnel CA, issue the successor offline and distribute or refresh trust material according to the client's connection method. Certificate rotation