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.

160 Part III: Building Secure <strong>Web</strong> <strong>Application</strong>sTable 7.1 compares the features of strong names <strong>and</strong> Authenticode signatures.Table 7.1 A Comparison of Strong Names <strong>and</strong> Authenticode SignaturesFeature Strong Name AuthenticodeUnique identification ofassemblyYesNoUnique identification ofpublisherThe public key of the publishercan be revokedNot necessarily.Depends on assembly developer usinga public key to represent the publisherNoYesYesVersioning Yes NoNamespace <strong>and</strong> type nameuniquenessIntegrity (checks assembly hasnot been tampered with)Evidence used as input to CASpolicyUser input required for trustdecisionYesYesYesNoNoYesIE host — YesASP.NET host — NoYes (pop-up dialog box)AuthorizationThere are two types of authorization that you can use in your assemblies to controlaccess to classes <strong>and</strong> class members:● Role-based authorization to authorize access based on user identity <strong>and</strong>role-membership. When you use role-based authorization in assemblies that arepart of an ASP.NET <strong>Web</strong> application or <strong>Web</strong> service, you authorize the identitythat is represented by an IPrincipal object attached to the current <strong>Web</strong> request <strong>and</strong>available through Thread.CurrentPrincipal <strong>and</strong> HttpContext.Current.User. Thisidentity is either the authenticated end user identity or the anonymous Internetuser identity. For more information about using principal-based authorization in<strong>Web</strong> applications, see “Authorization” in Chapter 10, “Building Secure ASP.NETPages <strong>and</strong> Controls.”● Code access security to authorize calling code, based on evidence, such asan assembly’s strong name or location. For more information, see the“Authorization” section in Chapter 8, “Code Access <strong>Security</strong> in Practice.”

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

Saved successfully!

Ooh no, something went wrong!