How to get Alfresco login ticket without user password, but with impersonating user with user principal name (UPN)

僤鯓⒐⒋嵵緔 提交于 2019-12-03 17:34:58

I've solved the problem!

I believe that we had a double-hop problem.

This is what had to be done to solve this problem:

  1. User that runs my DLL must be Windows Server 2003 domain user
  2. Service that uses my DLL must have registered Service Principal Name in Domain controller with user that runs it (user that runs my DLL)
  3. User that runs my DLL must not have Account is sensitive and cannot be delegated option selected in Domain controller
  4. User that runs my DLL must have Trust this user for delegation to any service (Kerberos only) or Trust this user for delegation to specified services only option selected in Domain controller (if the user is in Windows Server 2003 functional domain this option is available only when you register Service Principal Name with this user)
  5. User that runs my DLL must have TrustedToAuthForDelegation user account control (UAC) set to true
  6. Computer that runs service that uses my DLL must have Trust computer for delegation to any service (Kerberos only) or Trust computer for delegation to specified services only option selected in Domain Controller

This all (and more) is explained in Microsoft document Troubleshooting Kerberos Delegation. It contains:

  • checklist for Active Directory,
  • checklist for Client application,
  • checklist for Middle tier,
  • checklist for Back-end

plus

  • configuration examples for common scenarios.

Setting TrustedToAuthForDelegation user account control (UAC) is done in PowerShell by Active Directory cmdlet explained here.

You can read more about Windows Authentication in ASP.NET 2.0.

Of course, Alfresco must have Kerberos login enabled.

I think that it is not possible for Alfresco. Only if you use special authentication subsystem where exists this 'impersonal' user.

Try this, because 'guest' user is transversal for all subsystem authentication.

request.Credentials = new NetworkCredential("guest", "guest");

And the URI, something like this:

string URI = "http://alfrescoserver/alfresco/s/api/login or whatever you propose.

Good luck. Paco

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!