From: Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
To: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: AW: Postgres Enhancement Request
Date: Wed, 20 Mar 2019 11:51:51 +0000
Message-ID: <644dba7f10da4f20b2ed412dc7ea7cd0@zuerich.ch> (raw)
In-Reply-To: <49902029-5742-00ba-85bd-fd0ba0b7d5f3@gmx.net>
References: <de9a4bb5fc70414caa68330aef5f843b@zuerich.ch>
<49902029-5742-00ba-85bd-fd0ba0b7d5f3@gmx.net>
We already did and use this at the moment. Unfortunately.
Some out-of-the-box applications can't use functions for user management.
Some users don't want "special" functions for user management.
...
Markus
-----Ursprüngliche Nachricht-----
Von: Thomas Kellerer <spam_eater@gmx.net>
Gesendet: Mittwoch, 20. März 2019 11:45
An: pgsql-general@lists.postgresql.org
Betreff: Re: Postgres Enhancement Request
Zwettler Markus (OIZ) schrieb am 20.03.2019 um 11:10:
> CREATEROLE allows users to create new roles also having the CREATEDB privilege (at least in version 9.6).
>
> We want special users to be able to CREATEROLE without being able to CREATEDB (eg. when usermanagement is done by the application itself).
>
> Please prevent users with CREATEROLE to create roles having CREATEDB (analogous SUPERUSER and REPLICATION).
I agree that would be a welcome enhancement.
As a workaround, you can create a function owned by a superuser (or any other user with the "createrole" privilege) using "security definer" that provides a simple "create user" capability and makes sure that the created user does not have the createdb privilege.
The user/role that should be able to create new roles doesn't need the createrole privilege at all then.
All it needs is the execute privilege on the function.
Thomas
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: Markus.Zwettler@zuerich.ch, spam_eater@gmx.net
Subject: Re: Postgres Enhancement Request
In-Reply-To: <644dba7f10da4f20b2ed412dc7ea7cd0@zuerich.ch>
References: <de9a4bb5fc70414caa68330aef5f843b@zuerich.ch> <49902029-5742-00ba-85bd-fd0ba0b7d5f3@gmx.net> <644dba7f10da4f20b2ed412dc7ea7cd0@zuerich.ch>
* 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