From: Tom Lane <tgl@sss.pgh.pa.us>
To: Sven Sporer <s.sporer@gmx.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: User Management, drop users
Date: Sun, 14 Jan 2007 15:11:55 -0500
Message-ID: <12933.1168805515@sss.pgh.pa.us> (raw)
In-Reply-To: <6A49A3F3-CF38-46F4-B994-044A75CDBE70@gmx.net>
References: <6A49A3F3-CF38-46F4-B994-044A75CDBE70@gmx.net>
Sven Sporer <s.sporer@gmx.net> writes:
> 2) How do you restrict the users of a specific database to touch only
> the objects in their database?
They *are* so restricted. Your problem is that roles are
installation-wide, not local to a particular database, and
so you cannot enforce the restriction you hope for: CREATEROLE
privilege is inherently to do with installation-wide actions.
A possible workaround is to ensure that every user owns at least
one object in "his" database -- table, function, whatever. Then
it's not possible to drop the user without having first gotten
into that database. (As of 8.1 or so --- this wasn't enforced
before that.) However a user with CREATEROLE can still cause all
sorts of mischief with ALTER USER, so preventing only the DROP case
probably isn't that helpful. Bottom line is you don't give out that
privilege to people you don't trust.
If you need better separation among groups of users, give them each
their own installation (postmaster).
regards, tom lane
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-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, s.sporer@gmx.net
Subject: Re: User Management, drop users
In-Reply-To: <12933.1168805515@sss.pgh.pa.us>
References: <6A49A3F3-CF38-46F4-B994-044A75CDBE70@gmx.net> <12933.1168805515@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