Re: Query Analyzer Connect Option
From: Erland Sommarskog (sommar_at_algonet.se)
Date: 02/29/04
- Previous message: Erland Sommarskog: "Re: Get starting...."
- Maybe in reply to: Mary Chipman: "Re: Query Analyzer Connect Option"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 29 Feb 2004 23:10:01 +0000 (UTC)
David Greer (dgreer@nextcorp.com) writes:
> The situation is that I have several users on an application that
> controls their access to the DB. The user ID has full rights to the DB
> but the application stops them from making changes to data. Now I have
> a user that needs to be able to create and run SELECT statements in a
> “Query Analyser” type of environment. I can publish a Query Analyser
> session with locked credentials using Citrix, but I don’t want him to be
> able to use the File => Connect option to reconnect with one of the
> application Ids thus giving him full rights in an open environment.
So what you need to do is to redesign your application a bit. One
way to go would be to use appliction roles. In this case, the application
submits sp_setapprole to SQL Server, with the password for the role hidden
somewhere in app, preferably encrypted. The role has full access to
the database, but the users only have SELECT access. There a few gotchas
with application roles, one major is that it does not play well with
connection pooling.
Another way to go, is to have the application to perform all its access
through stored procedures. The procedures would be owned by dbo, and
EXEC access granted to the users. The user who needs to run queries on
his own can get SELECT access, but he will not be able to modify data.
While this is even more work than switching to application roles, this
is the normal way to lock down your database.
As Mary pointed out, giving users full access to the database, and
hoping that the application will shield them, is a security incident
waiting to happen.
-- Erland Sommarskog, SQL Server MVP, sommar@algonet.se Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
- Previous message: Erland Sommarskog: "Re: Get starting...."
- Maybe in reply to: Mary Chipman: "Re: Query Analyzer Connect Option"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|