Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I run a PHP symfony-framework web app for my company and it uses a single database login for all connections, whether the user is an admin or a client.

I know that higher security systems often use different logins for different levels of users.

Whether or not a use a framework, is this a security feature I should make use of?

Does it matter if the application is web-based or if it's intranet based?

To clarify: Should I concern myself with creating a plugin for symfony to implement multiple db logins and should I do this for any other apps I create that are not based on a framework?

In case you're wondering, I'm using PHP5 and MySQL.

share|improve this question
1  
I'm not exactly sure what you're asking, but if it's just a separation between admin & other users, see my response about securing database passwords and just installing two copies of the software : dba.stackexchange.com/questions/94/securing-db-passwords/… –  Joe Jan 5 '11 at 16:37
    
@Joe i've clarified the question, should I concern myself with implementing multiple logins –  Patrick Jan 5 '11 at 18:02

2 Answers 2

up vote 4 down vote accepted

You typically have to weight the cost of doing so vs. the benefits ... but benefit in risk management is difficult to quantify.

Basically, it comes down to what the cost of an exploit would be, and what the likihood of it happening are.

So, having to restore from backup because someone managed to drop a table which creates a denial of service, and being down for a day has a cost to the company in terms of what profit they'd have made in that given time, but there's also an issue of reputation loss (ie, customers/users who stop doing business with you, or potential users who are less likely to do busines in the future) ... but we have to balance this by the likehood of someone successfully attacking the site and causing this.

If you're not storing credit cards, and you're not a big target (the type of site people would brag about taking out), you're less likely to be hacked ... although, if you're running commonly distributed software, you still risk attacks by script kiddies who are just looking for people running software with a known exploit.

...

What our security folks don't seem to understand is that it's a balancing act -- some changes for security will create a burden on your users. And sometimes, the security itself will cause outages (eg, one of our external partners moves IP ranges ... but the new holes in the firewall weren't made, and due to a "network hold" we can't get any changes made for over a week) or just performance degredation.

Sometimes it's just that it takes longer to code, or more headaches to maintain, etc.

But it's something you have to answer for yourself -- is the cost worth the benefit of having made the change? (and sometimes, if the cost is just in man-power, was there an opportunity cost; ie, could you have been doing something else that would derive even more benefit with your time?)

share|improve this answer

In ASP.NET/C# I could just choose a different connection string based on the user class (would mean a bit of overhead but not really that hard to do) and keep two connection strings in my config (or even build it on the fly based on other factors) so I would think that the same thing would be both reasonable and proper in MySQL.

Does this make any sense to you?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.