Re: Unauthorized users can see db schema and read functions

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Unauthorized users can see db schema and read functions
Дата
Msg-id 45BF11FD.6080408@archonet.com
обсуждение исходный текст
Ответ на Unauthorized users can see db schema and read functions  ("Willy-Bas Loos" <willybas@gmail.com>)
Список pgsql-general
Willy-Bas Loos wrote:
> Hi,
>
> I've noticed that any user who can logon to a db cluster can read the
> schema
> of all databases in it, including the code of all plpgsql functions.
> Even in
> schema's he/she doesn't have access to.
[snip]
> o  Why is schema information not restricted?
> o  Is there any way to prevent this, other than starting another cluster
> for
> this user's database

The short answer is "because it's always been this way".

The long answer is that users are per-cluster not per-database. So, they
need a certain amount of access to the system tables just to connect and
do anything. Now, in some cases there are views over the system tables
that provide restricted access (compare pg_user to pg_shadow) but they
aren't everywhere.

However, you can use pg_hba.conf to restrict access to a database entirely.

--
   Richard Huxton
   Archonet Ltd

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

Предыдущее
От: "Joris Dobbelsteen"
Дата:
Сообщение: Re: Unauthorized users can see db schema and read functions
Следующее
От: Jorge Godoy
Дата:
Сообщение: Re: PostgreSQL 9.0