Wednesday, December 29, 2004

.NET Framework Security Model

.NET Security model has six major areas

1. Type Safety
2. code signing
3. Cryptographic services
4. Code Access Security
5. Role Base Security

Now let’s analyze each of them one by one

Type Safety
Type Safe Code means that code can only access those memory which it is authorize to access. For e.g. code cannot access private fields of other objects.
It does not mean that code can not call any native code. Code can call the native code if it has permissions which is generally given at a very high level and got Skip Verification Number. This type verification occurs during JIT compilation. Advantage of type safety is that multiple instance of the type safe code can execute in one process.

Code Signing -- Internet seems to be one of the foremost media of communication. As far as user is concerned, User always have a threat of malicious users. By means of code signing, we can ensure the authenticity and integrity of the code prior to downloading and running that code. Code signing works on Strong names


Data Signing and Encryption – Rather than sending the data in the Plain text, Now a days a data is been encrypted by using mathematical algorithm the resultant code is called Cipher text which is not easy to deduct. The encryption is generally done through the Hashing algorithm which convert the specify code length string to a fixed length byte also called hash. Decryption is a process of converting the Cipher text back to the Plain text.

Code Access Security -- Code Access Security ensures that System Administrator can set up their own security mechanism and give different trust level to different code based on their origin. If the required permissions of the assembly are not given by the system, your assembly will not run. So you are not always sure that your assembly will run on each computer. So while designing the assemblies, you should be aware about the system policies of the computer in which that assembly will run

Role Based Security -- It allows you to check the membership condition and the role associated with that user. Net Framework contains the classes which can check windows users and groups and implement authenticity

No comments: