in reply to Re^3: Secure way to pass database connection info from mod_perl handler to CGI script
in thread Secure way to pass database connection info from mod_perl handler to CGI script
Preventing an attacker who has compromised my CGI scripts badly enough to execute arbitrary code from copying the database is exactly the point of a security-in-depth strategy.
Here's the design I'm working with: Apache will run in a chroot jail, with a Unix socket to the SQL server inside the chroot. The SQL server stores its binaries and all of its data outside Apache's chroot. The username and password to log in to the SQL database are sent by the user, and only allow access to this user's own data (implemented using PostgreSQL views).
In this configuration, I don't think that compromising the CGI script will allow the user to copy or delete the entire database (unless it's in conjunction with a kernel bug or an SQL server bug); he will be able to send arbitrary SQL commands to the database, but only with the permissions of the SQL user he's logged in as, which will prevent access to or destruction of data other than his own.
Do you see flaws in this design that I'm missing?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Secure way to pass database connection info from mod_perl handler to CGI script
by adrianh (Chancellor) on Aug 28, 2004 at 15:09 UTC | |
by sgifford (Prior) on Aug 28, 2004 at 17:32 UTC | |
by adrianh (Chancellor) on Sep 01, 2004 at 12:42 UTC | |
|
Re^5: Secure way to pass database connection info from mod_perl handler to CGI script
by perrin (Chancellor) on Aug 28, 2004 at 18:31 UTC |