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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 20: Hosting Multiple <strong>Web</strong> <strong>Application</strong>s 599To configure impersonation at the application level, use an element inthe application’s <strong>Web</strong>.config file as shown below.4. Configure NTFS permissions for each account to ensure that each account hasaccess only to the appropriate file system files <strong>and</strong> folders, <strong>and</strong> no access to criticalresources such as operating system tools.For more information about configuring NTFS permissions for the anonymousaccount, see Chapter 16, “Securing Your <strong>Web</strong> Server.”Note On Windows 2000 <strong>and</strong> the .NET Framework version 1.0, if you impersonate a fixed identity byusing the above configuration, you must grant the “Act as part of the operating system” privilege tothe ASP.NET process account used to run your <strong>Web</strong> applications. This is contrary to the principle ofleast privilege. You are recommended to upgrade to the .NET Framework version 1.1 where this is nolonger a requirement.Isolating <strong>Application</strong>s with <strong>Application</strong> PoolsIf your applications run on Windows Server 2003, you can use application pools <strong>and</strong>configure each application to run in its own worker process that provides processlevelisolation. By default, all applications run in a default application pool. Withapplication pools, you can configure each process to run using a separate identity<strong>and</strong>, as a result, you do not need to use impersonation. To provide process level isolation1. Create a set of new Windows accounts, one per application to run each workerprocess instance.2. Configure NTFS permissions for each account to ensure that each account only hasaccess to the appropriate file system files <strong>and</strong> folders, <strong>and</strong> cannot access criticalresources such as operating system tools.For more information about configuring NTFS permissions for the anonymousaccount, see Chapter 16, “Securing Your <strong>Web</strong> Server.”3. Disable <strong>Web</strong> application impersonation.You can do this in Machine.config or <strong>Web</strong>.config. To disable impersonation formultiple applications in Machine.config, place elements inside elements as shown below.

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

Saved successfully!

Ooh no, something went wrong!