AW: Postgres Enhancement Request

From: "Zwettler Markus (OIZ)" <Markus(dot)Zwettler(at)zuerich(dot)ch>
To: Thomas Kellerer <spam_eater(at)gmx(dot)net>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: AW: Postgres Enhancement Request
Date: 2019-03-20 11:51:51
Message-ID: 644dba7f10da4f20b2ed412dc7ea7cd0@zuerich.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)gmx(dot)net>
Gesendet: Mittwoch, 20. März 2019 11:45
An: pgsql-general(at)lists(dot)postgresql(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Güttler 2019-03-20 12:20:57 Re: Performance of ByteA: ascii vs binary
Previous Message Radoslav Nedyalkov 2019-03-20 11:44:54 Re: subscription broken after upgrade to pg11