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 13: Building Secure Remoted Components 353PerimeterFirewallOptionalFirewall<strong>Web</strong> Server<strong>Application</strong> ServerHTTPASP. NETTcpChannelCustom HostObjectTrust BoundaryIPSecFigure 13.3Remoting in a trusted server scenarioFor more information about IPSec, see “How To: Use IPSec” in the “How To” sectionof this guide.TcpChannel ConsiderationsIf you use a custom executable host <strong>and</strong> the TcpChannel, <strong>and</strong> you cannot rely on anupstream <strong>Web</strong> application to perform client authentication <strong>and</strong> authorization, youhave to develop your own authentication <strong>and</strong> authorization solutions.As part of a custom solution you might decide to pass principal objects as methodparameters or in the call context. You should only do so in a trusted environment toprevent malicious client-side code from creating an IPrincipal object with elevatedroles <strong>and</strong> then sending it to your server. Your server implementation must be able totrust IPrincipal objects before using them for role-based authorization.An alternative approach is to use the underlying services of the <strong>Security</strong> SupportProvider Interface (SSPI). For more information about this approach, see MSDNarticle, “.NET Remoting <strong>Security</strong> Solution, Part 1: Microsoft.Samples.<strong>Security</strong>.SSPIAssembly,” at http://msdn.microsoft.com/library/en-us/dndotnet/html/remsspi.asp.To provide secure communication when you use the TcpChannel, use IPSec or acustom encryption channel sink to encrypt the request data.

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

Saved successfully!

Ooh no, something went wrong!