Skip to content

Commit cae0c5e

Browse files
committed
Merge remote-tracking branch 'origin' into INDATA-152
* origin: feat: update supautils (#1879)
2 parents 2a0b3c3 + 1deb6f2 commit cae0c5e

File tree

5 files changed

+14
-7
lines changed

5 files changed

+14
-7
lines changed

ansible/files/postgresql_config/conf.d/supautils.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
session_preload_libraries = 'supautils'
22

3+
supautils.disable_program = 'true'
4+
35
supautils.drop_trigger_grants = '{"postgres":["auth.audit_log_entries","auth.flow_state","auth.identities","auth.instances","auth.mfa_amr_claims","auth.mfa_challenges","auth.mfa_factors","auth.oauth_clients","auth.one_time_tokens","auth.refresh_tokens","auth.saml_providers","auth.saml_relay_states","auth.sessions","auth.sso_domains","auth.sso_providers","auth.users","realtime.messages","realtime.subscription","storage.buckets","storage.buckets_analytics","storage.objects","storage.prefixes","storage.s3_multipart_uploads","storage.s3_multipart_uploads_parts"]}'
46

57
supautils.extension_custom_scripts_path = '/etc/postgresql-custom/extension-custom-scripts'
@@ -28,5 +30,3 @@ supautils.privileged_role_allowed_configs = 'auto_explain.*, log_lock_waits, log
2830
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'
2931

3032
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*'
31-
32-

ansible/vars.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ postgres_major:
1010

1111
# Full version strings for each major version
1212
postgres_release:
13-
postgresorioledb-17: "17.5.1.055-orioledb"
14-
postgres17: "17.6.1.034"
15-
postgres15: "15.14.1.034"
13+
postgresorioledb-17: "17.5.1.056-orioledb"
14+
postgres17: "17.6.1.035"
15+
postgres15: "15.14.1.035"
1616

1717
# Non Postgres Extensions
1818
pgbouncer_release: 1.19.0

nix/ext/supautils.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77

88
stdenv.mkDerivation rec {
99
pname = "supautils";
10-
version = "3.0.0";
10+
version = "3.0.2";
1111

1212
buildInputs = [ postgresql ];
1313

1414
src = fetchFromGitHub {
1515
owner = "supabase";
1616
repo = pname;
1717
rev = "refs/tags/v${version}";
18-
hash = "sha256-EKKjNZQf7HwP/MxpHoPtbEtwXk+wO241GoXVcXpDMFs=";
18+
hash = "sha256-WTLZShBFVgb18vVi15TSZvtJrNUFgQa6mBkavvRSoUE=";
1919
};
2020

2121
installPhase = ''

nix/tests/expected/security.out

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,7 @@ order by 1,2;
3131
vault | update_secret
3232
(20 rows)
3333

34+
-- supautils disables copy ... program
35+
copy (select '') to program 'id';
36+
ERROR: COPY TO/FROM PROGRAM not allowed
37+
DETAIL: The copy to/from program utility statement is disabled

nix/tests/sql/security.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ from pg_catalog.pg_proc p
77
where p.proowner = (select oid from pg_catalog.pg_roles where rolname = 'supabase_admin')
88
and p.prosecdef = true
99
order by 1,2;
10+
11+
-- supautils disables copy ... program
12+
copy (select '') to program 'id';

0 commit comments

Comments
 (0)