Jump to content

Recommended Posts

I am trying to create an application that uses three separate database users for their connection strings.

 

One for the public site, one for logged in users, and one for the administrative users.  The logic behind this is that limited permissions would be give to the public user for the mysql database, more permissions to the logged in users, and full control to the admins.  Hopefully this would limit the damage incurred if a sql injection was to be pulled off successfully and since it uses a particular user it would help isolate the injection point.  However, I am having some trouble putting this into action and wanted to know if anyone here had any suggestions for me or reasons why this shouldn't be done.

 

The way I see it I just need three separate config files to specify the different usernames and passwords but I'm not sure what the best way to integrate this into the code.  Could I just used some nested if...else statements or would it be best to use the switch case?  Any suggestions or insight into this matter would be much appreciated.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.