title | description | author | ms.author | ms.date | ms.service | ms.subservice | ms.topic | helpviewer_keywords | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
CLR Integration Security |
SQL Server integration with the .NET Framework CLR security manages access between objects. Security checks performed on objects depend on the calls involved. |
rwestMSFT |
randolphwest |
12/27/2024 |
sql |
clr |
reference |
|
[!INCLUDE SQL Server]
The security model of the [!INCLUDE ssNoVersion] integration with the [!INCLUDE dnprdnshort] common language runtime (CLR) manages and secures access between different types of CLR and non-CLR objects running within [!INCLUDE ssNoVersion]. These objects can be called from a [!INCLUDE tsql] statement, or another CLR object running in the server. The calls between objects are referred to as links. The types of security checks performed on these objects depend on the types of links involved.
The CLR integration security model has the following goals:
-
By default, running managed user code on [!INCLUDE ssNoVersion] shouldn't compromise the integrity and stability of [!INCLUDE ssNoVersion]. Performing operations that potentially compromise the robustness of [!INCLUDE ssNoVersion] should be protected by appropriate high-level permissions.
-
Managed user code shouldn't gain unauthorized access to user data or other user code in the database. User-defined code should run under the security context of the user-session that invoked it, and with the correct privileges for that security context.
-
There should be controls for restricting user code from accessing any resources outside the server, using it strictly for local data access and computation.
-
User-defined code shouldn't be able to gain unauthorized access to system resources by virtue of running in the [!INCLUDE ssNoVersion] process.
[!INCLUDE ssNoVersion] now integrates the user-based security model of [!INCLUDE ssNoVersion] with the code access-based security model of the CLR. Some of the advantages of this combined approach to security are discussed in this section.
The following table lists the articles in this section.
Article | Description |
---|---|
CLR integration Code Access Security | Discusses the code access security (CAS) model for managed code |
Host protection attributes and CLR integration programming | Provides information about the host protection attribute (HPA) values that are disallowed in SAFE and EXTERNAL_ACCESS assemblies |
Impersonation and credentials for connections | Describes how pieces of user-code can call each other in [!INCLUDE ssNoVersion] |
Application Domains and CLR Integration Security | Describes how assemblies are loaded into application domains |