CockroachCloud uses TLS 1.2 for inter-node and client-node communication, digital certificates for inter-node authentication, SSL modes for node identity verification, and password authentication for client identity verification.
Node identity verification
The connection string generated to connect to your application uses the
verify-full SSL mode by default to verify a node’s identity. This mode encrypts the data in-flight as well as verifies the identity of the CockroachDB node, thus ensuring a secure connection to your cluster. Using this mode prevents MITM (Man in the Middle) attacks, impersonation attacks, and eavesdropping.
To connect securely to your cluster using the
- Download the CA certificate and place it in the
certsdirectory. The Certificate Authority (CA) certificate is the file that the client uses to verify the identity of the CockroachDB node.
- When connecting to the cluster, specify the path to the
certsdirectory in the connection string. See Connect to your cluster for more details.
You can also use the
require SSL mode, although we do not recommend using it since it can make the cluster susceptible to MITM and impersonation attacks. For more information, see the "Protection Provided in Different Modes" section in PostgreSQL's SSL Support document.
Client identity verification
CockroachCloud uses password authentication for verifying a client’s identity. If no password has been set up for a user, password authentication will always fail for that user and you won’t be able to connect to the cluster.
For more information about creating SQL users and passwords, see User Authorization.
SSL mode settings
The table below lists the
sslmode settings you can use to connect to your cluster and their associated security risks. Other settings are not recommended.
||Eavesdropping protection||MITM protection||Description|
||Yes||No||Force a secure connection. An error occurs if the secure connection cannot be established. This is less secure than using a CA certificate and is only recommended for testing or unimportant data.|
||Yes||Yes||Force a secure connection, verify that the server certificate is signed by a known CA, and verify that the server address matches that specified in the certificate.|