pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ron <ronljohnsonjr@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Postgres limitation in user management
Date: Sat, 04 Nov 2023 18:46:13 -0400
Message-ID: <3529057.1699137973@sss.pgh.pa.us> (raw)
In-Reply-To: <9faf2c18-5029-4d77-a937-ece6d25f9678@gmail.com>
References: <SJ0PR03MB6304FF2873FD903C710CE8C283A5A@SJ0PR03MB6304.namprd03.prod.outlook.com>
	<20231104213303.4mtgamfyo4v5i33e@hjp.at>
	<SY4PR01MB7076F7F028CE147EC66F918DA1A4A@SY4PR01MB7076.ausprd01.prod.outlook.com>
	<20231104215321.ojqhqo346bbsistg@hjp.at>
	<9faf2c18-5029-4d77-a937-ece6d25f9678@gmail.com>

Ron <ronljohnsonjr@gmail.com> writes:
> On 11/4/23 16:53, Peter J. Holzer wrote:
>> This doesn't answer the question why ALTER TABLE privilege would be
>> required.

> I bet the Good Idea Fairy whispered something into the CISO's ear.

Yeah.  This is blatantly obviously the brainchild of some person
with no actual experience in fulfilling the roles they want to
circumscribe.

Having said that, maybe:

* Role foo_owner actually owns the tables, but revokes its own
DML privileges (select etc)

* Role foo_app is granted foo_owner so it can do DDL on the
tables, and is also granted DML privileges on the tables

* Role foo_dba is granted foo_owner but not DML privileges.

This is, of course, trivially breakable by any foo_dba who
doesn't want to play by the rules, but as long as you log
DDL there will at least be log traces that she did so.

			regards, tom lane





view thread (8+ messages)

Message-ID: <3529057.1699137973@sss.pgh.pa.us>
Permalink:  ../3529057.1699137973@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3529057.1699137973@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, ronljohnsonjr@gmail.com
  Subject: Re: Postgres limitation in user management
  In-Reply-To: <3529057.1699137973@sss.pgh.pa.us>
  References: <SJ0PR03MB6304FF2873FD903C710CE8C283A5A@SJ0PR03MB6304.namprd03.prod.outlook.com> <20231104213303.4mtgamfyo4v5i33e@hjp.at> <SY4PR01MB7076F7F028CE147EC66F918DA1A4A@SY4PR01MB7076.ausprd01.prod.outlook.com> <20231104215321.ojqhqo346bbsistg@hjp.at> <9faf2c18-5029-4d77-a937-ece6d25f9678@gmail.com> <3529057.1699137973@sss.pgh.pa.us>

* 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