From: Julien Rouhaud <rjuju123@gmail.com>
To: Дмитрий Иванов <firstdismay@gmail.com>
Cc: Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: [Extern] Re: postgres event trigger workaround
Date: Sat, 15 Jan 2022 13:01:18 +0800
Message-ID: <20220115050118.prd2kkky3ezhaozn@jrouhaud> (raw)
In-Reply-To: <CAPL5KHqgPC-qvcbWQv=yHH5HF6r6jkrtEif1nVUsB6ZKNjWAwA@mail.gmail.com>
References: <c32ee50d6e3b4c58b08fccccf0ade41d@zuerich.ch>
<20220112125517.idglbczyiargb56f@jrouhaud>
<6b39241e48fe4f2b8d7f37a5df015536@zuerich.ch>
<20220114102355.755ir3gpo6mf7y4j@jrouhaud>
<CAPL5KHqgPC-qvcbWQv=yHH5HF6r6jkrtEif1nVUsB6ZKNjWAwA@mail.gmail.com>
Hi,
On Sat, Jan 15, 2022 at 08:36:21AM +0500, Дмитрий Иванов wrote:
> In my solution, all users don't need direct access to the schema because
> you have to use the functional API to access it. If you can manage users
> with functions, you can close the schema in the same way.
> Usually the function is executed with the permissions of the calling user,
> which requires permissions for all affected entities. However, if you
> specify the "SECURITY DEFINER" parameter at creation, the function will be
> executed with the owner's permissions. The owner of the function has no
> login permissions but has permissions on the affected entities. In this way
> you will close the schema from the roles that have rights to the role
> management functions.
Sure you can solve most problems with that. But you can't create a database
(or a tablespace) from a function so this approach wouldn't cover all of OP's
needs, as different approach would be needed for role and db creation.
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: rjuju123@gmail.com, firstdismay@gmail.com, Markus.Zwettler@zuerich.ch
Subject: Re: [Extern] Re: postgres event trigger workaround
In-Reply-To: <20220115050118.prd2kkky3ezhaozn@jrouhaud>
References: <c32ee50d6e3b4c58b08fccccf0ade41d@zuerich.ch> <20220112125517.idglbczyiargb56f@jrouhaud> <6b39241e48fe4f2b8d7f37a5df015536@zuerich.ch> <20220114102355.755ir3gpo6mf7y4j@jrouhaud> <CAPL5KHqgPC-qvcbWQv=yHH5HF6r6jkrtEif1nVUsB6ZKNjWAwA@mail.gmail.com> <20220115050118.prd2kkky3ezhaozn@jrouhaud>
* 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