Skip to content

Commit 09a4e4e

Browse files
committed
feat: add supabase_etl_admin user
1 parent 9b278d5 commit 09a4e4e

File tree

5 files changed

+9
-2
lines changed

5 files changed

+9
-2
lines changed

ansible/files/postgresql_config/supautils.conf.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ supautils.extension_custom_scripts_path = '/etc/postgresql-custom/extension-cust
1111
supautils.privileged_extensions_superuser = 'supabase_admin'
1212
supautils.privileged_role = 'postgres'
1313
supautils.privileged_role_allowed_configs = 'auto_explain.*, log_lock_waits, log_min_duration_statement, log_min_messages, log_replication_commands, log_statement, log_temp_files, pg_net.batch_size, pg_net.ttl, pg_stat_statements.*, pgaudit.log, pgaudit.log_catalog, pgaudit.log_client, pgaudit.log_level, pgaudit.log_relation, pgaudit.log_rows, pgaudit.log_statement, pgaudit.log_statement_once, pgaudit.role, pgrst.*, plan_filter.*, safeupdate.enabled, session_replication_role, track_io_timing, wal_compression'
14-
supautils.reserved_memberships = 'pg_read_server_files, pg_write_server_files, pg_execute_server_program, supabase_admin, supabase_auth_admin, supabase_storage_admin, supabase_read_only_user, supabase_realtime_admin, supabase_replication_admin, dashboard_user, pgbouncer, authenticator'
15-
supautils.reserved_roles = 'supabase_admin, supabase_auth_admin, supabase_storage_admin, supabase_read_only_user, supabase_realtime_admin, supabase_replication_admin, dashboard_user, pgbouncer, service_role*, authenticator*, authenticated*, anon*'
14+
supautils.reserved_memberships = 'pg_read_server_files, pg_write_server_files, pg_execute_server_program, supabase_admin, supabase_auth_admin, supabase_storage_admin, supabase_read_only_user, supabase_realtime_admin, supabase_replication_admin, supabase_etl_admin, dashboard_user, pgbouncer, authenticator'
15+
supautils.reserved_roles = 'supabase_admin, supabase_auth_admin, supabase_storage_admin, supabase_read_only_user, supabase_realtime_admin, supabase_replication_admin, supabase_etl_admin, dashboard_user, pgbouncer, service_role*, authenticator*, authenticated*, anon*'

migrations/db/init-scripts/00000000000000-initial-schema.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ alter user supabase_admin with superuser createdb createrole replication bypass
1010
-- Supabase replication user
1111
create user supabase_replication_admin with login replication;
1212

13+
-- Supabase etl user
14+
create user supabase_etl_admin with login replication;
15+
1316
-- Supabase read-only user
1417
create role supabase_read_only_user with login bypassrls;
1518
grant pg_read_all_data to supabase_read_only_user;

nix/tests/expected/roles.out

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ order by rolname;
4646
service_role | f | f | f | t | f | f | -1 | t |
4747
supabase_admin | t | t | t | t | t | t | -1 | t |
4848
supabase_auth_admin | t | t | f | f | f | f | -1 | f |
49+
supabase_etl_admin | f | t | f | t | f | t | -1 | f |
4950
supabase_functions_admin | t | t | f | f | f | f | -1 | f |
5051
supabase_read_only_user | f | t | f | t | f | f | -1 | t |
5152
supabase_replication_admin | f | t | f | t | f | t | -1 | f |
@@ -85,6 +86,7 @@ order by rolname;
8586
service_role |
8687
supabase_admin | {"search_path=\"$user\", public, auth, extensions",log_statement=none}
8788
supabase_auth_admin | {search_path=auth,idle_in_transaction_session_timeout=60000,log_statement=none}
89+
supabase_etl_admin |
8890
supabase_functions_admin |
8991
supabase_read_only_user |
9092
supabase_replication_admin |

nix/tools/postgresql_schema.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ ALTER USER pgbouncer WITH PASSWORD 'postgres';
77
ALTER USER supabase_auth_admin WITH PASSWORD 'postgres';
88
ALTER USER supabase_storage_admin WITH PASSWORD 'postgres';
99
ALTER USER supabase_replication_admin WITH PASSWORD 'postgres';
10+
ALTER USER supabase_etl_admin WITH PASSWORD 'postgres';
1011
ALTER ROLE supabase_read_only_user WITH PASSWORD 'postgres';
1112
ALTER ROLE supabase_admin SET search_path TO "$user",public,auth,extensions;

testinfra/test_ami_nix.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
ALTER USER supabase_auth_admin WITH PASSWORD 'postgres';
3333
ALTER USER supabase_storage_admin WITH PASSWORD 'postgres';
3434
ALTER USER supabase_replication_admin WITH PASSWORD 'postgres';
35+
ALTER USER supabase_etl_admin WITH PASSWORD 'postgres';
3536
ALTER ROLE supabase_read_only_user WITH PASSWORD 'postgres';
3637
ALTER ROLE supabase_admin SET search_path TO "$user",public,auth,extensions;
3738
"""

0 commit comments

Comments
 (0)