Вопрос

I'm a Sharepoint/MS Developer and not too familiar with Livelink. Anyways, I see they have a .NET WCF Service. I'm attempting to do Authentication using this web service and as far as I can read from the API docs, It shouldn't be too difficult.

According to the docs, I need to auth initially with a Admin user which I do and this works fine. Then I can impersonate using the currently logged on user.

Everything works fine until I get to the ImpersonateUser part which fails with a very generic "Insufficient permissions to perform this action." error. Is this a issue on the client side? or LL side? Possible Kerberos not setup propely or at all?

Herwith the code:

 private string ImpersonateUser(string adminToken)
 {
                string userToken = string.Empty;

                llAuthentication.OTAuthentication fLLAuthentication = new llAuthentication.OTAuthentication();
                fLLAuthentication.AuthenticationToken = adminToken;

                fAuthServiceUser = new AuthenticationClient();
                fAuthServiceUser.Endpoint.Address = new EndpointAddress(this.ServiceRoot + "Authentication.svc");
                fAuthServiceUser.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;         

                userToken = fAuthServiceUser.ImpersonateUser(fLLAuthentication, WindowsIdentity.GetCurrent().Name.ToString());

                return userToken;
}
Это было полезно?

Решение

This has nothing to do with Windows authentication. It just means the livelink user you're initially using to login with does not have the right to impersonate other livelink users. Ask your livelink admin to grant this right (I dno't know the exact right off-hand, sorry)

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top