11.07.2015 Views

Improving Web Application Security: Threats and - CGISecurity

Improving Web Application Security: Threats and - CGISecurity

Improving Web Application Security: Threats and - CGISecurity

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

140 Part III: Building Secure <strong>Web</strong> <strong>Application</strong>sSystem.<strong>Web</strong>.<strong>Security</strong>Windows, Forms <strong>and</strong>Passport authenticationfor <strong>Web</strong> applicationsURL <strong>and</strong> FileauthorizationSystem.<strong>Security</strong><strong>Security</strong> ExceptionOther AttributesSystem.<strong>Security</strong>.PolicyCode-Based<strong>Security</strong>System.<strong>Security</strong>.CryptographyEncryptionDecryptionHashingR<strong>and</strong>om NumbersSystem.<strong>Security</strong>.PrincipalUser-Based<strong>Security</strong>System.<strong>Security</strong>.PermissionsCode-Based<strong>Security</strong>Figure 6.3.NET Framework security namespacesSystem.<strong>Security</strong>This namespace contains the CodeAccessPermission base class from which all othercode access permission types derive. You are unlikely to use the base class directly.You are more likely to use specific permission types that represent the rights of codeto access specific resource types or perform other privileged operations. For example,FileIOPermission represents the rights to perform file I/O, EventLogPermissionrepresents the rights for code to access the event log, <strong>and</strong> so on. For a full list of codeaccess permission types, see Table 6.2 later in this chapter.The System.<strong>Security</strong> namespace also contains classes that encapsulate permissionsets. These include the PermissionSet <strong>and</strong> NamedPermissionSet classes. The typesyou are most likely to use when building secure <strong>Web</strong> applications are:● <strong>Security</strong>Exception. The exception type used to represent security errors.● AllowPartiallyTrustedCallersAttribute. An assembly-level attribute used withstrong named assemblies that must support partial trust callers. Without thisattribute, a strong named assembly can only be called by full trust callers (callerswith unrestricted permissions.)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!