Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


DB permissions on basis of application


DB permissions on basis of application

Author
Message
henriettewhite
henriettewhite
SSC Rookie
SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)

Group: General Forum Members
Points: 32 Visits: 676
Hi

A few users who has access to a database via a windows group which has modify rights, now also need to be able to access the database via SSMS but then only with read only rights. I therefor need to differentiate the rights on basis of the app they access the database with. Since the app has been running for a while and is not that easy to change, I have to come up with a way to prevent them from doing updates while working in SSMS.

Is there a way to do this? I am currently looking into whether it would be possible to use a SSMS application role in combination with a login trigger which executes sp_setapprole when the user logs in with SSMS.

Are there other ways to do this?
And if not, am I on the right track? I have very little experience in working and managing application roles and have no idea whether my idea would work.

Thanks in advance



crmitchell
crmitchell
SSC-Addicted
SSC-Addicted (450 reputation)SSC-Addicted (450 reputation)SSC-Addicted (450 reputation)SSC-Addicted (450 reputation)SSC-Addicted (450 reputation)SSC-Addicted (450 reputation)SSC-Addicted (450 reputation)SSC-Addicted (450 reputation)

Group: General Forum Members
Points: 450 Visits: 1707
I would suggest you set the user's permissions based upon the access they require when connecting via SSMS.

When they connect via some other application you can have that application connect using an application specific account and set the SQL permissions for that account accordingly or alternatively if the application calls stored procs you could have those stored procs run as a more privileged account and grant the user EXECUTE rights to the specific stored proc.
The former will be easier to implement but if you need to track who the actual users are that funcionality would need to be built in to the application. The latter if properly implemented should be more secure.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search