Skip to content

Commit 4f5dd18

Browse files
authored
Apply suggestions from code review
Co-authored-by: Van To <40007119+VanMSFT@users.noreply.github.com>
1 parent d027bd7 commit 4f5dd18

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

docs/t-sql/statements/execute-as-transact-sql.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ If the user is orphaned (the associated login no longer exists), and the user wa
118118
> [!CAUTION]
119119
> The EXECUTE AS statement can succeed as long as the [!INCLUDE[ssDE](../../includes/ssde-md.md)] can resolve the name. If a domain user exists, Windows might be able to resolve the user for the [!INCLUDE[ssDE](../../includes/ssde-md.md)], even though the Windows user does not have access to [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. This can lead to a condition where a login with no access to [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] appears to be logged in, though the impersonated login would only have the permissions granted to public or guest.
120120
121-
## Security Considerations
121+
## Security considerations
122+
122123
Executing under the dbo ownership context, for example by using the statement `EXECUTE AS USER = 'dbo'`, changes how explicit DENY permissions are evaluated. When you switch the execution context to the dbo ownership context, permission-based DENY restrictions that apply to the original calling principal aren't enforced for the duration of the impersonation. As a result, a principal that can switch execution context to dbo, for example through membership in the db_owner fixed database role, can perform actions that would otherwise be blocked by explicit DENY permissions applied to that principal.
123124

124125
This behavior is by design. Take it into account when you grant permissions that allow ownership impersonation. DENY permissions can't serve as a compensating control to limit the effective permissions of principals that can execute as dbo.

0 commit comments

Comments
 (0)