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.

Chapter 19: Securing Your ASP.NET <strong>Application</strong> <strong>and</strong> <strong>Web</strong> Services 563Configure the MachineKeyThe element defines the encryption algorithms that are used toencrypt the Forms authentication cookie. This element also maintains encryptionkeys. For more information, see the “MachineKey” section in this chapter.Use Unique Cookie Names <strong>and</strong> PathsUse unique name <strong>and</strong> path attribute values. By ensuring unique names, you preventproblems that can occur when you host multiple applications on the same server.AuthorizationUnless a user has explicit permission to access a resource, such as a particular <strong>Web</strong>page, a resource file, a directory, <strong>and</strong> so on, the configuration should deny access bydefault. ASP.NET provides two configurable gatekeepers that you can use to controlaccess to restricted resources. These are:● File Authorization. This gatekeeper is implemented by the ASP.NETFileAuthorizationModule HTTP module.●URL Authorization. This gatekeeper is implemented by the ASP.NETUrlAuthorizationModule HTTP module.File AuthorizationOnly applications that use Windows authentication <strong>and</strong> have the followingconfiguration can use this gatekeeper:This gatekeeper is automatically effective when you use Windows authentication,<strong>and</strong> there is no need to impersonate. To configure the gatekeeper, configure WindowsACLs on files <strong>and</strong> folders. Note that the gatekeeper only controls access to the filetypes mapped by IIS to the following ASP.NET ISAPI extension: Aspnet_isapi.dll.

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

Saved successfully!

Ooh no, something went wrong!