Skip to content

Commit

Permalink
rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
mats16 committed Nov 18, 2023
1 parent 2bb1c63 commit 4bb4129
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
10 changes: 2 additions & 8 deletions src/supabase-db/sql/init-for-rds/00-postgres-user.sql
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
-- default superuser
-- postgres user for developers
CREATE USER postgres WITH LOGIN;
GRANT rds_replication TO postgres;

-- Supabase super admin
create user supabase_admin;
alter user supabase_admin with createdb createrole bypassrls;
grant supabase_admin to postgres;
grant rds_superuser to supabase_admin; -- for RDS
grant rds_replication to supabase_admin; -- for RDS
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
create publication supabase_realtime;

-- Supabase super admin
-- create user supabase_admin;
-- alter user supabase_admin with superuser createdb createrole replication bypassrls;
-- create user supabase_admin; -- supabase_admin is rds_superuser.
alter user supabase_admin with createdb createrole bypassrls;
grant rds_replication to supabase_admin; -- for RDS

-- Supabase replication user
create user supabase_replication_admin with login;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ GRANT USAGE ON SCHEMA auth TO anon, authenticated, service_role;

-- Supabase super admin
CREATE USER supabase_auth_admin NOINHERIT CREATEROLE LOGIN NOREPLICATION;
grant supabase_auth_admin to postgres; -- RDS
GRANT ALL PRIVILEGES ON SCHEMA auth TO supabase_auth_admin;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA auth TO supabase_auth_admin;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA auth TO supabase_auth_admin;
Expand Down

0 comments on commit 4bb4129

Please sign in to comment.