mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
docs: init Realtime authz docs (#22803)
* chore: init Realtime authz docs * fix: some Vale fixes * fix: run Prettier * fix: Prettier * fix: add note to contact us with placeholder link * fix: swap rules for policies * fix: lots of changes * fix: update for latest Authz model * fix: nits * fix: more nits * fix: nit * edits * fix: remove realtime.channel names and fix `in` filters * fix: caps * fix: moar * fix: change h3 to h4 * fix: clarify interaction with postgres_changes * fix: added simple steps to enable * Update apps/docs/content/guides/realtime/authorization.mdx Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> * Update apps/docs/content/guides/realtime/authorization.mdx Co-authored-by: Wen Bo Xie <5532241+w3b6x9@users.noreply.github.com> * Update apps/docs/content/guides/realtime/authorization.mdx Co-authored-by: Wen Bo Xie <5532241+w3b6x9@users.noreply.github.com> * Update apps/docs/content/guides/realtime/authorization.mdx Co-authored-by: Wen Bo Xie <5532241+w3b6x9@users.noreply.github.com> * fix: add clarity to how it works * fix: `features` to `extensions` * fix: clarity * fix: spelling * fix: add detail about the test query. * updates * updates * updates * fix: update schema * fix: prettier * fix: rewrite section * fix: create tables sql * fix: shorten policy names --------- Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> Co-authored-by: Wen Bo Xie <5532241+w3b6x9@users.noreply.github.com> Co-authored-by: Wen Bo Xie <wenbo.xie3@gmail.com>
This commit is contained in:
4 files changed
+309
-18
No files matched your search
@@ -68,19 +68,19 @@ We have to set up RLS policies for the `public` schema tables we created in the
|
||||
> ⚠️ All the RLS policies here are meant for this demo. You may refer to them but make sure that your policies are tailored to your use case and secure your application.
|
||||
|
||||
```sql
|
||||
CREATE POLICY "authenticated users can view all profiles"
|
||||
CREATE POLICY "authenticated can view all profiles"
|
||||
ON "public"."profiles"
|
||||
AS PERMISSIVE FOR SELECT
|
||||
TO authenticated
|
||||
USING (true);
|
||||
|
||||
CREATE POLICY "supabase_auth_admin user can insert profile"
|
||||
CREATE POLICY "supabase_auth_admin can insert profile"
|
||||
ON "public"."profiles"
|
||||
AS PERMISSIVE FOR INSERT
|
||||
TO supabase_auth_admin
|
||||
WITH CHECK (true);
|
||||
|
||||
CREATE POLICY "authenticated users can read rooms"
|
||||
CREATE POLICY "authenticated can read rooms"
|
||||
ON "public"."rooms"
|
||||
AS PERMISSIVE FOR SELECT
|
||||
TO authenticated
|
||||
@@ -92,7 +92,7 @@ AS PERMISSIVE FOR INSERT
|
||||
TO authenticated
|
||||
WITH CHECK (TRUE);
|
||||
|
||||
CREATE POLICY "authenticated users can read rooms_users"
|
||||
CREATE POLICY "authenticated can read rooms_users"
|
||||
ON "public"."rooms_users"
|
||||
AS PERMISSIVE FOR SELECT
|
||||
TO authenticated
|
||||
@@ -104,7 +104,7 @@ AS PERMISSIVE FOR INSERT
|
||||
TO authenticated
|
||||
WITH CHECK (TRUE);
|
||||
|
||||
CREATE POLICY "authenticated user can read broadcast messages and presence state"
|
||||
CREATE POLICY "authenticated can read broadcast and presence state"
|
||||
ON "realtime"."messages"
|
||||
AS PERMISSIVE FOR SELECT
|
||||
TO authenticated
|
||||
@@ -118,7 +118,7 @@ USING (
|
||||
)
|
||||
);
|
||||
|
||||
CREATE POLICY "authenticated user can send broadcast messages and track presence"
|
||||
CREATE POLICY "authenticated can send broadcast and track presence"
|
||||
ON "realtime"."messages"
|
||||
AS PERMISSIVE FOR INSERT
|
||||
TO authenticated
|
||||
|
||||
Reference in new issue
Block a user