Available since version 0.71.0
https:// protocol. For client connections, you can configure TLS as follow:
config.yaml
Use cases
- A typical use case for TLS is to secure communications between your load balancer and router.
- Enable HTTP/2. TLS is mandatory for HTTP/2 operation. Once enabled, requests are upgraded to HTTP/2 whenever possible.
Cipher
By default, we inherit the defaults of Go TLS configuration. This means the following TLS protocols are supported:- TLS 1.3
- TLS 1.2
- TLS 1.1
- TLS 1.0
We strongly advice against using TLS below 1.2 for security reasons.
If our configuration does not meet your requirements, don’t hesitate to contact us or open an issue on GitHub.
Client Authentication or Mutual TLS (mTLS)
In a standard SSL transaction, the client verifies the server’s validity when establishing a secure connection. This involves checking the server’s certificate prior to starting the SSL transaction. However, there may be situations where you wish for the server to authenticate the client connecting to it. When client authentication is activated viaclient_auth.cert_file the client can send a certificate to the server that is validated by the server before a connection is established. By default it is not a requirement and the server support clients with valid and without certificates. You can set required to true to enforce that a client must be verified and authentic. If the validation does not succeed the client connection is refused.
config.yaml
client_auth with required=true on the server and the correct TLS settings on the client side.
Example in Go Clients
TLS with Subgraphs
Router mTLS
In addition to accepting mTLS connections from clients (inbound), the router can also present client certificates when connecting to subgraphs (outbound). This is useful when your subgraphs require mTLS authentication to accept requests from the router. You can configure a global client certificate that applies to all subgraph connections, and optionally override it on a per-subgraph basis.Global Configuration
Apply a client certificate to all outbound subgraph connections:config.yaml
Per-Subgraph Configuration
Override the global config for specific subgraphs. Each entry fully overrides the globalall config for that subgraph:
config.yaml
Per-subgraph entries live under
tls.client.subgraphs and use the same field structure as tls.client.all (e.g., cert_file, key_file). A per-subgraph entry fully overrides the global all config for that subgraph.Custom CA Certificates
By default, the router uses your operating system’s root CA store to verify subgraph server certificates. If your subgraphs use TLS certificates signed by an internal or private CA that is not in the system’s root CA store, you can provide a custom CA certificate file usingca_file. The router will use this CA to verify the subgraph’s server certificate during the TLS handshake.
config.yaml