@@ -62,9 +62,8 @@ ORDER BY object_name, grantee, privilege_type;
6262 schema | object_name | grantee | privilege_type
6363-----------+-------------+----------------+----------------
6464 pgbouncer | get_auth | pgbouncer | EXECUTE
65- pgbouncer | get_auth | postgres | EXECUTE
6665 pgbouncer | get_auth | supabase_admin | EXECUTE
67- (3 rows)
66+ (2 rows)
6867
6968-- Ensure that pgbouncer.get_auth() function does not return an expired password
7069create role test_expired_user_password with login password 'expired_password' valid until '2000-01-01 00:00:00+00';
@@ -85,21 +84,17 @@ select pgbouncer.get_auth('test_valid_user_password');
8584
8685-- Test pgbouncer.get_auth is executable by the pgbouncer user
8786set role pgbouncer;
88- select pgbouncer.get_auth('test_expired_user_password ');
89- get_auth
90- -------------------------------
91- (test_expired_user_password, )
87+ select pgbouncer.get_auth('test_valid_user_password ');
88+ get_auth
89+ ----------------------------------------------------------------------------------------------
90+ (test_valid_user_password,SCRAM-SHA-256$4096:testsaltbase64$storedkeybase64$serverkeybase64 )
9291(1 row)
9392
9493reset role;
9594-- and not other non-superusers
9695set role postgres;
97- select pgbouncer.get_auth('test_expired_user_password');
98- get_auth
99- -------------------------------
100- (test_expired_user_password,)
101- (1 row)
102-
96+ select pgbouncer.get_auth('test_valid_user_password');
97+ ERROR: permission denied for function get_auth
10398reset role;
10499drop role test_expired_user_password;
105100drop role test_valid_user_password;
0 commit comments