
Security • Chapter 12 583
Role-Based Security Checks
Having discussed the creation and manipulation of PrincipalObject, it is time to take
a look at how they can assist you in performing role-based security checks. Here is
where PrincipalPermission, already mentioned in the beginning of the section “Role-
Base Security,” comes into play. Using PrincipalPermission, you can make checks on
the active principal object, be it the WindowsPrincipal or the GenericPrincipal.The
active principal object can be one you created to perform a one-time check, or it
can be the principal you bound to the thread. Like the code access permissions, the
PrincipalPermission ...