Solved

Security for SQL and Web Connections

Posted on 2014-02-10
5
256 Views
Last Modified: 2014-02-12
I currently have a Public facing Web server that has multiple Web sites two of the Web sites need access to the SQL Database Server on my local network. Currently I have a firewall rule that allows the web server to communicate to the SQL Server through the SQL ports but this is managed by the IP addresses of the SQL Server and The Web Server. The problem with is the web server has access to the complete SQL Server on the ports open for SQL. Is there a way to have individual web sites only have access to individual database on the SQL SERVER?

Thanks
0
Comment
Question by:ahmad1467
5 Comments
 
LVL 5

Expert Comment

by:Leon Kammer
ID: 39848248
Hi,

Using SQL authentication, the individual databases can be locked down to a specific user.

Cheers

Leon
0
 
LVL 19

Expert Comment

by:Patricksr1972
ID: 39848249
Of course, they are called connection strings where you define a username/ password database etc.
This sql user only has rights to the database defined, nothing else.
0
 

Author Comment

by:ahmad1467
ID: 39848432
Thanks
 I under that I can lock down users to individual DB but I guess what I’m really looking for is to lock down Individual Websites to individual Databases.

Thanks
0
 
LVL 5

Assisted Solution

by:Leon Kammer
Leon Kammer earned 250 total points
ID: 39848445
Hi,

you can create a user, set the user's permissions in the DB, and then alter the connection string within the website to connect to the SQL server.

This is generally housed in the web.config file.
0
 
LVL 16

Accepted Solution

by:
Surendra Nath earned 250 total points
ID: 39851614
Yes, You can....

in order to accomplish this you have to create two SQL Logins
Let us say ABC, XYZ are the login names.....

Now for ABC assing the DB Reader role in the Database ABC_DB and remove the DBReader role in XYZ_DB....

and do viceversa for XYZ.... this will accomplish what you are looking for

you can use SP_dropRole, and SP_addRole inorder to accomplish this

http://technet.microsoft.com/en-us/library/ms189121.aspx
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now