Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

DB permissions on basis of application Expand / Collapse
Author
Message
Posted Monday, April 22, 2013 5:41 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, November 11, 2014 6:01 AM
Points: 32, Visits: 585
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



Post #1444931
Posted Tuesday, April 23, 2013 4:43 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, November 18, 2014 7:18 AM
Points: 220, Visits: 887
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.
Post #1445352
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse