Re: User Management, drop users

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sven Sporer <s(dot)sporer(at)gmx(dot)net>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: User Management, drop users
Date: 2007-01-14 20:11:55
Message-ID: 12933.1168805515@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Sven Sporer <s(dot)sporer(at)gmx(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Adam Radłowski 2007-01-15 04:15:27 Re: Pg_dump postgreSQL 8.1.3-1 and win2k
Previous Message Sven Sporer 2007-01-14 20:00:19 User Management, drop users