Re: deny users from accessing server from Management Studio
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Fri, 9 Nov 2007 11:56:50 +0000 (UTC)
Audrey Ng (odd26uk@xxxxxxxxxxx) writes:
I have the same problem. Through an MS-Access application (with back-end
SQL 2005), users can select, insert and update. However, I don't want
them to have the same ability in Management Studio.
Erland, you mentioned
"There are ways to implement application to avoid this, for instance
using stored procedures. There are also application roles, and you can
use proxy logins."
Can you elaborate on what type of stored procedures?
No special type. The point is that you do not give users right to access
the tables directly. Instead you write stored procedures for the task
and grant users right to execute the procedures. The important point is
that the procedures must be owned by the same user that also owns the table.
Commonly all objects in a database are owner by dbo.
Note that if the users are able to find the stored procedures, they can
still run them from Mgmt Studio.
I also read up on application roles and it seems that that may be be the
way to go.
Keep in mind that application roles can never be safe in a two-tier
application. The application must somehow find the password for the
application role and send it to SQL Server. And if the application can
find it, the user can find it.
In fact, what are some of the best practices in this situation where
users can select, insert and update in one application BUT does have the
ability in other applications?
I think the safest way is to use a three-tier application with a proxy
login. That is, the middle tier connects to SQL Server with a proxy login,
and the users do not have any direct access to SQL Server. If it's
necessary to know who's who, this can be handled with EXECUTE AS or
context info.
I have an article on my web sites where I discuss these topics in more
detail, you may be interested: http://www.sommarskog.se/grantperm.html.
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.
- Follow-Ups:
- Re: deny users from accessing server from Management Studio
- From: Audrey Ng
- Re: deny users from accessing server from Management Studio
- References:
- Re: deny users from accessing server from Management Studio
- From: Audrey Ng
- Re: deny users from accessing server from Management Studio
- Prev by Date: Re: guideline for service account user
- Next by Date: Re: deny users from accessing server from Management Studio
- Previous by thread: Re: deny users from accessing server from Management Studio
- Next by thread: Re: deny users from accessing server from Management Studio
- Index(es):
Relevant Pages
|
|