| From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
|---|---|
| To: | Antonis Christofides <anthony(at)itia(dot)ntua(dot)gr> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: User privileges in web database applications |
| Date: | 2006-06-29 12:39:50 |
| Message-ID: | 20060629123950.GA1388@surnet.cl |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Simon Riggs | 2006-06-29 12:43:10 | Re: Strange Behavior with Serializable Transcations |
| Previous Message | Martijn van Oosterhout | 2006-06-29 12:27:30 | Re: Strange Behavior with Serializable Transcations |