Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / General / Security / October 2005

Tip: Looking for answers? Try searching our database.

simple security question (need refresher)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
djc - 05 Oct 2005 13:02 GMT
sql server 2000 sp3

sample scenario: 1 user called userA. A few tables and a few stored
procedures. SQL configured for mixed mode auth. userA is a windows account
added to the database. IIS 5 configured for integrated windows auth.

1) If userA has execute permission on the stored procedures that do the
actual inserting/updating/deleting does userA still have to have those
permissions assigned at the table level (insert/update/delete)?

2) what security context do stored procedures run under?

any input is greatly appreciated. Thanks.
Dan Guzman - 05 Oct 2005 14:00 GMT
If IIS is configured for anonymous access and you connect to SQL Server
using Windows authentication, the IIS anonymous account (e.g. IUSR_MYSERVER)
is used.  Database object access is limited to the permissions granted to
this account or roles that this account is a member of.  If the IIS security
context is established using Windows or Basic authentication, then the end
user's account (e.g. 'MyDomain\UserA') is used.  You can execute sp_who to
determine the actual account used for the connection.

Permissions are required only on objects directly accessed by the
application as long as the ownership chain is unbroken.  With an unbroken
chain (all objects owned by same user), permissions on indirectly referenced
objects are not checked.  Consequently, if all your objects are owned by
'dbo', only execute permissions on the procedures executed by the
application are needed.  Note that dynamic SQL within procs breaks the
ownership chain so this is considered direct object access for security
purposes.  See Ownership Chains in the Books Online for more information.

> 2) what security context do stored procedures run under?

Procs execute under the normal security context of the database connection.
However, as I previously mentioned, permissions are not checked when the
ownership chain is unbroken.

Signature

Hope this helps.

Dan Guzman
SQL Server MVP

> sql server 2000 sp3
>
[quoted text clipped - 9 lines]
>
> any input is greatly appreciated. Thanks.
djc - 05 Oct 2005 14:59 GMT
helps greatly! thank you.

> If IIS is configured for anonymous access and you connect to SQL Server
> using Windows authentication, the IIS anonymous account (e.g. IUSR_MYSERVER)
[quoted text clipped - 32 lines]
> >
> > any input is greatly appreciated. Thanks.
Dan Guzman - 05 Oct 2005 15:02 GMT
> helps greatly! thank you.

I'm glad I was able to help you out.

Signature

Dan Guzman
SQL Server MVP

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.