Trust for Delegation in List Web Part for Microsoft Dynamics CRM 4.0

使用On-Premise类型部署的Microsoft Dynamics CRM 4.0 (MS CRM) 如果CRM Server和SharePoint Server装在不同的物理机器上,将会遇到信任委托(Trust for Delegation,以下简称为TFD,有时也被理解为Double-Hop impersonation)的问题,这篇文章将会讨论这种情况下TFD的配置.

 

以下场景将不受TFD的影响:

1. 需要部署List Web Part (LWP) 的MS CRM采用Internet Facing Deployment(IFD).

2. Microsoft Dynamics CRM 和 SharePoint Server装在同一台server上.

当使用On-Premise类型部署的MS CRM和SharePoint 装在不同server上时,使用LWP的MS CRM用户在认证(authentication)时会遇到问题.如果SharePoint Server没有配置过TFD,用户的Active Directory 凭证(credentials)不会传递到MS CRM Server.部署在SharePoint上的LWP不会从SharePoint接收CRM认证票据(authentication ticket),而是显示一个使用IFD安装时的登录界面.下图为LWP的配置和登录界面.未配置TFD时,会显示这个界面.

 

图1 IFD部署下的配置和登录界面

 

什么是双跳 (Double Hop) 问题?

当MS CRM Server和SharePoint Server装在不同机器上时,第一条是从LWP用户的IE浏览器到SharePoint Server,然后第二跳是从SharePoint Server到MS CRM Server.由于安全问题,Windows凭证在第二跳中不能被传递.为了使SharePoint Server能够传递用户凭证,必须为SharePoint Server配置TFD.

配置Trust for Delegation(TFD)

为了更容易理解如何配置,可参照以下模型:  

  • Machine #1 Active Directory
  • Machine #2 SQL Server
  • Machine #3 Microsoft Dynamics CRM 4.0 Server
  • Machine #4 Windows SharePoint Services 3.0/Microsoft Office SharePoint Server 2007
  • Machine #5 User accessing SP using IE

          图2 :独立的CRM和SharePoint Server的模型

1. 首先,根据以下KB中的步骤来配置IIS和IE

https://support.microsoft.com/default.aspx?scid=kb;en-us;810572

注:为了完成接下来的步骤,执行操作的用户必须是Active Directory 中Domain Adminstrators group或者Enterprise Adminstrators group中的成员,或者该用户必须被授予过相应的权限.

出于安全性考虑,请使用Run as来执行这个过程.

2. 点击 Start >> Control Panel >> Administrative Tools >> Active Directory Users and Computers.

3. 在树形结构中, 点击 Computers.

4. 在右侧面板中,右击你想要设置TFD的计算机,点击Properties.在上述模型中,选择Windows SharePoint Services 3.0 server or MOSS 2007 server (图2中machine # 4) .

5. 在 Delegation tab, 选择 Trust this computer for delegation to specified services only.

        图3: 为特定的服务设置信任委托

6. 根据WSS/MOSS web应用中IIS认证类型(authentication type),做下列操作中的一种:

 · 若IIS认证类型为NTLM,选择Use any authentication protocol .

   或

 · 若IIS认证类型为Integrated Windows authentication with Negotiate (Kerberos),选择Use Kerberos only(见图7)

7. 点击Add,在Add Services中点击Users and Computers.

8. 在Enter the object names to select (examples) 中,输入这台计算机将被信任去委托的计算机名,例如Dynamics CRM 4.0 computer (图2中Machine #3),然后点击OK.

         图4:Select User and Computers

若计算机名未被解析,点击Advance.

· 打开Select Users or Computer后点击Find Now.

· 从列表中选择CRM Server,然后点击OK. CRM Server将会出现在Select Users or Computer中,点击OK.

      图5 : Select User and Computers using advanced dialog

9. 在Add Services中,点击http服务,它将被信任委托,然后点击OK.

          图6 :设置信任特定的服务

注:

· 若在图3中不能看见Delegation tab,可进行下述一种或两种操作:

Ø 使用CD中support tool里的Setspn工具为计算机账号注册一个Service Principal Name (SPN).Delegation 只被用在服务账户上,服务账户应该注册SPNs,而普通的用户账户通常没有SPNs.

Ø 将域的functional level 升为 Windows Server 2003 .

· 有约束的委托,委托特定服务的认证只能在Windows Server 2003家族成员中应用.

若希望在WSS/MOSS中使用Kerberos,以下步骤是必要的:

10. 进入SharePoint Central administrator site, 在Application Management中, 选择 Authentication Providers.

11. 在 Authentication Provider 中选择 default zone,查看 IIS Authentication Settings.

      · Integrated Windows authentication 应该勾选.

      · 选择 Negotiate ( Kerberos ) 选项.

       图7 : SharePoint Central Admin - Edit Authentication

现在,你应该能够登录到List Web Part并看到配置页面 .

 图8 :成功登录List Web Part界面

原文:https://blogs.msdn.com/b/crm/archive/2009/01/14/trust-for-delegation-in-list-web-part-for-microsoft-dynamics-crm-4-0.aspx

Jackie Chen (陈攀)