Re: User privileges in web database applications

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: User privileges in web database applications
Дата
Msg-id 20060629123950.GA1388@surnet.cl
обсуждение исходный текст
Ответ на User privileges in web database applications  (Antonis Christofides <anthony@itia.ntua.gr>)
Список pgsql-general
Antonis Christofides wrote:

> But I think that checking user privileges at the database level is
> better.  I think it's simpler and more secure, and if later you also
> want to create nonweb apps, you won't have any more
> authentication/privilege headaches.  For this reason, in a web app
> I've made, the app connects to the database as user postgres, and
> after authenticating (receives user's password, checks with pg_shadow,
> and uses session cookie) uses "set session authorization" in order to
> lower its privileges.

What stops the user code from issuing a "RESET SESSION AUTHORIZATION"
command, say from a SQL injection, thus regaining superuser privileges?

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Strange Behavior with Serializable Transcations
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Strange Behavior with Serializable Transcations