Separation of public and private data on the web
August 28, 2007 3:12 PM
Subscribe
How to do separation of public and private data on the web with PHP/MySQL? I'm creating a website for a business, with 2 sections - public and admin (staff). The admin section is secured with .htaccess and is intended to be used by office staff to enter customer requirements as they come in, and edit product listings. However, I worry about the security and suspect there is probably a better way.
The intent is that customers can browse the website to get our latest information, that staff can use the website like an app and use it to add/edit/remove products and enter inbound customer enquiries.
This means there would be some data in the db that we wouldn't necessarily want to be public. With sql injection and such to worry about, I turn to the hive for advice. I'm not so worried about maximum security from theoretical attacks (it's not that important), but certainly would like to cover my bases w.r.t. realistic security threats.
It's currently a paper based office, and information is seriously in need of some centralised consolidation - which is why I'm trying to do it using one interface which does a lot of simple but useful things automatically. It's web based because I don't have the GUI skills to program a custom app, and certainly not in Windows.
Two thoughts that occur are below, but other suggestions are more than welcome as I'd really like to get this done!
Store private data in separate databases, with separate users. With the htaccess restriction on the staff side, would this provide enough security for most business needs? Would it work, and if so how much would it complicate the programming?
Keep private data off the web entirely, have the computer running XAMPP or something and a copy of the website (with staff pages). Set apache to deny all incoming connections etc. To update the public database, allow connections outbound to the hosted web server and allow only inbound connections from localhost and our IP on the host. (Or any other straightforward way to sync 2 databases in this situation.)
posted by BishopsLoveScifi to computers & internet (8 comments total)
6 users marked this as a favorite
posted by orthogonality at 3:19 PM on August 28, 2007