Prevent another thread?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

From a particular WindowsIdentity I need to create a Kerberos token (WSE 2.0)
for a SOAP message:

impersonatedUser = windowsIdentity.Impersonate();
// create Kerberos token
impersonatedUser.Undo();

How can I make sure that other threads does not do stuff while I'm
impersonating on this particular thread? Can I get a list of threads and
pause them all?

Niels
 
Hi,

To quote MSDN (Platform SDK - Authorization - Client Impersonation):

"Impersonation is the ability of a thread to execute using different
security information than the process that owns the thread. Typically, a
thread in a server application impersonates a client. This allows the server
thread to act on behalf of that client to access objects on the server or
validate access to the client's own objects."

Therefore, there is no need to pause any other threads, only the thread that
has performed the impersonation will run under another security context.
 
Well, what do you know. I thought the whole process would assume the new
identity. Sounds reasonable though.

Thanks.

Niels
 
Back
Top