Skip to content

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

feat: add SSL enforcement docs

Div Arora9162e0d19c24
diff --git a/apps/docs/components/Navigation/Navigation.constants.ts b/apps/docs/components/Navigation/Navigation.constants.ts
index 1d0f16fd393..d85bef11e5f 100644
--- a/apps/docs/components/Navigation/Navigation.constants.ts
+++ b/apps/docs/components/Navigation/Navigation.constants.ts
@@ -278,6 +278,7 @@ export const menuItems: NavMenu = {
{ name: 'Performance Tuning', url: '/guides/platform/performance', items: [] },
{ name: 'Permissions', url: '/guides/platform/permissions', items: [] },
{ name: 'Production Readiness', url: '/guides/platform/going-into-prod', items: [] },
+ { name: 'SSL Enforcement', url: '/guides/platform/ssl-enforcement', items: [] },
{ name: 'Troubleshooting', url: '/guides/platform/troubleshooting', items: [] },
],
},
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
index f2139f3a407..e8992e91e42 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
@@ -586,6 +586,7 @@ export const platform = {
{ name: 'Network Restrictions', url: '/guides/platform/network-restrictions', items: [] },
{ name: 'Performance Tuning', url: '/guides/platform/performance', items: [] },
{ name: 'Permissions', url: '/guides/platform/permissions', items: [] },
+ { name: 'SSL Enforcement', url: '/guides/platform/ssl-enforcement', items: [] },
],
},
{
diff --git a/apps/docs/pages/guides/platform/network-restrictions.mdx b/apps/docs/pages/guides/platform/network-restrictions.mdx
index ce2f320a023..0564d57560a 100644
--- a/apps/docs/pages/guides/platform/network-restrictions.mdx
+++ b/apps/docs/pages/guides/platform/network-restrictions.mdx
@@ -8,9 +8,7 @@ export const meta = {
<Admonition type="note">
-Network Restrictions are currently in beta and are being slowly made available to all projects.
-
-The current iteration of Network Restrictions applies to connections to Postgres and PgBouncer. Support for restricting connections to PostgREST, Storage, and Auth will be added at a later date.
+Network Restrictions is currently in beta and is slowly being made available to all projects. [Contact support](https://app.supabase.com/support/new) if you'd like to request early access.
</Admonition>
@@ -20,6 +18,7 @@ To get started:
1. [Install](/docs/guides/cli) the Supabase CLI 1.22.0+.
1. [Log in](/docs/guides/cli/local-development#log-in-to-the-supabase-cli) to your Supabase account using the CLI.
+1. If your project was created before 23rd December 2022, it will need to be [upgraded to the latest Supabase version](/docs/guides/platform/migrating-and-upgrading-projects) before Network Restrictions can be used.
1. Ensure that you have [Owner or Admin permissions](/docs/guides/platform/access-control#manage-team-members) for the project that you are enabling network restrictions.
## Check restrictions
@@ -67,8 +66,8 @@ Restrictions applied successfully: true
## Limitations
-1. Network Restrictions do not currently apply to APIs offered over HTTPS (e.g. PostgREST, Storage, Auth).
-1. Network Restrictions should not be used if you require you need to connect to your Postgres database using Edge Functions.
+- The current iteration of Network Restrictions applies to connections to Postgres and PgBouncer and doesn't currently apply to APIs offered over HTTPS (e.g., PostgREST, Storage, and Auth).
+- Network Restrictions should not be used if you need to connect to your Postgres database using Edge Functions.
export const Page = ({ children }) => <Layout meta={meta} children={children} />
diff --git a/apps/docs/pages/guides/platform/ssl-enforcement.mdx b/apps/docs/pages/guides/platform/ssl-enforcement.mdx
new file mode 100644
index 00000000000..ee70d7fbcaf
--- /dev/null
+++ b/apps/docs/pages/guides/platform/ssl-enforcement.mdx
@@ -0,0 +1,58 @@
+import Layout from '~/layouts/DefaultGuideLayout'
+
+export const meta = {
+ title: 'Postgres SSL Enforcement',
+ description: 'Enforce SSL usage for all Postgres connections',
+}
+
+<Admonition type="note">
+
+Postgres SSL Enforcement is currently in beta and is slowly being made available to all projects. [Contact support](https://app.supabase.com/support/new) if you'd like to request early access.
+
+</Admonition>
+
+Your Supabase project supports connecting to the Postgres DB without SSL enabled to maximize client compatibility. For increased security, you can prevent clients from connecting if they're not using SSL.
+
+SSL enforcement only applies to connections to both Postgres and PgBouncer ("Connection Pooler"); all HTTP APIs offered by Supabase (e.g., PostgREST, Storage, Auth) automatically enforce SSL on all incoming connections.
+
+To get started:
+
+1. [Install](/docs/guides/cli) the Supabase CLI 1.37.0+.
+1. [Log in](/docs/guides/cli/local-development#log-in-to-the-supabase-cli) to your Supabase account using the CLI.
+1. Ensure that you have [Owner or Admin permissions](/docs/guides/platform/access-control#manage-team-members) for the project that you are enabling SSL enforcement.
+
+## Check enforcement status
+
+You can use the `get` subcommand of the CLI to check whether SSL is currently being enforced:
+
+```bash
+> supabase ssl-enforcement --project-ref {ref} get --experimental
+SSL is being enforced.
+```
+
+Or similarly, if SSL is not being enforced, you will see:
+
+```bash
+> supabase ssl-enforcement --project-ref {ref} get --experimental
+SSL is *NOT* being enforced.
+```
+
+## Update enforcement
+
+The `update` subcommand is used to change the SSL enforcement status for your project:
+
+```bash
+> supabase ssl-enforcement --project-ref {ref} update --enable-db-ssl-enforcement --experimental
+SSL is now being enforced.
+```
+
+Similarly, to disable SSL enforcement:
+
+```bash
+> supabase ssl-enforcement --project-ref {ref} update --disable-db-ssl-enforcement --experimental
+SSL is *NOT* being enforced.
+```
+
+export const Page = ({ children }) => <Layout meta={meta} children={children} />
+
+export default Page