Re: User Management, drop users

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: User Management, drop users
Дата
Msg-id 12933.1168805515@sss.pgh.pa.us
обсуждение исходный текст
Ответ на User Management, drop users  (Sven Sporer <s.sporer@gmx.net>)
Список pgsql-admin
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

В списке pgsql-admin по дате отправления:

Предыдущее
От: Sven Sporer
Дата:
Сообщение: User Management, drop users
Следующее
От: Adam Radłowski
Дата:
Сообщение: Re: Pg_dump postgreSQL 8.1.3-1 and win2k