From f89126e6181c4499aaca7e5bfe3a1664ffbaaeab Mon Sep 17 00:00:00 2001 From: Jorge Lisa <64639359+AcquaDiGiorgio@users.noreply.github.com> Date: Tue, 24 Sep 2024 13:08:59 +0200 Subject: [PATCH] fix: Add needed priviliges to postgres sequences --- diracx/templates/diracx/diracx-postgresql-init-dbs.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/diracx/templates/diracx/diracx-postgresql-init-dbs.yaml b/diracx/templates/diracx/diracx-postgresql-init-dbs.yaml index d3d9872..3463285 100644 --- a/diracx/templates/diracx/diracx-postgresql-init-dbs.yaml +++ b/diracx/templates/diracx/diracx-postgresql-init-dbs.yaml @@ -21,6 +21,13 @@ data: ON TABLES TO "{{ $.Values.postgresql.auth.username }}"; + ALTER DEFAULT PRIVILEGES + FOR USER postgres + IN SCHEMA public + GRANT USAGE + ON SEQUENCES + TO "{{ $.Values.postgresql.auth.username }}"; + GRANT CONNECT, TEMPORARY ON DATABASE "{{ $dbName }}" TO "{{ $.Values.postgresql.auth.username }}";