Hello everyone,
I am not sure whether it is possible to setup a security policy like this with store procedure. The user account foo could only access database through store procedure, not possible to do other operations, like select/update on the tables of the database directly without using the store procedure.
My store procedure is doing some select/update job. My confusion is, as the user needs to use the store procedure and the store procedure is doing select/update job, then I have to grant the user to have select/update privilege of the database tables? Then the user could skip using the store procedure and select/update database tables directly which causes a security hole. My purpose is to let user use store procedure all the time, no walk around to access database without using store procedure.
Any advice to solve my probleme?
thanks in advance,
George
George GeorgePosted Dec 26, 2008, 10:30 PM
Thanks Ryan!
I am not sure whether your configuration could meet with my requirement. My requirement is, I want to have a low privilege user and open the user to some 3rd party and then the 3rd party could only use the specific user to do some low privilege operations, like execute a specific store procedure and no access to direct write statement in ADO.Net to connect to my database and query the table. Any comments or ideas?
regards,
George
George GeorgePosted Dec 26, 2008, 10:26 PM
Thanks Sreenivas,
I have tested your idea. But met with a issue.
I created a new user which is using SQL Server authentication type. The user default database is AdventureWorks. I grant the user rights of execute one store procedure of AdventureWorks (the store procedure is used to query some specific table) and denied the select rights of the user to select the specific table directly (using table, permission, deny select permission in management sonsole).
But when I tried to use the user to login the management console (in order to test with execution of the store procedure and the select statement), I met with the following error when click login from management console. Do you have any ideas why?
TITLE: Connect to Server
------------------------------
Cannot connect to ..
------------------------------
ADDITIONAL INFORMATION:
A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=233&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
regards,
George
Ryan AlfordPosted Dec 26, 2008, 9:21 PM
George GeorgePosted Dec 26, 2008, 9:11 PM
Thanks Ryan!
I am using SQL Server 2005 on Windows Server 2003. Do you have any advice?
regards,
George
Ryan AlfordPosted Dec 26, 2008, 10:37 AM
Sreenivas ChinniPosted Dec 26, 2008, 7:23 AM