Re: Column Level Permissions Security Issue



Ross Nornes (RossNornes@xxxxxxxxxxxxxxxxxxxxxxxxx) writes:
All objects are owned by DBO.

I'm hoping I just have a huge laps in my understanding here, but, if a
role is granted SELECT rights as in "GRANT SELECT TO RWE", then a DENY
is placed on a table or column, it should not matter how the table is
called, the deny should be enforced. Since the deny works if I hit table
directly with a SELECT * FROM [TableNameHere], why would a view, proc,
function or anything else not obey the deny permission? This seems to be
a HUGE hold in basic security enforcement unless I'm totally missing how
this works.

When working with security in SQL Server it's imperative to understand
how ownership chaining works. I have an article that among other things
discusses ownership chaining: http://www.sommarskog.se/dynamic_sql.html.

There are also topics in Books Online that are good reading

If this is true, shops like my shop that need to allow developers read
access to their databases but also need to not allow them access to
secure files like credit card numbers, we are going to have to code
review ever single view, proc, function, etc, thats being moved out
since those appear to not obey the deny permissions.

My thought is that since these views and procedures expose this
sensitive data, there are users who have permission to access this
data. I don't know how you grant permission to users, but I would
expect you to be very restrictive with giving permissions to views
and procs that expose sensitive data. And unless you are very
restrictive with granting access to the database as a whole, you would
need to have in place a mechanism where you determine whether a view
or procedure is only for a chosen few or for the general masses.


If you are on SQL 2005, and you think ownership chaining gets in the
way, you can transfer ownership of the objects to a different user.
But that is likely to have repercussions not only for the developers,
but also the users of the system.

--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • Re: Dts execution and the public role
    ... A DENY overrules the allow. ... When a permission is denied from a SQL Server user or Windows NT user ... If a permission is denied from a SQL Server role or a Windows NT ... > 3.- I assign permissions in the msdb DB to this user, ...
    (microsoft.public.sqlserver.dts)
  • Re: Unable to prevent OU deletion by Domain Admins?
    ... > that DENY ACLs trump any allow ACLs ... Deny permissions take precedence over allow ... the list of permission entries in the DACL. ... I understand that domain admins have the delete and delete subtree rights at the domain level. ...
    (microsoft.public.win2000.active_directory)
  • Re: Unable to prevent OU deletion by Domain Admins?
    ... >> that DENY ACLs trump any allow ACLs ... Deny permissions take precedence over allow ... > the list of permission entries in the DACL. ... > You could modify the default domain admins permissions so that they no ...
    (microsoft.public.win2000.active_directory)
  • Re: Unable to prevent OU deletion by Domain Admins?
    ... This posting is provided "AS IS" with no warranties, and confers no rights. ... >>>> It is even worse when Microsoft's own guidelines for parsing ACLs ... >>>> that DENY ACLs trump any allow ACLs ... >>> the list of permission entries in the DACL. ...
    (microsoft.public.win2000.active_directory)
  • Re: Joining Computers to Domain
    ... >>immediately indicate if you have a DENY somewhere. ... >>> is some permission that is blocking it. ... >>> Our problem is with student admins. ... >>> add computers to the domain. ...
    (microsoft.public.windows.group_policy)