impersonating windows authenticated user?

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

  1. #1

    Default impersonating windows authenticated user?

    I have a asp.net web application that i wrote for internal use in my
    company. The problem i'm having is being able to test the application as
    other users see it. The security for the asp.net app is Windows
    Authentication. I'd like to be able to (for testing purposes) impersonate
    another user so i can see things as they see them. I don't want to have to
    change all of my active directory permissions to match their permissions,
    that's not an option. Also, there is no way i can test certain features of
    the application without being logged in as some specific users. I'm sure i
    could do this if i wrote my own IsInRole method and passed in a username of
    my choice and an active directory group and then interfaced with active
    directory myself, but i was hoping there is an easier way that affects less
    existing code.

    Is there a way to stuff Page.User with an impersonated windows user? If so,
    how would i create a valid impersonated windows user?


    Thanks,
    Jamie


    Jamie Guest

  2. Similar Questions and Discussions

    1. HELP: ASP.NET Web Application, Impersonating User and Creating Threads via C++ COM Object
      Sorry for the long subject, but it summarizes my issue nicely. I have an ASP.NET application running ... it's a web app running under IIS. For...
    2. How to allow authenticated user to impersonate
      If you are running under W2000, you must add the "Act as part of the operating system" privilege to the account that will try to impersonate. On XP...
    3. 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...
    4. Can I force 401 error when user not authenticated?
      Currently I have succesfully implemented role-based folder security using roles and web.config in each folder. This works great - if a user is not...
    5. Terminating a authenticated user
      Hi, 1. How can I "terminate" an authenticated user? (I would like the server to redirect the user to the login page again. I'm using "forms...
  3. #2

    Default Re: impersonating windows authenticated user?

    Hi,

    Have you tried using IIS Basic Authentication? I think this is the fastest
    way of doing this.

    --
    Hernan de Lahitte
    Lagash Systems S.A.




    "Jamie" <spammerssuck@nospam.com> wrote in message
    news:eAQVohy7DHA.2644@TK2MSFTNGP11.phx.gbl...
    > I have a asp.net web application that i wrote for internal use in my
    > company. The problem i'm having is being able to test the application as
    > other users see it. The security for the asp.net app is Windows
    > Authentication. I'd like to be able to (for testing purposes) impersonate
    > another user so i can see things as they see them. I don't want to have
    to
    > change all of my active directory permissions to match their permissions,
    > that's not an option. Also, there is no way i can test certain features of
    > the application without being logged in as some specific users. I'm sure
    i
    > could do this if i wrote my own IsInRole method and passed in a username
    of
    > my choice and an active directory group and then interfaced with active
    > directory myself, but i was hoping there is an easier way that affects
    less
    > existing code.
    >
    > Is there a way to stuff Page.User with an impersonated windows user? If
    so,
    > how would i create a valid impersonated windows user?
    >
    >
    > Thanks,
    > Jamie
    >
    >

    Hernan de Lahitte Guest

  4. #3

    Default Re: impersonating windows authenticated user?

    Thanks for the suggestion. But that won't work. We need to use the more
    secure Windows Authentication.


    "Hernan de Lahitte" <hernan@lagash.com> wrote in message
    news:OwmVqF07DHA.488@TK2MSFTNGP12.phx.gbl...
    > Hi,
    >
    > Have you tried using IIS Basic Authentication? I think this is the fastest
    > way of doing this.
    >
    > --
    > Hernan de Lahitte
    > Lagash Systems S.A.
    >
    >
    >
    >
    > "Jamie" <spammerssuck@nospam.com> wrote in message
    > news:eAQVohy7DHA.2644@TK2MSFTNGP11.phx.gbl...
    > > I have a asp.net web application that i wrote for internal use in my
    > > company. The problem i'm having is being able to test the application as
    > > other users see it. The security for the asp.net app is Windows
    > > Authentication. I'd like to be able to (for testing purposes)
    impersonate
    > > another user so i can see things as they see them. I don't want to have
    > to
    > > change all of my active directory permissions to match their
    permissions,
    > > that's not an option. Also, there is no way i can test certain features
    of
    > > the application without being logged in as some specific users. I'm
    sure
    > i
    > > could do this if i wrote my own IsInRole method and passed in a username
    > of
    > > my choice and an active directory group and then interfaced with active
    > > directory myself, but i was hoping there is an easier way that affects
    > less
    > > existing code.
    > >
    > > Is there a way to stuff Page.User with an impersonated windows user? If
    > so,
    > > how would i create a valid impersonated windows user?
    > >
    > >
    > > Thanks,
    > > Jamie
    > >
    > >
    >
    >

    Jamie Guest

  5. #4

    Default Re: impersonating windows authenticated user?

    It is possible to change your IE settings so that Integrated authentication
    always prompts for credentials instead of just passing in the default
    credentials of the current user.

    Maybe that would help with your testing. You will still need to be able to
    get the credentials of different users to do testing. You need a user's
    credentials to create a token in Windows.

    Joe K.

    "Jamie" <spammerssuck@nospam.com> wrote in message
    news:%23rE$6J17DHA.1504@TK2MSFTNGP12.phx.gbl...
    > Thanks for the suggestion. But that won't work. We need to use the more
    > secure Windows Authentication.
    >
    >
    > "Hernan de Lahitte" <hernan@lagash.com> wrote in message
    > news:OwmVqF07DHA.488@TK2MSFTNGP12.phx.gbl...
    > > Hi,
    > >
    > > Have you tried using IIS Basic Authentication? I think this is the
    fastest
    > > way of doing this.
    > >
    > > --
    > > Hernan de Lahitte
    > > Lagash Systems S.A.
    > >
    > >
    > >
    > >
    > > "Jamie" <spammerssuck@nospam.com> wrote in message
    > > news:eAQVohy7DHA.2644@TK2MSFTNGP11.phx.gbl...
    > > > I have a asp.net web application that i wrote for internal use in my
    > > > company. The problem i'm having is being able to test the application
    as
    > > > other users see it. The security for the asp.net app is Windows
    > > > Authentication. I'd like to be able to (for testing purposes)
    > impersonate
    > > > another user so i can see things as they see them. I don't want to
    have
    > > to
    > > > change all of my active directory permissions to match their
    > permissions,
    > > > that's not an option. Also, there is no way i can test certain
    features
    > of
    > > > the application without being logged in as some specific users. I'm
    > sure
    > > i
    > > > could do this if i wrote my own IsInRole method and passed in a
    username
    > > of
    > > > my choice and an active directory group and then interfaced with
    active
    > > > directory myself, but i was hoping there is an easier way that affects
    > > less
    > > > existing code.
    > > >
    > > > Is there a way to stuff Page.User with an impersonated windows user?
    If
    > > so,
    > > > how would i create a valid impersonated windows user?
    > > >
    > > >
    > > > Thanks,
    > > > Jamie
    > > >
    > > >
    > >
    > >
    >
    >

    Joe Kaplan \(MVP - ADSI\) Guest

  6. #5

    Default Re: impersonating windows authenticated user?

    Yeah, that's what i figured. That won't really help either as getting users
    passwords isn't an option. I'll just use my own IsInRole method where i pass
    in the users login which i'll supply if i'm testing and use
    Page.User.Identity.Name otherwise.

    Thanks.


    "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
    in message news:%2334ZDR17DHA.2472@TK2MSFTNGP10.phx.gbl...
    > It is possible to change your IE settings so that Integrated
    authentication
    > always prompts for credentials instead of just passing in the default
    > credentials of the current user.
    >
    > Maybe that would help with your testing. You will still need to be able
    to
    > get the credentials of different users to do testing. You need a user's
    > credentials to create a token in Windows.
    >
    > Joe K.
    >
    > "Jamie" <spammerssuck@nospam.com> wrote in message
    > news:%23rE$6J17DHA.1504@TK2MSFTNGP12.phx.gbl...
    > > Thanks for the suggestion. But that won't work. We need to use the more
    > > secure Windows Authentication.
    > >
    > >
    > > "Hernan de Lahitte" <hernan@lagash.com> wrote in message
    > > news:OwmVqF07DHA.488@TK2MSFTNGP12.phx.gbl...
    > > > Hi,
    > > >
    > > > Have you tried using IIS Basic Authentication? I think this is the
    > fastest
    > > > way of doing this.
    > > >
    > > > --
    > > > Hernan de Lahitte
    > > > Lagash Systems S.A.
    > > >
    > > >
    > > >
    > > >
    > > > "Jamie" <spammerssuck@nospam.com> wrote in message
    > > > news:eAQVohy7DHA.2644@TK2MSFTNGP11.phx.gbl...
    > > > > I have a asp.net web application that i wrote for internal use in my
    > > > > company. The problem i'm having is being able to test the
    application
    > as
    > > > > other users see it. The security for the asp.net app is Windows
    > > > > Authentication. I'd like to be able to (for testing purposes)
    > > impersonate
    > > > > another user so i can see things as they see them. I don't want to
    > have
    > > > to
    > > > > change all of my active directory permissions to match their
    > > permissions,
    > > > > that's not an option. Also, there is no way i can test certain
    > features
    > > of
    > > > > the application without being logged in as some specific users. I'm
    > > sure
    > > > i
    > > > > could do this if i wrote my own IsInRole method and passed in a
    > username
    > > > of
    > > > > my choice and an active directory group and then interfaced with
    > active
    > > > > directory myself, but i was hoping there is an easier way that
    affects
    > > > less
    > > > > existing code.
    > > > >
    > > > > Is there a way to stuff Page.User with an impersonated windows user?
    > If
    > > > so,
    > > > > how would i create a valid impersonated windows user?
    > > > >
    > > > >
    > > > > Thanks,
    > > > > Jamie
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Jamie Guest

  7. #6

    Default Re: impersonating windows authenticated user?

    There's no way you'd be able to impersonate someone without having their
    credentials. Otherwise you could impersonate a Domain Administrator or
    Enterprise Administrator account, and do whatever you wanted and there's no
    real way of having it tracked back to you! :-)

    Maybe ask your administrators to create some dummy accounts that have the
    types of permissions that you want, and you could use those.

    Cheers
    Ken

    "Jamie" <spammerssuck@nospam.com> wrote in message
    news:%23lzJrV17DHA.696@tk2msftngp13.phx.gbl...
    : Yeah, that's what i figured. That won't really help either as getting
    users
    : passwords isn't an option. I'll just use my own IsInRole method where i
    pass
    : in the users login which i'll supply if i'm testing and use
    : Page.User.Identity.Name otherwise.
    :
    : Thanks.
    :
    :
    : "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
    : in message news:%2334ZDR17DHA.2472@TK2MSFTNGP10.phx.gbl...
    : > It is possible to change your IE settings so that Integrated
    : authentication
    : > always prompts for credentials instead of just passing in the default
    : > credentials of the current user.
    : >
    : > Maybe that would help with your testing. You will still need to be able
    : to
    : > get the credentials of different users to do testing. You need a user's
    : > credentials to create a token in Windows.
    : >
    : > Joe K.
    : >
    : > "Jamie" <spammerssuck@nospam.com> wrote in message
    : > news:%23rE$6J17DHA.1504@TK2MSFTNGP12.phx.gbl...
    : > > Thanks for the suggestion. But that won't work. We need to use the
    more
    : > > secure Windows Authentication.
    : > >
    : > >
    : > > "Hernan de Lahitte" <hernan@lagash.com> wrote in message
    : > > news:OwmVqF07DHA.488@TK2MSFTNGP12.phx.gbl...
    : > > > Hi,
    : > > >
    : > > > Have you tried using IIS Basic Authentication? I think this is the
    : > fastest
    : > > > way of doing this.
    : > > >
    : > > > --
    : > > > Hernan de Lahitte
    : > > > Lagash Systems S.A.
    : > > >
    : > > >
    : > > >
    : > > >
    : > > > "Jamie" <spammerssuck@nospam.com> wrote in message
    : > > > news:eAQVohy7DHA.2644@TK2MSFTNGP11.phx.gbl...
    : > > > > I have a asp.net web application that i wrote for internal use in
    my
    : > > > > company. The problem i'm having is being able to test the
    : application
    : > as
    : > > > > other users see it. The security for the asp.net app is Windows
    : > > > > Authentication. I'd like to be able to (for testing purposes)
    : > > impersonate
    : > > > > another user so i can see things as they see them. I don't want
    to
    : > have
    : > > > to
    : > > > > change all of my active directory permissions to match their
    : > > permissions,
    : > > > > that's not an option. Also, there is no way i can test certain
    : > features
    : > > of
    : > > > > the application without being logged in as some specific users.
    I'm
    : > > sure
    : > > > i
    : > > > > could do this if i wrote my own IsInRole method and passed in a
    : > username
    : > > > of
    : > > > > my choice and an active directory group and then interfaced with
    : > active
    : > > > > directory myself, but i was hoping there is an easier way that
    : affects
    : > > > less
    : > > > > existing code.
    : > > > >
    : > > > > Is there a way to stuff Page.User with an impersonated windows
    user?
    : > If
    : > > > so,
    : > > > > how would i create a valid impersonated windows user?
    : > > > >
    : > > > >
    : > > > > Thanks,
    : > > > > Jamie
    : > > > >
    : > > > >
    : > > >
    : > > >
    : > >
    : > >
    : >
    : >
    :
    :


    Ken Schaefer 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