To Be or To Impersonate, that is the Question

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default To Be or To Impersonate, that is the Question

    Alrighty, my continued foray into accessing network resources from the
    web server continues...

    When employees hit the intranet ASP.NET applications on our web
    servers (dev, test, prod), they may need access to network resources
    from those servers (like the network printer or another network
    share).

    We are not running Kerberos so that throws out IIS impersonation of
    the Windows user hitting the app. (<identity impersonate="true" /> in
    web.config).

    That leaves three options that I have found:
    1) In the web.config of each app: <identity impersonate="true"
    username="registry:HKLM\Software\HiddenCredential\ ASPNET_SETREG,userName"
    password="registry:HKLM\Software\HiddenCredential\ ASPNET_SETREG,password"
    />

    2) In the machine.config of each server: <identity impersonate="true"
    username="registry:HKLM\Software\HiddenCredential\ ASPNET_SETREG,userName"
    password="registry:HKLM\Software\HiddenCredential\ ASPNET_SETREG,password"
    />

    3) In the ProcessModel of machine.config using the registery pointers
    as above. If IIS 6, then the GUI Admin.

    Between option 2 & 3, which is the preferred method? The applications
    don't care, they'll get that user in either situation (unless they
    override identity in web.config).

    When I present these three options to the group I want to be able to
    tell them the pros and cons between 2 & 3 since they appear very
    similar on the surface. I think I understand that underneath option 2
    has the worker process imporsonating an identity while option 3 has
    the inetinfo.exe being the identity.

    Thanks,
    Gar
    Gary Bagen Guest

  2. Similar Questions and Discussions

    1. Impersonate + AD
      Hi, I've got a difficult situation... Is a website that runs on IIS with Anonymous Authentication, the tag <identity impersonate="false"> on the...
    2. Asp.net impersonate
      I don't think impersonation loads the user profile of the account being impersonated. If you think about it, that would make impersonation very...
    3. Impersonate with SSPLogonUser
      Hi! I've made a Web Service using C# that is using impersonation. The WS is working fine on WinXP and Win2003Server, but I'm having problem...
    4. DirectoryEntry Impersonate or WindowsIdentity Impersonate?
      Another security question. Our project interfaces with the Active Directory. To satisfy the security issues, we have a couple options when we talk...
    5. impersonate
      Hi all, I create a aspnet web app for my company. I set it up on a win2000 server with IIS5 as a intranet app. For security, I want to restrict...
  3. #2

    Default Re: To Be or To Impersonate, that is the Question

    With option 1, obviously web.config is easier to access for a malicious user
    than the machine.config (yes, you have the credentials encrypted, but it is
    still easier to find this 'clue' than with the machine.config) as the
    machine.config is locked down further using ACL's.

    The machine.config option affects ASP.NET globally though, so any other
    ASP.NET applications on the machine would also be affected.

    What about setting up a defined network user, with only minimum priveleges
    (to the printer and network share), and storing these credentials in the
    database, to use for you to programmatically impersonate. Just a thought.

    --
    - Paul Glavich


    "Gary Bagen" <garbage400@hotmail.com> wrote in message
    news:8b702e36.0403050921.ca7e364@posting.google.co m...
    > Alrighty, my continued foray into accessing network resources from the
    > web server continues...
    >
    > When employees hit the intranet ASP.NET applications on our web
    > servers (dev, test, prod), they may need access to network resources
    > from those servers (like the network printer or another network
    > share).
    >
    > We are not running Kerberos so that throws out IIS impersonation of
    > the Windows user hitting the app. (<identity impersonate="true" /> in
    > web.config).
    >
    > That leaves three options that I have found:
    > 1) In the web.config of each app: <identity impersonate="true"
    > username="registry:HKLM\Software\HiddenCredential\ ASPNET_SETREG,userName"
    > password="registry:HKLM\Software\HiddenCredential\ ASPNET_SETREG,password"
    > />
    >
    > 2) In the machine.config of each server: <identity impersonate="true"
    > username="registry:HKLM\Software\HiddenCredential\ ASPNET_SETREG,userName"
    > password="registry:HKLM\Software\HiddenCredential\ ASPNET_SETREG,password"
    > />
    >
    > 3) In the ProcessModel of machine.config using the registery pointers
    > as above. If IIS 6, then the GUI Admin.
    >
    > Between option 2 & 3, which is the preferred method? The applications
    > don't care, they'll get that user in either situation (unless they
    > override identity in web.config).
    >
    > When I present these three options to the group I want to be able to
    > tell them the pros and cons between 2 & 3 since they appear very
    > similar on the surface. I think I understand that underneath option 2
    > has the worker process imporsonating an identity while option 3 has
    > the inetinfo.exe being the identity.
    >
    > Thanks,
    > Gar

    Paul Glavich Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139