Impersonation problem in Sharepoint 2007



Hello,

It's been four days that we are looking for something to help us, but
we're still having problems getting it to work.

The thing we are trying to do is to grant temporarly rights to the
connected user, in order to use a Sharepoint method that demand
administrator privileges, such as create SPWebs, SPLists and
SPListItems or retrieve the WelcomePage of a SPWeb.

The first thing we thought is the classical Impersonate method, used in
SPS 2003. But it doesn't work!
We thought then, that it was the problem of the "Roles retrieval" in
SPS 2003, which forces to use AppDomains. But this solution is not
suitable because everything we try causes an Access Denied Exception.
There must be anything else.

When we impersonate, the WindowsIdendity associated to the context
correctly becomes the AppPool Identity (checked with Debug). But it
seems that the security context on which MOSS is based, is still the
user's one (checked by using its API : for example,
SPContext.Current.Web.CurrentUser is a SPUser
corresponding to the one is connected). This seems to have for
consequences that even in a impersonated block, if we create a new
list, the creator of the list is the logon user, not the current user
of the HttpContext!

Has anyone gotten this to work? Am I forgetting something?
Thanks for your reply

Jérôme D.

.



Relevant Pages

  • Re: flowing credentials through biztalk
    ... yes, they are the same, so i supose they share the same security context. ... In the orchestration I just call a helper static method that adds a custom ... Impersonate using the user windowsidentity ... Undo the impersonation to restablish the biztalk service security context ...
    (microsoft.public.biztalk.general)
  • Re: Impersonation problem in Sharepoint 2007
    ... currently i am facing the difficulty in sps 2003!!! ... tested a lot of things to impersonate our current user but nothing ... Impersonate method with RevertToSelf: ... WindowsIdentity impersonatedUserIdentity = ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: Access Denied
    ... in Sps but when i compiled this defaultcredentials SPS ... >You need to create a new folder under the wwwroot folder ... >either need to impersonate in code, ... >impersonate the user making the call to the web service. ...
    (microsoft.public.sharepoint.portalserver.development)
  • Package Sercurity Context
    ... Under what security context does an ActiveX Script task run as if executed ... inside the DTS designer...? ... impersonate the user..? ...
    (microsoft.public.sqlserver.dts)
  • Re: How to Stop a Service From Impersonating Other Users
    ... > user's security context. ... Act as part of the operating system ... This user right allows a process to impersonate any user without ...
    (microsoft.public.windows.server.security)