From: Мазлов Владимир <vlmazlov@yandex.ru>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Access control on the read replica
Date: Tue, 21 Apr 2020 15:47:46 +0300
Message-ID: <246721587473077@mail.yandex.ru> (raw)
<div><div><div><div><div><div><div><div><div>Hi,</div><div> </div><div>What I've been trying to do: write a web app that, upon receiving a request, automatically gets a DB connection with only the permissions it needs. In order to do that I'd like to create a mechanism for dynamically granting a role a set of permissions necessary for the given request and then revoking them (alternatively, we could pre-create a number of roles for each set of permissions but I'd like to avoid that solution, as it's very incovenient).</div><div> </div><div>There are a number of solutions to this problem: you could use triggers/views, you could use security definer functions to grant/revoke permissions for a pool of roles. None of the solutions I've been able to come up with work on connections to the standby.</div><div> </div><div>Does anything I've stated above strike you as obviously wrong? If not, do you perhaps have any ideas on how this problem could be tackled?</div><div> </div><div>I would very much appreciate any ideas.</div><div> </div><div>Cheers,</div><div>Vladimir</div></div></div></div></div></div></div></div></div>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: vlmazlov@yandex.ru
Subject: Re: Access control on the read replica
In-Reply-To: <246721587473077@mail.yandex.ru>
References: <246721587473077@mail.yandex.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox