Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > Databasing
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 04-30-2008, 02:02 PM
  #1
panther786
Aspirant (Level 2)
 
Join Date: Apr 2008
Posts: 12
iTrader: (0)
panther786 is an unknown quantity at this point
1 user 2 databases

I recently got a new hosting server and I realized that I only have one user (unless I pay extra) that can create a few databases ... they did not try to cheat me it was written there all along but I did not notice it ... anyway I believe its a good hosting company for the money .... will see ...

My question is: how would you protect one database from the other if the user that manipulates them is the same ? is there a trick to accomplish such a thing ?
__________________
Bookmark-submitter pro
panther786 is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 04-30-2008, 03:19 PM
  #2
putts
Don't call it a comeback.
 
putts's Avatar
 
Join Date: Nov 2002
Location: Frankenmuth, MI
Posts: 4,685
iTrader: (0)
putts will become famous soon enough
You only have one user that has access to create databases, but do you have the power to create new users that do not have DBO type powers?

If so, create one for each database and make sure they only have read/write access to their database.

If not, then I don't think so.

Can I ask why it matters anyways? It's not like people at your site are going to know the login being used to access the database. What is the requirement behind making sure a user connected to DB1 can't change things on DB2?

Users typically aren't the security risk.....it's the people behind the users. In your world, you're the person behind any/all logins on those databases so as long as you can trust yourself......I think you'll be fine
__________________


Dont like my signature image? Click it to change it
putts is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 04-30-2008, 06:42 PM
  #3
Vege
♥♥♥
 
Vege's Avatar
 
Join Date: Sep 2004
Location: Finland
Posts: 2,381
iTrader: (0)
Vege will become famous soon enough
well, personally i do like to make for example admin/normal users to webapp and give the user just the specific grants he needs.
Thats just not possible in shared hosting usually so with sql injection people could get away with some nasty things.
Vege is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 05-02-2008, 01:37 PM
  #4
putts
Don't call it a comeback.
 
putts's Avatar
 
Join Date: Nov 2002
Location: Frankenmuth, MI
Posts: 4,685
iTrader: (0)
putts will become famous soon enough
yeah, it is nice to have users that have "just enough" access but, as you said, in shared hosting it's just not usually available. My experience is that it's just best to code against those kind of attacks. Makes your code more mobile which means that you are able to shop around at more hosts because you're not limited by what your code requires.

I have gone so far down that road that I have a set of functions where I pass in certain parameters (one of which is the sql server type currently being used..... ms sql, my sql are the only ones I've built around so far) and the functions build the sql statements I need for the action I want.

Selects, Updates, Deletes, Create Tables, etc. Now, if I ever switch servers, I just migrate over my database tables with data, switch one global variable and I don't have to change any of my code to work with the new database.

Obviously, that's a bit over the top for most, but it's a good mindset to have when you are not hosting your own stuff and want to be able to go after the best deals available to you.
__________________


Dont like my signature image? Click it to change it

Last edited by putts : 05-02-2008 at 01:40 PM.
putts is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Reply
« Previous Thread | Next Thread »


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 02:00 PM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.