Who am I impersonating?

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

  1. #1

    Default Who am I impersonating?

    Is there a way I can get the user of the identity I will be
    impersonating to get network resources?

    I know WindowsIdentity.GetCurrent().Name for the person coming into
    the ASP.NET app but I want to do some testing of different
    combinations of impersonating based on Anon, Windows Auth, and
    impersonate = true in web.config. So I am looking for the identity
    that will be used for the ASP.NET app to go to a network resource.

    thanks,
    Gar
    Gary Bagen Guest

  2. Similar Questions and Discussions

    1. ASP.Net not impersonating for WSE 2.0
      I have several web services that use WSE to authenticate calling users. I use a UsernameToken that validates the sent username and password against...
    2. ASP.Net not impersonating for WSE 2.0 AuthenticateToken method
      I have several web services that use WSE to authenticate calling users. I use a UsernameToken that validates the sent username and password against...
    3. HELP WITH IMPERSONATING
      Hi, I am a newbie at asp.net so I appreciate all of your help. I have a datagrid displaying unc_path's as a hyperlink to network shares. The...
    4. ASP.NET Impersonating a Certain User At Run time
      If you looking for a way to use Forms Authentication with Active Directory, following web site may be a worth reading as your start point. I'm...
    5. Need help with impersonating for GetCurrentProcess call.
      I am fairly new to ASP.NET, and am not sure about a problem that I am having and how to resolve it. My web page needs to make a call to...
  3. #2

    Default Re: Who am I impersonating?

    If the question is, "can I impersonate the caller in such a way that I can
    access network resources as that caller", then:

    If you are using integrated Windows authentication at the IIS level, the
    answer is "no", unless:
    * You enable Kerberos delegation for the account and the machines involved
    in the delegation, or
    * Your web browser is on the same machine as the web server.

    If you are using Basic authentication at the IIS level, the answer is "yes"
    if Basic auth is configured to use "interactive" logon. This is the default
    for IIS5. (I'm blanking all of a sudden as to whether it is the default for
    IIS6, but I think it isn't.)

    -- Aaron

    "Gary Bagen" <garbage400@hotmail.com> wrote in message
    news:8b702e36.0402261607.41a8b185@posting.google.c om...
    > Is there a way I can get the user of the identity I will be
    > impersonating to get network resources?
    >
    > I know WindowsIdentity.GetCurrent().Name for the person coming into
    > the ASP.NET app but I want to do some testing of different
    > combinations of impersonating based on Anon, Windows Auth, and
    > impersonate = true in web.config. So I am looking for the identity
    > that will be used for the ASP.NET app to go to a network resource.
    >
    > thanks,
    > Gar

    Aaron Margosis [MS] Guest

  4. #3

    Default Re: Who am I impersonating?

    Hi Aaron,

    I understand what you are describing, but I have done a poor job of
    asking the right question.

    For production, what we plan on doing is using the ProcessModel
    element of Machine.Config on the web servers to point to a registry
    location for username/password attributes which will use aspnetreg.exe
    for encryption.

    We want to test this out before making a final recommendation. So,
    with my ASP.NET temporary test app, I just wanted to display the name
    of the user the ASP.NET app will use to try and access network
    resources.

    Then I can show depending on how machine.config, web.config, IIS
    Anonymous and IIS Windows Authentication settings determine who will
    try and use network resources from the ASP.NET app. This is not
    something we will be doing in production.

    Thanks,
    Gar

    "Aaron Margosis [MS]" <aaron.margosis.ms@online.microsoft.com> wrote in message news:<#AwlUNQ$DHA.2012@TK2MSFTNGP11.phx.gbl>...
    > If the question is, "can I impersonate the caller in such a way that I can
    > access network resources as that caller", then:
    >
    > If you are using integrated Windows authentication at the IIS level, the
    > answer is "no", unless:
    > * You enable Kerberos delegation for the account and the machines involved
    > in the delegation, or
    > * Your web browser is on the same machine as the web server.
    >
    > If you are using Basic authentication at the IIS level, the answer is "yes"
    > if Basic auth is configured to use "interactive" logon. This is the default
    > for IIS5. (I'm blanking all of a sudden as to whether it is the default for
    > IIS6, but I think it isn't.)
    >
    > -- Aaron
    >
    > "Gary Bagen" <garbage400@hotmail.com> wrote in message
    > news:8b702e36.0402261607.41a8b185@posting.google.c om...
    > > Is there a way I can get the user of the identity I will be
    > > impersonating to get network resources?
    > >
    > > I know WindowsIdentity.GetCurrent().Name for the person coming into
    > > the ASP.NET app but I want to do some testing of different
    > > combinations of impersonating based on Anon, Windows Auth, and
    > > impersonate = true in web.config. So I am looking for the identity
    > > that will be used for the ASP.NET app to go to a network resource.
    > >
    > > thanks,
    > > Gar
    Gary Bagen Guest

  5. #4

    Default Re: Who am I impersonating?


    I've got a similar issue and I think I'm running into the same problem.
    I've got a ASPX Page on Server A. Web Service on Server B. I need to
    pass the Windows Creditials through Server A to Server B. I've set the
    Impersonate options, turned on Windows Auth. When I run IE from Server A
    everyhting works fine. Run it from anywhere else and I get Access
    Denied. Is this by design or am I doing something wrong?

    Thanks!
    Tim


    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Tim Thacker Guest

  6. #5

    Default Re: Who am I impersonating?

    Tim,

    This is by design (as Aaron described). To summarize, in a typical situation
    (integrated authentication), you cannot pass users credentials over one
    machine (i.e. from computer A (IE) through server B (ASPX) to server C (SQL
    Server/Web Service/etc)), unless you enable Kerberos/delegation on the
    network, which is generally not recommended for security reasons.

    Alek

    "Tim Thacker" <timthacker63@hotmail.com> wrote in message
    news:OptxOjX$DHA.624@TK2MSFTNGP11.phx.gbl...
    >
    > I've got a similar issue and I think I'm running into the same problem.
    > I've got a ASPX Page on Server A. Web Service on Server B. I need to
    > pass the Windows Creditials through Server A to Server B. I've set the
    > Impersonate options, turned on Windows Auth. When I run IE from Server A
    > everyhting works fine. Run it from anywhere else and I get Access
    > Denied. Is this by design or am I doing something wrong?
    >
    > Thanks!
    > Tim
    >
    >
    > *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!

    Alek Davis 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