Free Programming Books
Free download ebooks on computer and programming | |||
Free Ebook ".NET Security" Sample Chapter
.NET Security
Download chapter
Free Download Chapter 5: Role Access Security When you use .NET to create client-and server-side applications, you have to address a new and large set of security issues. .NET Security shows you what you need to know by covering different aspects of the .NET security model through detailed discussions about the key namespaces. The authors demonstrate how to write .NET code to create secure systems within the .NET Framework. They also discuss possible break-ins to the security model in .NET-and how .NET prevents such intrusions. This tutorial explains how to use the .NET security and cryptographic classes, and functions as a reference manual for developers seeking to understand security implementation in the .NET Framework. Additionally, the .NET Framework requires understanding in many new areas like managed code, permissions, and evidence-all of which this dynamic book covers. Role Access SecurityIN THIS CHAPTER, you'll investigate how to use Role Access Security (RAS) to protect resources. You'll study the definitions that are found in .NET and how they work. Finally, you'll learn about impersonation and how it works in .NET. Let's start by looking at the .NET types that are used in RAS from a coding perspective. Using .NET Class DefinitionsAll of the .NET class definitions types are in the System.Security.Principal namespace, and all can be found in the mscorlib assembly. Some classes define what identities and principals there are along with their relationship to each other. Other classes exist that help in defining how identities and principals are established for the current thread of execution. In this section, I'll cover the basics of these classes. Let's start by looking at the definition of an identity in .NET. IIdentity InterfaceThe IIdentity interface is used to define information about a user. Typically, that user is running the current code, although there's no requirement that a class that implements this interface has to relate to the underlying OS user. IIdentity defines three read-only properties:
.NET supplies the four following implementations of IIdentity:
| |||