English 中文(简体)
Windows User Account that executes only IIS7 Provisions
原标题:
  • 时间:2009-11-11 01:19:18
  •  标签:
  • iis-7

I have a web application that executes IIS 7 provisions (using Microsoft.Web.Administration.dll) to create our web and ftp sites. When I run this using the administrator account, it works ok.

I want to create a Windows user account for impersonation that will only execute these web provisioning procedures without being identical to a server s administrator roles.

How can I achieve this?

最佳回答

You should split your application into three parts:

Windows Service

This would host a WCF or Remoting application. You want to put the code that requires privileged access to your system in here. For example creating and deleting websites. Run this service under an account that has enough rights to perform operations using Microsoft.Web.Administration.

Trusted Wrapper or Proxy Assembly

This is just a signed wrapper assembly that is installed in the GAC. Its role is to pass on calls from your low trust web application to perform privileged actions in the code running in the service above. Mark the assembly with the AllowPartiallyTrustedCallers attribute (if your server is configured for partial trust) and mark any classes that require access to the remoting service with [PermissionSet(SecurityAction.Assert, Unrestricted=true)].

Front End Application(or Web Service)

This is the interface to your application (whether it be a web application with a GUI or a web service). Run this in its own application pool with just enough rights to execute, for example IUSR or a similar account. Ideally you should also run this under partial trust.

Your web application/service references the Trusted Wrapper assembly in the GAC which in turn has a reference to the remoting or WCF application running in the windows service.

Using this layered approach means that you are locking down by gating access to specific privileged operations which only run in your windows service.

This approach is covered quite well in Appendix C of Dominick Baier s Developing More-Secure Microsoft ASP.NET 2.0 Applications . I thoroughly recommend getting a copy.

问题回答

暂无回答




相关问题
session transfer issue from Tomcat to ASP.Net

I am using Tomcat to host JSP and using IIS 7.0 to host aspx (C# + .Net 3.5 + VSTS 2008), and I have some session transfer issue from JSP page to ASPX page. JSP page is in one domain and all other ...

How to use appcmd to set debug=false in IIS7

I m trying to use APPCMD to set debug=false in web.config, per the documentation. The specific syntax I am using is: APPCMD SET CONFIG "SITE/VDIR" section:compilation /debug:False /commit:APP ...

Windows User Account that executes only IIS7 Provisions

I have a web application that executes IIS 7 provisions (using Microsoft.Web.Administration.dll) to create our web and ftp sites. When I run this using the administrator account, it works ok. I want ...

Could I get by HttpModule the URL that contains * before?

My web-site is working under ASP.NET 3.5, IIS7, Integrated pipiline mode. My HttpModule is getting request to all resources, including URLs like this: http://my-site.com/address And I would support *...

IIS 7 Http Handler development issue

I am using VSTS 2008 + C# + .Net 3.5 + IIS 7.0 to develop an ASP.Net web site. I want to develop an Http module, which could inspect whether incoming request has some specific http header (e.g. ...

热门标签