Microsoft SQL Server 2005: The Complete Reference: Full Coverage of all New and Improved Features

A number of mechanisms are in place to secure resources and assemblies from unauthorized users, hostile code, and viruses. Here are the three basic security levels:

As a SQL Server CLR developer, you need to consider security on a number of levels. You need to determine how your code will run in the target environment, how it will resist attack, and how you can handle security exceptions that are raised when your code is blocked.

Note 

We don’t condone writing assemblies for malicious or hostile use, but nevertheless there are developers out there with less than amicable intent who will be reviewing the .NET security model to figure out how they can get assemblies onto the .NET runtime.

Tip 

You can protect your assemblies from invasion through the technique of strong naming or digital signing. If your assemblies are going to find their way into the public domain, it is recommended that you both sign and strongly name them. A strong name is a unique name that is generated from the contents of an assembly, such as version numbers, simple names, digital signatures, culture information, and so on.

You should fully investigate both strong-naming techniques and digital signing of the assembly-which is achieved through public key encryption technology via the services of a Public Key Infrastructure (PKI)-because most Chief Technical Officers (CTOs) are going to demand it, and because it is for your own protection.

Категории