Commit Graph

35 Commits

Author SHA1 Message Date
Etienne Stalmans
04ddc6bef8 chore: update cors for pg routes (#49136)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Bug fix - config hardening

## What is the current behavior?

CORS is applied at the global level in a permissive mode

## What is the new behavior?

Self-hosted envoy config should apply CORS to the `/pg` routes. These
should only be called from the studio dashboard (when called via a
browser).

uses `SUPABASE_PUBLIC_URL`, which should mean this isn't a breaking
change.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Security & Access**
  * Added stricter CORS controls for the `/pg/` route.
* Requests are limited to the configured public URL and localhost
origins.
* Standard HTTP methods and headers are supported, with preflight
responses cached for one hour.

* **Documentation**
* Updated self-hosting guidance to describe the `/pg/` route’s CORS
policy.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-08-17 10:28:09 -07:00
Andrey A.
18bad2e61c chore(self-hosted): remove em-dashes (#48498) 2026-07-30 17:20:22 +00:00
Luiz Felipe Machado
9777f051d6 feat(self-hosted): restrict rest root anon (#45462) 2026-07-07 13:16:23 +02:00
Andrey A.
e7abda8dce fix(self-hosted): change default api external url to contain /auth/v1 (#47640) 2026-07-07 12:28:47 +02:00
Inder Singh
5d8d1f359f chore(self-hosted): use /bin/sh shebang in kong-entrypoint.sh (#46897) 2026-06-13 10:30:39 +00:00
Andrey A.
098157eb90 fix(self-hosted): block access to tenants and openapi realtime api (#46856) 2026-06-12 11:48:58 +02:00
Luiz Felipe Machado
94ac6f3fa3 fix(self-hosted): reject access via internal jwt api keys when translation is enabled (#46023) 2026-05-26 17:03:13 +02:00
Luiz Felipe Machado
5fa012cfa9 docs(self-hosted): clarify envoy api gateway setup (#45238) 2026-04-29 09:33:53 +00:00
Luiz Felipe Machado
53060160aa fix(self-hosted): api key translation should depend on the sb_ keys present (#45195) 2026-04-24 12:17:50 +02:00
Luiz Felipe Machado
e080513666 feat: add Envoy API gateway for self-hosted Docker Compose (#43838) 2026-04-22 11:20:32 +02:00
Luiz Felipe Machado
f128106801 feat(self-hosting): add SAML SSO env config and open Kong routes (#43385) 2026-04-01 15:42:36 +02:00
Andrey A.
6190518640 add new opaque api keys and new auth to self-hosted 2026-03-16 12:00:10 +01:00
Andrey A.
f24df26d7b fix: do not expose analytics by default 2026-02-16 13:23:16 +01:00
Etienne Stalmans
a3d789f564 chore: updates to analytics route kong 2026-02-16 09:39:30 +01:00
Vaibhav
cdc1a93eb0 fix: quote dashboard credentials in kong.yml to handle special characters 2026-01-23 17:49:35 +01:00
Andrey A.
ab2e1e8918 fix: restrict access to mcp server in self-hosted (#39849)
* add routes for local remote mcp
* add additional plugins to kong to restrict mcp
* prohibit access to /api/mcp and /mcp by default
* add comments to warn the user about local access only
2025-10-27 13:39:30 +01:00
Filipe Cabaço
03aa5c3474 fix: Add Realtime API Routes (#23237)
Exposes the API routes for Realtime appropriately via Kong configuration.

Also alters the analytics configuration to avoid extra logs due to having only one analytics server instead of a cluster

Co-authored-by: Rodrigo Mansueli <rodrigo@mansueli.com>
2024-04-25 09:58:25 +01:00
Ahmed El-Sharnoby
b3114508d0 Dashboard default credentials substitution in kong.yml 2023-08-26 00:19:18 +03:00
Qiao Han
39d0fd1235 fix: use dashboard path as catch all 2023-07-30 00:14:24 +08:00
Copple
e9e89c12de minor cleanup 2023-07-28 16:12:27 +02:00
Copple
f3a74537c5 Adding some sensible defaults 2023-07-28 14:22:19 +02:00
Copple
9ee7f87a42 Add basic auth using Kong. Since we now expose the dashboard using Kong, then we can disable the port on docker compose 2023-07-28 14:01:06 +02:00
Ahmed El-Sharnoby
c44a81533b Add environment variables substitution for kong.yml 2023-07-24 08:28:04 +00:00
Copple
4712cf1f31 Revert "Add environment variables substitution for kong.yml" 2023-07-17 15:33:01 +02:00
Ahmed El-Sharnoby
59e3ea10e7 Add environment variables substitution for kong.yml 2023-07-05 13:08:53 +00:00
Bobbie Soedirgo
8c96d8be27 feat(self-host): use <API_URL>/functions/v1 for Edge Functions 2023-05-29 15:58:49 +08:00
Filipe Cabaco
447fca8275 apply review feedback 2023-04-04 11:51:29 +01:00
Filipe Cabaco
c6070647b9 modify vector to be more complete using the CLI example 2023-04-04 02:09:10 +01:00
Wen Bo Xie
a52b5e7767 chore: upgrade Realtime image to v2.0.2 (#11482)
* chore: upgrade Realtime image to v2.0.2

* chore: update realtime hostname

Co-authored-by: Qiao Han <qiao@supabase.io>
2023-01-05 21:37:28 -08:00
Luke Bechtel
033f5cfb2f Fix graphql postgrest comment in kong.yml 2022-04-02 19:47:15 -04:00
dragarcia
e5e86ba1eb chore: update self-hosted setup 2022-03-29 16:27:46 +02:00
Copple
eb716ed246 Adds the graphql reverse proxy 2022-03-29 12:06:11 +02:00
Copple
3cea779b7f changes the issuer to supabase-demo 2022-01-10 17:59:32 +01:00
Copple
614faed4e4 Chore/postgrest v9 (#3988)
* using slack clone to test

* updates auth functions to handle new GUC commands

* move postgREST to new version

* testing with todo list

* makeing our mount setup far more robust

* Adds some usage commands

* cleans up the auth functions

* test with todos app

* fix env var for GUC

* new auth functions - changed for performance improvement

* Adds some integration tests for RLS

* anon volume on postgres

* remove unused helpers

* fix broken docusaurus build

* Fix complaining vercel

* test instructions

* Use named imports

* Fixes imports

* all relative

* chore: add in tsconfig.json to /web

* finding these all over the place

* Update docker/docker-compose.yml

Co-authored-by: Steve Chavez <stevechavezast@gmail.com>

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Steve Chavez <stevechavezast@gmail.com>
2021-11-24 00:31:07 +08:00
Copple
6bc7fdc854 Cleans up the docker folder 2021-11-22 21:14:06 +08:00