Summary

Creating a security policy for code-based security includes combining evidence, code groups, permissions, and security policy levels. The evidence is the information revealed about an assembly. Code groups use evidence to categorize assemblies and grant permissions. Through a process of unions of the code groups and intersections of security policy levels, a security policy is applied to an assembly.

Assemblies can request permissions at load time and runtime. Imperative requests are made in code, and declarative requests are made with C# attributes.

Role-based security includes native Windows and Generic request mechanisms. The native Windows Principal and Identity objects interoperate with the operating system to provide role and identity ...

Get C# Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.