expiring passwords with impersonated identity

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

  1. #1

    Default expiring passwords with impersonated identity

    Hi all !

    Imagine ASP.NET application impersonating specific identity with webconfig:
    <identity impersonate="true" userName="accountname" password="password" />

    When accountname user is specially created to run this application and noone
    uses it for interactive logon, there is no standard way to change the
    password when it expires. This leads to ASP.NET application failing with
    code 500.

    There are 2 workarounds in this case that I came up to:
    1. Try impersonating the user in the code for each page, and if fails
    redirect to the page that gives the ability to change the password.
    2. Same as #1 but done only once - in default.aspx

    Question is: whith impersonation in default.aspx will the token be
    application wide - used for any other subseqent page request within this
    application, or it's scope is just a single page. Point is to reach
    application-wide impersonation with a piece of code rather than using
    webconfig.

    Sorry if this question has been asked previously, but I cannot find it.

    Thanks,
    Anton.


    Anton Sokolovsky Guest

  2. Similar Questions and Discussions

    1. expiring sessions
      I've seen a couple of questions regarding the expiring of sessions in PHP. The way to control how sessions expire is to set some options in...
    2. start process as impersonated account for NETSH DHCP?
      Am trying to automatically query and update DHCP servers via a web application with VB.NET. Testing with a privileged account, defined thus in...
    3. ASPNet Process Token flowing with Impersonated Identity
      I have a problem with a service-oriented application that is using impersonation. MachineA (Web Server) - Hosts webservices MachineB (App...
    4. Impersonated login to web service from outside domain
      I'm having trouble connecting to a web service through a web server, when using a client not part of the same domain as the servers. The setup is...
    5. Registry access permission doesn't obey impersonated user
      I have an asp.net application that impersonates a user. I did a test for reading a registry key and noticed that the app can read the key even...
  3. #2

    Default Solved - expiring passwords with impersonated identity

    1. Don't use imersonation in web.config
    2. In global.asax implement Application_PreRequestHandlerExecute with the
    code to impersonate required user
    3. If #2 fails and current loged in user has OS admin rights, redirect the
    user to the page where he is allowed to configure the application with new
    credentials.


    "Anton Sokolovsky" <anton@infopulse.com.ua> wrote in message
    news:cll7ks$ar0$1@relay.infopulse.com.ua...
    > Hi all !
    >
    > Imagine ASP.NET application impersonating specific identity with
    webconfig:
    > <identity impersonate="true" userName="accountname" password="password" />
    >
    > When accountname user is specially created to run this application and
    noone
    > uses it for interactive logon, there is no standard way to change the
    > password when it expires. This leads to ASP.NET application failing with
    > code 500.
    >
    > There are 2 workarounds in this case that I came up to:
    > 1. Try impersonating the user in the code for each page, and if fails
    > redirect to the page that gives the ability to change the password.
    > 2. Same as #1 but done only once - in default.aspx
    >
    > Question is: whith impersonation in default.aspx will the token be
    > application wide - used for any other subseqent page request within this
    > application, or it's scope is just a single page. Point is to reach
    > application-wide impersonation with a piece of code rather than using
    > webconfig.
    >
    > Sorry if this question has been asked previously, but I cannot find it.
    >
    > Thanks,
    > Anton.
    >
    >

    Anton Sokolovsky 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