To obtain Web Service security context

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

  1. #1

    Default To obtain Web Service security context

    Hello all!

    I'd like to to impersonate the domain account a web service runs under. I
    need this to do a trusted connection to SQL Server.
    The current settings for the ASP.NET app are windows authentication and
    impersonation. So if I do a trusted connection to SQL Server it would be
    in the context of the current user which I don't want.
    I like the approach with no global impersonation setting and manual
    impersonation when nessessary, like was advised here, but that I can't
    change the current global settings because the project is not mine and far
    under way, I'm afraid to break something :-\
    I feel I would be happy if I could obtain the WindowsImpersonationContext
    for the account which runs the working process. If sombody could tell me how
    to do this. In fact, all I want to do is to change the current security
    context to that of the worker process, execute a sql query and then revert
    to the previous context.
    I don't want to explicitly set the credentials of any account. Is it
    possible?


    Oleg Boldyrev Guest

  2. Similar Questions and Discussions

    1. obtain jdbc connection in java context
      There's a few posts on this topic in the forums: http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=6&thread id=784401 ...
    2. MSXML what security context is used?
      If I create an MSXML4 object in an ASP page (set xmldoc = Server.CreateObject("Msxml2.DOMDocument.4.0") .... and then apply an XSL stylesheet...
    3. Security context is invalid '800706d5'
      Hi, We have an iis server where we host several websites. One of our websites has been consistently throwing the following error "Automation...
    4. CLI: How to obtain a ConnectionHandle from a Context
      Hello I'm writing a multithreaded application using CLI and DB2 Administrative API. sqleGetCurrentCtx() provides me with the current Context...
    5. Security context question
      If I turn off anonymous access to an ASP page and then use "Integrated Authentication" in a Intranet environment, I expected the user context to be...
  3. #2

    Default Re: To obtain Web Service security context

    Did you see the sample that Brock posted here that shows the trick of
    impersonating the null token (which results essentially in "revert to self")
    and then undoing the impersonation context to start the impersonation back
    up? This sounds like what you need.

    Joe K.

    "Oleg Boldyrev" <olboldie@yandex.ru> wrote in message
    news:%23EPBAuCRFHA.1564@TK2MSFTNGP09.phx.gbl...
    > Hello all!
    >
    > I'd like to to impersonate the domain account a web service runs under. I
    > need this to do a trusted connection to SQL Server.
    > The current settings for the ASP.NET app are windows authentication and
    > impersonation. So if I do a trusted connection to SQL Server it would be
    > in the context of the current user which I don't want.
    > I like the approach with no global impersonation setting and manual
    > impersonation when nessessary, like was advised here, but that I can't
    > change the current global settings because the project is not mine and
    > far under way, I'm afraid to break something :-\
    > I feel I would be happy if I could obtain the WindowsImpersonationContext
    > for the account which runs the working process. If sombody could tell me
    > how to do this. In fact, all I want to do is to change the current
    > security context to that of the worker process, execute a sql query and
    > then revert to the previous context.
    > I don't want to explicitly set the credentials of any account. Is it
    > possible?
    >
    >

    Joe Kaplan \(MVP - ADSI\) Guest

  4. #3

    Default Re: To obtain Web Service security context

    Yes, I did! It's exactly what i need.
    Thank you, Joe, thank you, Brock.

    "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
    in message news:OWe7eKjRFHA.2252@TK2MSFTNGP15.phx.gbl...
    > Did you see the sample that Brock posted here that shows the trick of
    > impersonating the null token (which results essentially in "revert to
    > self") and then undoing the impersonation context to start the
    > impersonation back up? This sounds like what you need.
    >
    > Joe K.
    >
    > "Oleg Boldyrev" <olboldie@yandex.ru> wrote in message
    > news:%23EPBAuCRFHA.1564@TK2MSFTNGP09.phx.gbl...
    >> Hello all!
    >>
    >> I'd like to to impersonate the domain account a web service runs under. I
    >> need this to do a trusted connection to SQL Server.
    >> The current settings for the ASP.NET app are windows authentication and
    >> impersonation. So if I do a trusted connection to SQL Server it would
    >> be in the context of the current user which I don't want.
    >> I like the approach with no global impersonation setting and manual
    >> impersonation when nessessary, like was advised here, but that I can't
    >> change the current global settings because the project is not mine and
    >> far under way, I'm afraid to break something :-\
    >> I feel I would be happy if I could obtain the WindowsImpersonationContext
    >> for the account which runs the working process. If sombody could tell me
    >> how to do this. In fact, all I want to do is to change the current
    >> security context to that of the worker process, execute a sql query and
    >> then revert to the previous context.
    >> I don't want to explicitly set the credentials of any account. Is it
    >> possible?
    >>
    >>
    >
    >

    Oleg Boldyrev 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