Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore: add ssl modes table for reference (#44546)

Illia Basalaievdc39d0fe3d53
diff --git a/apps/docs/content/guides/platform/ssl-enforcement.mdx b/apps/docs/content/guides/platform/ssl-enforcement.mdx
index e0cae00ce67..433eb839188 100644
--- a/apps/docs/content/guides/platform/ssl-enforcement.mdx
+++ b/apps/docs/content/guides/platform/ssl-enforcement.mdx
@@ -103,6 +103,15 @@ supabase ssl-enforcement --project-ref {ref} update --disable-db-ssl-enforcement
Postgres supports [multiple SSL modes](https://www.postgresql.org/docs/current/libpq-ssl.html#LIBPQ-SSL-PROTECTION) on the client side. These modes provide different levels of protection. Depending on your needs, it is important to verify that the SSL mode in use is performing the required level of enforcement and verification of SSL connections.
+| SSL Mode | Encryption | Verifies CA | Verifies Hostname | Description |
+| ------------- | ---------- | ----------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
+| `disable` | No | No | No | SSL is not used. All data is transmitted in plaintext. |
+| `allow` | Optional | No | No | Tries a non-SSL connection first; falls back to SSL if the server requires it. |
+| `prefer` | Optional | No | No | Tries an SSL connection first; falls back to non-SSL if the server doesn't support it. This is the default. |
+| `require` | Yes | No | No | Always uses SSL, but does not verify the server certificate or hostname. |
+| `verify-ca` | Yes | Yes | No | Uses SSL and verifies that the server certificate is signed by a trusted CA. |
+| `verify-full` | Yes | Yes | Yes | Uses SSL, verifies the CA certificate, and confirms the hostname matches the certificate. Recommended when SSL enforcement is enabled. |
+
The strongest mode offered by Postgres is `verify-full` and this is the mode you most likely want to use when SSL enforcement is enabled. To use `verify-full` you will need to download the Supabase CA certificate for your database. The certificate is available through the dashboard under the SSL Configuration section in the [Database Settings page](/dashboard/project/_/database/settings).
Once the CA certificate has been downloaded, add it to the certificate authority list used by Postgres.