Re: sa privileges and roles

From: Dan Guzman (guzmanda_at_nospam-online.sbcglobal.net)
Date: 10/15/04


Date: Fri, 15 Oct 2004 07:52:47 -0500

You can grant direct permissions to sp_OA* procs to non-sysadmin users but
you need to consider the security implications. The OS security context
will be the SQL Agent proxy account and users will be limited only by the
permissions of that account. The is nothing that will prevent users with
execute permissions to run ad-hoc commands.

Another option is to create a dbo-owned user proc in an sa-owned user
database that executes sp_OA* with only your needed application
functionality. The proc should be coded in such a way to prevent injection
of ad-hoc commands. You can then enable cross-database ownership chaining
in your user database and grant execute permissions only on your user proc.
Role members will be restricted to the functionality of the user procedure.

Note that you should enable cross-database chaining in an sa-owned database
when only sysadmin role members have permissions to create dbo-owned objects
in that database.

-- 
Hope this helps.
Dan Guzman
SQL Server MVP
"Pranav" <pranavr@hotmail.com> wrote in message 
news:e2c10da5.0410141956.1f4e776c@posting.google.com...
> Hi All,
> We have a security requirement that the user account used to connect
> to sql should not have sysadmin priv. Now, we peform operations in SQL
> that make use of things like
> sp_OACreate/sp_replicationdboption/sp_dropdevice etc.
> BOL says
> "Only members of the sysadmin fixed server role can execute
> sp_OACreate."
>
> What I want to do is create a role, give this role explicit execute
> permission on the specific sp_* and add my user account to this role
> (and revoke the sa privileges).
> Do you think this approach is ok? The concern raised was that the doc
> explicity asks for members of sysadmin. This is different from a
> statement like
>
> "Execute permissions default to members of the sysadmin and diskadmin
> fixed server roles."
>
> Thanks
> Pranav 


Relevant Pages

  • Re: user defined Role - HELP
    ... They should not need any permissions on the table - unless you are using ... dynamic SQL within the proc. ... are you using SQL 2000 or SQL 2005? ... SQL Server MVP ...
    (microsoft.public.sqlserver.security)
  • Re: SQL CE Synching Problems
    ... Have you granted IUSER_ServerName access to your publication within SQL ... It looks like the permissions problem is getting access to the publication. ... so the issue has to be between the server tools and the publisher. ... > A request to send data to the computer running IIS has failed. ...
    (microsoft.public.sqlserver.ce)
  • Re: Logging in irrespective of database access
    ... Sysadmin role members have full permissions, ... SQL Server MVP ... > My problem is that in the Login section of Enterprise Manger I have to> specify that each login has the System Admin ticked under Server Roles> because in SQL 2000 there doesn't seem to a Grant All permissions option> like there used to be in SQL 6.5. ... > What's the point in having the Database Access section if the System Admin> under Server Roles allows you to get into anything?. ...
    (microsoft.public.sqlserver.server)
  • Re: Logging in irrespective of database access
    ... Sysadmin role members have full permissions, ... SQL Server MVP ... > My problem is that in the Login section of Enterprise Manger I have to> specify that each login has the System Admin ticked under Server Roles> because in SQL 2000 there doesn't seem to a Grant All permissions option> like there used to be in SQL 6.5. ... > What's the point in having the Database Access section if the System Admin> under Server Roles allows you to get into anything?. ...
    (microsoft.public.sqlserver.server)
  • Re: Logging in irrespective of database access
    ... Sysadmin role members have full permissions, ... SQL Server MVP ... > My problem is that in the Login section of Enterprise Manger I have to> specify that each login has the System Admin ticked under Server Roles> because in SQL 2000 there doesn't seem to a Grant All permissions option> like there used to be in SQL 6.5. ... > What's the point in having the Database Access section if the System Admin> under Server Roles allows you to get into anything?. ...
    (microsoft.public.sqlserver.programming)