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 359AuthorizationWithin the context of .NET Framework remoting, you can apply authorization torestrict the ability of computers <strong>and</strong> users to access functionality exposed by yourremote objects. Use the following guidelines to ensure that you have an effectiveauthorization approach:● Use IPSec for machine level access control.●●●Enable file authorization for user access control.Authorize users with principal-based role checks.Consider limiting remote access.Use IPSec for Machine Level Access ControlYou can define an IPSec policy to ensure that only a nominated <strong>Web</strong> server or clusterof servers can connect to the application server that hosts your remote objects. Thissignificantly reduces the attack surface area.Enable File Authorization for User Access ControlIf your remote object is hosted by ASP.NET <strong>and</strong> uses Windows authentication, youcan configure Windows access control lists (ACLs) on the remoting endpoints toauthorize callers. ACLs are evaluated on a per-request basis by the ASP.NETFileAuthorizationModule. Under normal circumstances, a physical file representingyour remoting endpoints to which your clients connect does not exist. The request fora file with a .rem or .soap extension is sufficient for IIS to be able to route the requestbased on application mappings defined in the IIS Metabase, to the remotinginfrastructure in the appropriate ASP.NET application. To configure the ASP.NET FileAuthorizationModule for .NET Framework remoting1. Create a file with the same name as the value specified in the objectUri propertyin <strong>Web</strong>.config, for example, RemoteMath.rem, in the root of the application’svirtual directory.You can obtain the objectUri from the <strong>Web</strong>.config file used to configure the remoteobject on the server. Look for the element, as shown in thefollowing example:

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

Saved successfully!

Ooh no, something went wrong!