Write access to web.config

From: Dominick Baier (dotnet_at_leastprivilege.com)
Date: 12/24/04

  • Next message: Ken Cox [Microsoft MVP]: "Re: Write access to web.config"
    To: microsoft.public.dotnet.framework.aspnet.security
    Date: Fri, 24 Dec 2004 04:01:09 -0800
    
    

    in short : don't do it

     or..

     it is not a good choice to modify web.config because

     - your opening up to all kind of other security issues if your worker process has write access to web.config (thats a defense in depth measure) - then you have to be VERY shure that the rest of your app is based on rock-solid code

     - your asp.net app will restart everytime you modify web.config

     if you really want to modify web.config - refactor out that code - package it in a serviced component (com+) and give this component a seperate identity which is allowed to modify web.config -

     but my suggestion would be :

     there is an event in the http pipeline of asp.net that's specifically made for this purpose - AuthorizeRequest - there you can plug in your code to programmatically decide who is authorized or not (from an alternate data store like an xml file or db)

     don't mess with web.config (and its dacls) !

     

     ---
     Dominick Baier - DevelopMentor
     http://www.leastprivilege.com

       nntp://news.microsoft.com/microsoft.public.dotnet.framework.aspnet.security/<0DFAA11D-A929-4BD0-9548-0EDEF6805E84@microsoft.com>

     What are the security risks to grant ASP.NET user write access to web.config?
     I am working on a project in which I am required to update web.config at the
     runtime, basically modifying access to different directories.
     
     Any suggestion will be greatly appreciated.
     
     Thanks
     
     [microsoft.public.dotnet.framework.aspnet.security]


  • Next message: Ken Cox [Microsoft MVP]: "Re: Write access to web.config"

    Relevant Pages

    • Re: EXCEL should let me establish unlimited numbers of columns.
      ... The forthcoming Excel 12 will include 1,048,576 rows by 16,384 columns. ... LIMITED NUMBER OF 256 COLUMNS THAT IT IS IMPOSSIBLE FOR ME TO MODIFY. ... This post is a suggestion for Microsoft, ...
      (microsoft.public.excel.misc)
    • Re: How to set the default color for fill in functon?
      ... Excel cannot change the default fill color of hte fill color icon on the ... "Dave Peterson" wrote: ... Do you have any suggestion on how to modify ...
      (microsoft.public.excel.misc)
    • Re: Active Directory and DNS Server issues
      ... file right after I restart the netlogon services? ... I've got some suggestion to modify the registry so that dynamic updates ...
      (microsoft.public.windows.server.migration)
    • Re: Text Parsing
      ... I think I will modify my suggestion. ... I wouldn't concede this point too quickly... ... the OP's original statement was.. ...
      (microsoft.public.excel)
    • Re: Delete a directory and its contents
      ... To add to David's suggestion here is a function that might do what you want if you don't want to use the shell function. ... You could modify this function to get any kind of resolution you want. ... Could I avoid iterating through all its contents and delete each one? ...
      (microsoft.public.vc.mfc)