views:

49

answers:

3

Hi all

In our database we have an SQL server account that has the correct roles to access some of the databases. All of our PC and Servers are in domain using Windows Account. Now there is ASP.NET web application, we want the users in the domain to browser some data in the sql server. But we do not want to grant direct permission to every person, so is it possible to connect to sql server and run some T-SQL without granting permission to users using one specify account?

Best Regards,

A: 

Create views (or stored procedures) and lock them down to a custom role. Place those users you want to have access in a domain group, and place that group in the custom role.

Overview of SQL Server security model and security best practices

Mitch Wheat
But sometimes,the users need update some records in the sql.
Yongwei Xing
what sql? what do you mean?
Mitch Wheat
Sorry for being unclear.The view is only for view, sometimes, the users also need update or delete the record in sql server.
Yongwei Xing
views can be updatable (depending on what they contain in their definition)
Mitch Wheat
A: 

well, if the asp.net is inside the domain on the intranet, then you can create a GROUP in AD, and tie that to an account with the appropriate permissions in SQL Server. Then, turn off anonymous access on the ASP.NEt application, and have it go to town.

Stephen Wrighton
Does it mean that I can not use a specify account to instead of users' account to connect to the sql server?
Yongwei Xing
Stephen Wrighton
A: 

You can look at Security Account Delegation (aka passthrough authentication) to enable the NT logon token to be passed to SQL

Google search... there is a lot of good stuff, probably better than one specific link

gbn