Help › Connect to databases

Encrypt a connection with TLS

Choose whether a connection is encrypted and whether the server's certificate is checked, and use a private certificate authority.

Querlyn 0.1.0 is not released yet. This help describes it ahead of release.

TLS in the connection dialog decides two things: whether what travels between Querlyn and the server is encrypted, and whether Querlyn checks that the server is the one you meant.

The four choices

TLSEncryptedServer's certificate
DisableNoNot looked at. Use only on a trusted local machine.
PreferWhen the server supports itNot verified
Require (no verification)AlwaysNot verified. This protects against someone listening, not against someone answering in the server's place.
Verify fullAlwaysVerified, with the host name. The connection is never made less secure to get through.

The sentence under the buttons says the same for the choice you made.

What Querlyn chooses for you

A new connection starts at Verify full, except when the host is your own computer (localhost, 127.0.0.1 or ::1), where it starts at Prefer. The choice follows the host as you type it, until you pick a mode yourself.

Querlyn never turns verification off by itself. If Verify full fails, the connection fails, and the error says which step it was.

Use your own certificate authority

With Verify full, Querlyn checks the server's certificate against the certificate authorities your operating system trusts. If your server's certificate comes from a private authority:

  1. Choose Verify full. The CA certificate field appears.
  2. Enter the path of the authority's certificate file, in PEM form.

When a file is named, Querlyn trusts only the authorities in that file for this connection.

Through a tunnel

When a connection goes through SSH, Kubernetes or AWS Systems Manager, Verify full still checks the certificate against the name under Host, not against the tunnel's local address. So leave Host as the name the server's certificate was issued for.

What differs by database

DatabaseWhat to know
PostgreSQL, Amazon Redshift, MySQL, MariaDBThe four choices work as described above.
SQL ServerPrefer leaves the connection unencrypted only when the server cannot encrypt at all. See Connect to SQL Server.
ClickHouseThe choice is between HTTP and HTTPS, and the port follows it: 8123 or 8443. See Connect to ClickHouse.
Oracle DatabaseRequire and Verify full mean a TCPS listener, usually on port 2484. See Connect to Oracle Database.
SnowflakeAlways Verify full on Snowflake's own hosts.
BigQueryAlways Verify full on Google's own hosts.
MongoDBThe four choices work as described above, for every member of a replica set. Prefer falls back to an unencrypted connection only when the server does not speak TLS. See Connect to MongoDB.
CassandraThe four choices work as described above. Prefer falls back to an unencrypted connection only when the node does not speak TLS. A Client certificate can be added for nodes that require one. See Connect to Apache Cassandra.
KafkaThe four choices work as described above, for every broker. Prefer falls back to an unencrypted connection only when the broker does not speak TLS. A Client certificate can be added for clusters that require one. See Connect to Apache Kafka.
SQLite, DuckDBNo network, so no TLS.

Cloud sign-in needs encryption

A sign-in with AWS IAM or Microsoft Entra ID sends a short-lived token that works like a password, so it needs Verify full or Require (no verification). Choosing a cloud sign-in moves Disable and Prefer to Verify full, and Querlyn refuses to save or connect with the weaker choices.

What is not supported

  • Signing in with a client certificate, except MongoDB's X.509 sign-in and the client certificates of Cassandra and Kafka; see Connect to MongoDB, Connect to Apache Cassandra and Connect to Apache Kafka.
  • A mode that verifies the certificate but not the host name (verify-ca in some tools). A connection imported with that setting becomes Verify full.

Help for Querlyn 0.1.0. All help topics