• Cadence
  • Technical
Cadence® Connection Examples Using TLS

In Cadence® 0.24.0, TLS support was introduced for the gRPC transport (https://github.com/uber/cadence/pull/4606). In this blog we provide a couple of sample code snippets—one using the Go SDK and the other using the Java SDK—to demonstrate how to establish connection to the Cadence server using TLS. For both the snippets, we assume a X.509 Certificate Authority (CA) certificate from the Cadence server in PEM-encoded (ASCII) format called ca-certificate.pem.

Go

To create a Worker using Go, the following code snippet can be used:

Java

In order to use the Java SDK to establish a connection to the Cadence server over TLS, the following Maven dependencies are needed:

The following code snippet demonstrates how to create a new Worker.