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

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ansible/files/postgresql_config/supautils.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ supautils.privileged_role = 'postgres'
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'
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'
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*'
supautils.disable_program = 'true'
6 changes: 3 additions & 3 deletions ansible/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ postgres_major:

# Full version strings for each major version
postgres_release:
postgresorioledb-17: "17.5.1.055-orioledb"
postgres17: "17.6.1.034"
postgres15: "15.14.1.034"
postgresorioledb-17: "17.5.1.056-orioledb"
postgres17: "17.6.1.035"
postgres15: "15.14.1.035"

# Non Postgres Extensions
pgbouncer_release: 1.19.0
Expand Down
4 changes: 2 additions & 2 deletions nix/ext/supautils.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@

stdenv.mkDerivation rec {
pname = "supautils";
version = "3.0.0";
version = "3.0.2";

buildInputs = [ postgresql ];

src = fetchFromGitHub {
owner = "supabase";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-EKKjNZQf7HwP/MxpHoPtbEtwXk+wO241GoXVcXpDMFs=";
hash = "sha256-WTLZShBFVgb18vVi15TSZvtJrNUFgQa6mBkavvRSoUE=";
};

installPhase = ''
Expand Down
4 changes: 4 additions & 0 deletions nix/tests/expected/security.out
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,7 @@ order by 1,2;
vault | update_secret
(20 rows)

-- supautils disables copy ... program
copy (select '') to program 'id';
ERROR: COPY TO/FROM PROGRAM not allowed
DETAIL: The copy to/from program utility statement is disabled
3 changes: 3 additions & 0 deletions nix/tests/sql/security.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ from pg_catalog.pg_proc p
where p.proowner = (select oid from pg_catalog.pg_roles where rolname = 'supabase_admin')
and p.prosecdef = true
order by 1,2;

-- supautils disables copy ... program
copy (select '') to program 'id';