Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ansible/files/envoy_config/lds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ resources:
- match:
safe_regex:
regex: >-
/auth/v1/(verify|callback|authorize|sso/saml/(acs|metadata|slo))
/auth/v1/(verify|callback|authorize|sso/saml/(acs|metadata|slo)|\.well-known/(openid-configuration|jwks\.json))
route:
cluster: gotrue
regex_rewrite:
Expand Down
131 changes: 104 additions & 27 deletions docker/all-in-one/etc/kong/kong.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,101 @@
# ##############################################################################################
# Updating this file also requires a corresponding update in worker/src/lib/config-utils/kong.ts
# ##############################################################################################
_format_version: '1.1'
_format_version: "1.1"
services:
- {
name: auth-v1-open,
url: 'http://localhost:9999/verify',
routes: [{ name: auth-v1-open, strip_path: true, paths: [/auth/v1/verify] }],
url: "http://localhost:9999/verify",
routes:
[{ name: auth-v1-open, strip_path: true, paths: [/auth/v1/verify] }],
plugins: [{ name: cors }],
}
- {
name: auth-v1-open-callback,
url: 'http://localhost:9999/callback',
routes: [{ name: auth-v1-open-callback, strip_path: true, paths: [/auth/v1/callback] }],
url: "http://localhost:9999/callback",
routes:
[
{
name: auth-v1-open-callback,
strip_path: true,
paths: [/auth/v1/callback],
},
],
plugins: [{ name: cors }],
}
- {
name: auth-v1-open-authorize,
url: 'http://localhost:9999/authorize',
routes: [{ name: auth-v1-open-authorize, strip_path: true, paths: [/auth/v1/authorize] }],
url: "http://localhost:9999/authorize",
routes:
[
{
name: auth-v1-open-authorize,
strip_path: true,
paths: [/auth/v1/authorize],
},
],
plugins: [{ name: cors }],
}
- {
name: auth-v1-open-saml,
url: 'http://localhost:9999/sso/saml/',
routes: [{ name: auth-v1-open-saml, strip_path: true, paths: [/auth/v1/sso/saml/] }],
url: "http://localhost:9999/sso/saml/",
routes:
[
{
name: auth-v1-open-saml,
strip_path: true,
paths: [/auth/v1/sso/saml/],
},
],
plugins: [{ name: cors }],
}
- {
name: auth-v1-open-well-known,
url: "http://localhost:9999/.well-known/",
routes:
[
{
name: auth-v1-open-well-known,
strip_path: true,
paths: [/auth/v1/.well-known/],
},
],
plugins: [{ name: cors }],
}
- {
name: auth-v1,
url: 'http://localhost:9999/',
url: "http://localhost:9999/",
routes: [{ name: auth-v1, strip_path: true, paths: [/auth/v1/] }],
plugins: [{ name: cors }, { name: key-auth, config: { hide_credentials: false } }],
plugins:
[
{ name: cors },
{ name: key-auth, config: { hide_credentials: false } },
],
}
- {
name: rest-v1-admin,
url: 'http://localhost:3001/',
routes: [{ name: rest-admin-v1, strip_path: true, paths: [/rest-admin/v1/] }],
plugins: [{ name: cors }, { name: key-auth, config: { hide_credentials: true } }],
url: "http://localhost:3001/",
routes:
[{ name: rest-admin-v1, strip_path: true, paths: [/rest-admin/v1/] }],
plugins:
[
{ name: cors },
{ name: key-auth, config: { hide_credentials: true } },
],
}
- {
name: rest-v1,
url: 'http://localhost:3000/',
url: "http://localhost:3000/",
routes: [{ name: rest-v1, strip_path: true, paths: [/rest/v1/] }],
plugins: [{ name: cors }, { name: key-auth, config: { hide_credentials: true } }],
plugins:
[
{ name: cors },
{ name: key-auth, config: { hide_credentials: true } },
],
}
- {
name: graphql-v1,
url: 'http://localhost:3000/rpc/graphql',
url: "http://localhost:3000/rpc/graphql",
routes: [{ name: graphql-v1, strip_path: true, paths: [/graphql/v1] }],
plugins:
[
Expand All @@ -61,28 +109,57 @@ services:
}
- {
name: admin-v1,
url: 'https://localhost:8085/',
url: "https://localhost:8085/",
routes: [{ name: admin-v1, strip_path: true, paths: [/admin/v1/] }],
plugins: [{ name: cors }, { name: key-auth, config: { hide_credentials: false } }],
plugins:
[
{ name: cors },
{ name: key-auth, config: { hide_credentials: false } },
],
}
- {
name: admin-v1-user-routes,
url: 'https://localhost:8085/privileged',
routes: [{ name: admin-v1-user-routes, strip_path: true, paths: [/customer/v1/privileged] }],
plugins: [{ name: cors }, { name: basic-auth, config: { hide_credentials: false } }],
url: "https://localhost:8085/privileged",
routes:
[
{
name: admin-v1-user-routes,
strip_path: true,
paths: [/customer/v1/privileged],
},
],
plugins:
[
{ name: cors },
{ name: basic-auth, config: { hide_credentials: false } },
],
}
- {
name: admin-v1-metrics,
url: 'https://localhost:8085/metrics/aggregated',
routes: [{ name: admin-v1-metrics, strip_path: true, paths: [/supabase-internal/metrics] }],
plugins: [{ name: cors }, { name: ip-restriction, config: { allow: [10.0.0.0/8] } }],
url: "https://localhost:8085/metrics/aggregated",
routes:
[
{
name: admin-v1-metrics,
strip_path: true,
paths: [/supabase-internal/metrics],
},
],
plugins:
[
{ name: cors },
{ name: ip-restriction, config: { allow: [10.0.0.0/8] } },
],
}
consumers:
- { username: anon-key, keyauth_credentials: [{ key: anon_key }] }
- { username: service_role-key, keyauth_credentials: [{ key: service_key }] }
- { username: supabase-admin-key, keyauth_credentials: [{ key: supabase_admin_key }] }
- {
username: supabase-admin-key,
keyauth_credentials: [{ key: supabase_admin_key }],
}
basicauth_credentials:
- consumer: service_role-key
username: 'service_role'
username: "service_role"
password: service_key
plugins: []
Loading