Skip to content
Secure servicesDocs 1.3.x

Transport Security ​

TLS encrypts the connection and authenticates the server. Mutual TLS additionally authenticates the client certificate. Neither replaces application-level identity and authorization when a request crosses a user or gateway trust boundary.

Connection trust and request admission TLS and optional enforced mTLS protect the configured connection, while RPC request gates and message limits run before application interceptors and do not guard raw HTTP fallback handlers. TLS: verify the server; optional mTLS: verify the clientCertificate + key · trusted CA · deployment-managed rotationEnforced mTLS needs both requestCert and rejectUnauthorized Request gateHeaders only · before body and interceptors Message-size limitreadMaxBytes · each RPC message Application interceptors and handlerAuthentication · authorization · validation Raw HTTPExplicit fallbackOwn admission policy RPC admission also appliesto local clients and toHealth / Reflection RPCs. Gate errors must already be client-safe; gate auditing is application-owned.
Connection trust, pre-body admission and application policy protect different boundaries. Raw HTTP handlers, including HTTP health aliases, bypass RPC admission.

Choose the task ​

Configure server TLS or mutual TLS. Use request admission to reject unsuitable requests before reading their bodies.

Transport choices and exact configuration fields
NeedCanonical guide
Load a server key/certificate, use environment paths, or test TLS locallyTLS configuration
Require and validate client certificates for service-to-service trafficMutual TLS
Decide between HTTP/1.1, h2c, and TLS/ALPN transportsTransport matrix
Add JWT, session, gateway, or per-method policyAuth and authz
Reject unauthenticated or oversized requests before the body is parsedRequest admission
Find exact server TLS fieldsCreateServerOptions
typescript
const server = createServer({
  services: [routes],
  tls: { dirPath: './keys' },
});

This excerpt assumes createServer and your service routes are in scope. The TLS guide supplies certificate setup and a complete example.

Production certificates should be issued and rotated by the platform rather than baked into an image. Keep private keys out of source control, validate the full chain, and do not disable peer verification as a production workaround. The mTLS page owns client-certificate policy; the TLS page owns certificate loading and server transport setup.