Questions tagged [impersonation]

Impersonation is a process whereby an application assumes another identity or security context during execution.

1522 questions
4
votes
2 answers

LogonUser and delegation

I'm using the LogonUser win32 api: token = LogonUser(...) WindowsIdentity newId = new WindowsIdentity(token); WindowsImpersonationContext impersonatedUser = newId.Impersonate(); However when calling a WCF service after this I'm not able…
Yaron Naveh
  • 23,560
  • 32
  • 103
  • 158
4
votes
1 answer

Using impersonation to launch processes (indirectly) in C#

I am working on an application that uses Selenium to control a browser. Selenium launches the browser when it is initialized, and I therefore never call Process.Start directly on the browser's .exe. I would like Selenium and all of its child…
Justin Fyles
  • 150
  • 2
  • 11
4
votes
2 answers

LogonUser works only for my domain

I need to impersonate a user using C#. I use the LogonUser Win32 API. This works fine when impersonating users from the same domain as the currently logged-in user. However I get "false" as response when I try to impersonate users from other…
Yaron Naveh
  • 23,560
  • 32
  • 103
  • 158
4
votes
1 answer

Impersonate with Delegation or More than one hop on Kerberos? Completely lost

My issue here is how to deal with security and a proper implementation of impersonation which will work from a client machine and authenticate properly to my IIS server which passes the still valid impersonation ticket along with the LDAP…
4
votes
1 answer

Windows Service for launching and restarting a user process (with GUI)

I need a certain process to be constantly running in every user’s computer. If that .exe is killed, I must be able to restart it and send an alert. I immediately thought of building a Windows Service as the ideal solution, but I am facing a…
baderous
  • 121
  • 8
4
votes
1 answer

Run tests in TFS 2010 with a different identity

Is it possible to run the tests on TFS 2010 with a different identity ? The code being tested require higher privileges ( Active Directory, Filesystem manipulations) than the ones the current account has. Right now there there is impersonation in…
Vincent
  • 510
  • 1
  • 5
  • 23
4
votes
3 answers

Could not load file or assembly 'app_code' or one of its dependencies when impersonating

I made a web site with VS2010 and publish it on IIS7. It runs fine but it can't connect to an OLAP server so I had to setup impersonation. Impersonation runs fine in debug on my dev machine, but when I publish this on the server, I get this…
Guillaume Filion
  • 480
  • 2
  • 6
  • 13
4
votes
5 answers

Impersonation and CredentialCache.DefaultCredentials gives HTTP 401 Unauthorized

I have an ASMX web service (on my localhost - WinXP IIS 5.1) that I call from a webclient. My webservice must consume another ASMX web service (on a Win 2003 server IIS 6.0). When I provide credentials in my webservice code in a "hard-coded"…
John Adams
  • 4,773
  • 25
  • 91
  • 131
4
votes
1 answer

How to manage Google Cloud credentials for local development

I searched a lot how to authenticate/authorize Google's client libraries and it seems no one agrees how to do it. Some people states that I should create a service account, create a key out from it and give that key to each developer that wants to…
4
votes
2 answers

Unable to find an entry point named 'LogonUser' in DLL 'advapi32.dll' Impersonation exception

I'm getting the following exception when going through some legacy impersonation logic: Unable to find an entry point named 'LogonUser' in DLL 'advapi32.dll' I understand that the error means that my app can't find the LogonUser method in the…
woggles
  • 7,444
  • 12
  • 70
  • 130
4
votes
1 answer

WCF Impersonation through configuration

I have a simple WCF service that uses WSHttpBinding and Windows authentication. I'm trying to force the server to impersonate the client's identity upon every method call for this service. I tried the advice given at WCF Service Impersonation, but…
Jay Sullivan
  • 17,332
  • 11
  • 62
  • 86
4
votes
1 answer

Does a Non UI thread which is running under impersonated user automatically imersonate the UI thread?

I have been searching for several hours now and have so far had no luck with this one - so thought I would post. I have a WPF Application written in vb.net running on DotNet 4.0 which launches worker threads to perform specific functions such as…
Roddles
  • 307
  • 1
  • 2
  • 10
4
votes
1 answer

Keycloak: Impersonation mints token for wrong client

I'm trying to issue an access token through impersonation by using a trust client and issuing the token for a public client. I've set up the token exchange permissions and the request works. However, my problem is that the issued token seems to…
haiz-apl
  • 41
  • 2
4
votes
4 answers

.Net Core Impersonation not working with Process.Start

I can't seem to start a process as another user when using impersonation under .Net Core. I'm running this script in Linqpad running as User1 and trying to launch a program as User2. At first, the impersonation seems to work (the…
4
votes
1 answer

Elevate impersonated credentials to app pool credentials in IIS

I am using impersonation in an application in IIS. I need to write a file to the file system, but don't want to use the impersonated user's credentials in this one case. I need to use the credentials of the app pool. How do I temporarially elevate a…
Ryan Michela
  • 8,284
  • 5
  • 33
  • 47