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.

104 Part II:Designing Secure <strong>Web</strong> <strong>Application</strong>sHave You Considered <strong>Web</strong> Farm Issues?If your application is going to be deployed in a <strong>Web</strong> farm, you can make noassumptions about which server in the farm will process client requests. Successiverequests from the same client may be served by separate servers. As a result, youneed to consider the following issues:● How are you managing session state?In a <strong>Web</strong> farm, you cannot manage session state on the <strong>Web</strong> server. Instead, yourdesign must incorporate a remote state store on a server that is accessed by all the<strong>Web</strong> servers in the farm. For more information, see “Session Management” later inthis chapter.● Are you using machine-specific encryption keys?If you plan to use encryption to encrypt data in a shared data source, such as adatabase, the encryption <strong>and</strong> decryption keys must be the same across allmachines in the farm. Check that your design does not require encryptionmechanisms that require machine affinity.● Are you using Forms authentication or protected view state?If so, you are reliant upon the settings. In a <strong>Web</strong> farm, you mustuse common key across all servers.● Are you using Secure Sockets Layer (SSL)?If you use SSL to encrypt the traffic between browser <strong>and</strong> <strong>Web</strong> server, where doyou terminate the SSL connection? Your options include the <strong>Web</strong> server, a <strong>Web</strong>server with an accelerator card, or a load balancer with an accelerator card.Terminating the SSL session at a load balancer with an accelerator card generallyoffers the best performance, particularly for sites with large numbers ofconnections.If you terminate SSL at the load balancer, network traffic is not encrypted from theload balancer to the <strong>Web</strong> server. This means that an attacker can potentially sniffnetwork traffic after the data is decrypted, while it is in transit between the loadbalancer <strong>and</strong> <strong>Web</strong> server. You can address this threat either by ensuring that the<strong>Web</strong> server environment is physically secured or by using transport-levelencryption provided by IPSec policies to protect internal data center links.What Trust Levels Does the Target Environment Support?The code access security trust level of the target environment determines theresources your code can access <strong>and</strong> the privileged operations it can perform. Checkthe supported trust level of your target environment. If your <strong>Web</strong> application isallowed to run with Full trust, your code can access any resources, subject tooperating system security.

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

Saved successfully!

Ooh no, something went wrong!