将 AD FS 基于声明的身份验证用于 Outlook Web App 和 EAC

适用于:Exchange Server 2013 SP1

摘要

对于本地 Exchange 2013 Service Pack 1 (SP1) 部署,安装和配置 Active Directory 联合身份验证服务 (AD FS) 意味着,您现在可以使用 AD FS 基于声明的身份验证方法连接到 Outlook Web App 和 EAC。 您可以将 AD FS 和基于声明的身份验证与 Exchange 2013 SP1 集成。 使用基于声明的身份验证可代替传统的身份验证方法,包括以下方法:

  • Windows 身份验证
  • 窗体身份验证
  • 摘要式身份验证
  • 基本身份验证
  • Active Directory 客户端证书身份验证

身份验证是确认用户标识的过程。 身份验证验证用户是其声明的那个人。 基于声明的标识是进行身份验证的另一种方法。 在这种情况下,基于声明的身份验证从应用程序 (删除对身份验证的管理,Outlook Web App和 EA) ,以便通过集中身份验证更轻松地管理帐户。 Outlook Web App 和 EAC 不负责对用户进行身份验证、存储用户帐户和密码、查找用户标识详细信息,或者与其他标识系统集成。 集中化身份验证有助于使将来的身份验证方法升级变得更加简单。

注意

适用于设备的 OWA 不支持 AD FS 基于声明的身份验证。

AD FS 有多个版本可供使用,如下表所汇总。

Windows Server 版本 安装 AD FS 版本
Windows Server 2008 R2 下载并安装 AD FS 2.0(此为附加 Windows 组件)。 AD FS 2.0
Windows Server 2012 安装 内置 AD FS 服务器角色。 AD FS 2.1
Windows Server 2012 R2 安装 内置 AD FS 服务器角色。 AD FS 3.0

此处,您将执行的任务基于包含 AD FS 角色服务的 Windows Server 2012 R2。

所需步骤概述

步骤 1 - 查看 AD FS 的证书要求

步骤 2 - 安装和配置 Active Directory 联合身份验证服务 (AD FS)

第 3 步 - 为 Outlook Web App 和 EAC 创建信赖方信任和自定义声明规则

第 4 步 - 安装 Web 应用程序代理角色服务(可选)

第 5 步 - 配置 Web 应用程序代理角色服务(可选)

步骤 6 - 使用 Web 应用程序代理 (可选) 发布Outlook Web App和 EAC

第 7 步 - 将 Exchange 2013 配置为使用 AD FS 身份验证

第 8 步 - 在 OWA 和 ECP 虚拟目录上启用 AD FS 身份验证

第 9 步 - 重启或再循环 Internet Information Services (IIS)

第 10 步 - 为 Outlook Web App 和 EAC 测试 AD FS 声明

您可能希望了解的其他信息

在开始之前,我需要知道什么?

  • 至少需要安装单独的 Windows Server 2012 R2 服务器:一个作为使用 Active Directory 域服务 (AD DS) 的域控制器、一个 Exchange 2013 服务器、一个 Web 应用程序代理服务器和一个 Active Directory 联合身份验证服务 (AD FS) 服务器。 验证所有更新是否均已安装。

  • 在组织中合适数量的 Windows Server 2012 R2 服务器上安装 AD DS。 还可以使用 服务器管理器>Dashboard 中的通知将此服务器提升到域控制器

  • 为组织安装合适数量的客户端访问服务器和邮箱服务器。 验证是否已在组织的所有 Exchange 2013 服务器中安装所有更新(包括 SP1)。 若要下载 SP1,请参阅 Exchange 2013 更新

  • 在服务器上部署 Web 应用程序代理需要本地管理员权限。 在部署 Web 应用程序代理之前,必须在组织中运行 Windows Server 2012 R2 的服务器中部署 AD FS。

  • 安装和配置 AD FS 角色并在 Windows Server 2012 R2 中创建信赖方信任和声明规则。 为此,需要使用作为 Domain Admins、Enterprise Admins 或本地 Administrators 组成员的用户帐户登录。

  • 参阅功能权限,确定 Exchange 2013 所需的权限。

  • 您必须获得权限,才能管理 Outlook Web App。 若要了解您需要哪些权限,请参阅客户端和移动设备权限主题中的"Outlook Web App 权限"条目。

  • 您必须获得权限,才能管理 EAC。 若要查看所需的权限,请参阅 Exchange 和命令行管理程序基础结构权限主题中的"Exchange 管理中心连接"条目。

  • 可能只能使用命令行管理程序执行某些过程。 若要了解如何在本地 Exchange 组织中打开命令行管理程序,请参阅Open the Shell

  • 若要了解本主题中的过程可能适用的键盘快捷键,请参阅 Exchange 管理中心内的键盘快捷键

提示

是否有任何疑问? 在 Exchange 论坛中寻求帮助。 访问 Exchange Server 的论坛。

步骤 1 - 查看 AD FS 的证书要求

在保护 Exchange 2013 SP1 服务器、Web 客户端(例如 Outlook Web App),以及 EAC、Windows Server 2012 R2 服务器(包括 Active Directory 联合身份验证服务 (AD FS) 服务器和 Web 应用程序代理服务器)之间的通信的过程中,证书扮演了非常重要的角色。 证书的要求取决于正在设置的是 AD FS 服务器、AD FS 代理还是 Web 应用程序代理服务器。 用于 AD FS 服务的证书(包括 SSL 和令牌签名证书)必须导入到所有 Exchange、AD FS 和 Web 应用程序代理服务器中的信任根证书颁发机构存储中。 当您使用 Set-OrganizationConfig cmdlet 时,导入的证书的指纹也会在 Exchange 2013 SP1 服务器上使用。

在任何 AD FS 设计中,必须使用各种证书来保护 Internet 中的用户和 AD FS 服务器之间的通信安全。 每个联合服务器必须拥有服务通信证书或安全套接字层 (SSL) 证书,以及令牌签名证书,然后 AD FS 服务器、Active Directory 域控制器和 Exchange 2013 服务器才能进行通信和身份验证。 根据你的安全和预算要求,认真考虑公共 CA 或企业 CA 将获得你的哪些证书。 如果要安装和配置企业根或从属 CA,你可以使用 Active Directory 证书服务 (AD CS)。 如果想了解有关 AD CS 的详细信息,请参阅 Active Directory 证书服务概述

尽管 AD FS 不需要 CA 颁发的证书,但 SSL 证书(默认情况下,SSL 证书还被用作服务通信证书)必须受 AD FS 客户端信任。 我们建议不要使用自签名证书。 联合服务器使用 SSL 证书保护 Web 服务通信,以便实现与 Web 客户端以及与联合服务器代理的 SSL 通信。 由于 SSL 证书必须受客户端计算机信任,我们建议您使用由受信任的 CA 签名的证书。 您选择的所有证书都必须拥有相应的私钥。 After you receive a certificate from a CA (Enterprise or public), make sure that all certificates are imported into the Trust Root Certification Authorities store on all servers. You can import certificates into the store with the Certificates MMC snap-in or distribute the certificates by using Active Directory Certificate Services. It's important that if the certificate that you imported expires, you manually import another valid certificate.

重要

如果您使用来自 AD FS 的自签名令牌签名证书,必须将此证书导入到所有 Exchange 2013 服务器中的信任根证书颁发机构存储中。 如果未使用自签名令牌签名证书,并且已部署 Web 应用程序代理,则必须更新 Web 应用程序代理配置和所有 AD FS 信赖方信任中的公钥。

设置 Exchange 2013 SP1、AD FS 和 Web 应用程序代理时,请遵循以下证书建议:

  • 邮箱服务器:邮箱服务器上使用的证书是自签名证书,是在安装 Exchange 2013 时创建的。 由于所有客户端都通过 Exchange 2013 客户端访问服务器连接到 Exchange 2013 邮箱服务器,因此您只需要管理客户端访问服务器中的证书。

  • 客户端访问服务器:需要用于服务通信的 SSL 证书。 如果您的现有 SSL 证书已经包含正用于设置信赖方信任终结点的 FQDN,则无需其他证书。

  • AD FS:AD FS 需要两种类型的证书:

    • 用于服务通信的 SSL 证书

      • 使用者名称: adfs.contoso.com (AD FS 部署名称)
      • 主题备用名称 (SAN):无
    • 令牌签名证书

      • 使用者名称: tokensigning.contoso.com
      • 主题备用名称 (SAN):无

    注意

    替换 AD FS 中的令牌签名证书时,必须更新所有现有信赖方信任,以使用新的令牌签名证书。

  • Web 应用程序代理

    • 用于服务通信的 SSL 证书

      • 使用者名称: owa.contoso.com
      • 主题备用名称 (SAN):无

      注意

      如果您的 Web 应用程序代理外部 URL 与内部 URL 相同,您可以在此重新使用 Exchange 的 SSL 证书。

      • AD FS 代理 SSL 证书

        • 使用者名称: adfs.contoso.com (AD FS 部署名称)
        • 主题备用名称 (SAN):无
      • 令牌签名证书 - 作为以下步骤的一部分,此证书将从 AD FS 自动复制。 如果使用了此证书,它必须受组织中 Exchange 2013 服务器的信任。

有关证书的详细信息,请参阅 AD FS 要求 中的证书要求部分。

注意

Outlook Web App 和 EAC 仍然需要 SSL 加密证书,即使您已经拥有用于 AD FS 的 SSL 证书。 SSL 证书在 OWA 和 ECP 虚拟目录中使用。

步骤 2 - 安装和配置 Active Directory 联合身份验证服务 (AD FS)

Windows Server 2012 R2 中的 AD FS 提供了简化的安全联合身份验证和 Web 单一登录 (SSO) 功能。 AD FS 引入了联合身份验证服务,该服务支持基于浏览器的 Web SSO、多重和基于声明的身份验证。 AD FS 通过使用基于声明的身份验证和访问授权机制维护应用程序的安全,从而简化了对系统和应用程序的访问。

在 Windows Server 2012 R2 上安装 AD FS 的步骤:

  1. Open Server Manager on the Start screen or Server Manager on the taskbar on the desktop. Click Add Roles and Features on the Manage menu.

  2. On the Before You Begin page, click Next.

  3. On the Select Installation Type page, click Role-based or Feature-based installation, and then click Next.

  4. On the Select Destination Server page, click Select a server from the server pool, verify that the local computer is selected, and then click Next.

  5. On the Select Server Roles page, click Active Directory Federation Services, and then click Next.

  6. On the Select Features page, click Next. The required prerequisites or features are already selected for you. You do not need to select any other features.

  7. On the Active Directory Federation Service (AD FS) page, click Next.

  8. On the Confirm Installation Selections page, check Restart the destination server automatically if required, and then click Install.

    注意

    在安装过程中请勿关闭向导。

安装了所需 AD FS 服务器并生成所需证书后,必须配置 AD FS,然后测试 AD FS 是否能够正常运行。 你还可以使用此处的检查表帮助设置和配置 AD FS:检查表:设置联合服务器

配置 Active Directory 联合身份验证服务的步骤:

  1. On the Installation Progress page, in the window under Active Directory Federation Services, click Configure the federation service on this server. The Active Directory Federation Service Configuration Wizard opens.

  2. On the Welcome page, click Create the first federation server in a federation server farm, and then click Next.

  3. On the Connect to AD DS page, specify an account with domain administrator rights for the correct Active Directory domain that this computer is joined to, and then click Next. If you need to select a different user, click Change.

  4. On the Specify Service Properties page, do the following, and then click Next:

    • 导入之前从 AD CS 或公共 CA 获得的 SSL 证书。 此证书是必需的服务身份验证证书。 浏览到 SSL 证书的位置。 有关创建和导入 SSL 证书的详细信息,请参阅服务器证书

    • 输入联合身份验证服务的名称 (例如,键入 adfs.contoso.com) 。

    • 若要为联合身份验证服务提供显示名称,请键入组织的名称 (例如 Contoso, Ltd.) 。

  5. On the Specify Service Account page, select Use an existing domain user account or group Managed Service Account, and then specify the GMSA account (FsGmsa) that you created when you created the domain controller. Include the account password, and then click Next.

    注意

    全局托管服务帐户 (GMSA) 是配置域控制器时必须创建的帐户。 安装和配置 AD FS 时需要 GMSA 帐户。 如果尚未创建此帐户,请运行以下 Windows PowerShell 命令。 该命令为 contoso.com 域和 AD FS 服务器创建帐户:

  6. 运行以下命令:

    Add-KdsRootKey -EffectiveTime (Get-Date).AddHours(-10)
    
  7. 此示例为名为 adfs.contoso.com 的联合身份验证服务创建名为 FsGmsa 的新 GMSA 帐户。 联合身份验证服务名称是客户端可见的值。

    New-ADServiceAccount FsGmsa -DNSHostName adfs.contoso.com -ServicePrincipalNames http/adfs.contoso.com
    
  8. On the Specify Configuration Database page, select Create a database on this server using Windows Internal Database, and then click Next.

  9. On the Review Options page, verify your configuration selections. You can optionally use the View Script button to automate additional AD FS installations. Click Next.

  10. On the Prerequisite Checks page, verify that all the prerequisite checks were successfully completed, and then click Configure.

  11. On the Installation progress page, verify that everything installed correctly, and then click Close.

  12. On the Results page, review the results, check whether the configuration completed successfully, and then click Next steps required for completing your federation service deployment.

以下Windows PowerShell命令执行的操作与前面的步骤相同。

Import-Module ADFS
Install-AdfsFarm -CertificateThumbprint 0E0C205D252002D535F6D32026B6AB074FB840E7 -FederationServiceDisplayName "Contoso Corporation" -FederationServiceName adfs.contoso.com -GroupServiceAccountIdentifier "contoso\FSgmsa`$"

有关详细信息和语法,请参阅 Install-AdfsFarm

若要验证安装,请在 AD FS 服务器上打开 Web 浏览器,然后浏览到联合元数据 (的 URL,例如 https://adfs.contoso.com/federationmetadata/2007-06/federationmetadata.xml ,) 。

第 3 步 - 为 Outlook Web App 和 EAC 创建信赖方信任和自定义声明规则

对于所有要通过 Web 应用程序代理发布的应用程序和服务,您必须在 AD FS 服务器上配置信赖方信任。 对于包含多个使用单独命名空间的 Active Directory 站点的部署,您必须为每个命名空间添加 Outlook Web App 和 EAC 的信赖方信任。

EAC 使用 ECP 虚拟目录。 您可以使用 Get-EcpVirtualDirectorySet-EcpVirtualDirectory cmdlet 查看或配置 EAC 的设置。 若要访问 EAC,必须使用 Web 浏览器并转到 http://server1.contoso.com/ecp

注意

在如下示例中,我们特意在 URL 中添加尾部反斜杠 /。 务必确保 AD FS 信赖方信任与 Exchange 用户 URI 的信赖方信任 是相同的。 这意味着 AD FS 信赖方信任和 Exchange 用户 URI 的信赖方信任在其 URL 中 都有都使用尾部斜杠。 本节中的示例对任何以"owa"或"ecp"结尾的 url,在其尾部后面追加一个 /,即变为"/owa/"或"/ecp/"。

对于 Outlook Web App,若要使用 Windows Server 2012 R2 中的 AD FS 管理单元创建信赖方信任,请执行以下操作:

  1. In Server Manager, click Tools, and then select AD FS Management.

  2. In AD FS snap-in, under AD FS\Trust Relationships, right-click Relying Party Trusts, and then click Add Relying Party Trust to open the Add Relying Party Trust wizard.

  3. On the Welcome page, click Start.

  4. On the Select Data Source page, click Enter data about the relying party manually, and then click Next.

  5. 在“指定显示名称”页上的“显示名称”框中,键入“Outlook Web App”,然后在“备注”下,键入此信赖方信任 (的说明,例如“这是) 的信任”,然后单击“下https://mail.contoso.com/owa/”。

  6. On the Choose Profile page, click AD FS profile, and then click Next.

  7. On the Configure Certificate page, click Next.

  8. On the Configure URL page, click Enable support for the WS-Federation Passive protocol, and then under Relying party WS-Federation Passive protocol URL, type https://mail.contoso.com/owa/, and then click Next.

  9. On the Configure Identifiers page, specify one or more identifiers for this relying party, click Add to add them to the list, and then click Next.

  10. On the Configure Multi-factor Authentication Now? page, select Configure multi-factor authentication settings for this relying party trust.

  11. On the Configure Multi-factor Authentication page, verify that I do not want to configure multi-factor authentication settings for this relying party trust at this time is selected, and then click Next.

  12. On the Choose Issuance Authorization Rules page, select Permit all users to access this relying party, and then click Next.

  13. On the Ready to Add Trust page, review the settings, and then click Next to save your relying party trust information.

  14. On the Finish page, verify that Open the Edit Claim Rules dialog for this relying party trust when the wizard closes isn't selected, and then click Close.

若要为 EAC 创建信赖方信任,必须再次执行这些步骤并创建第二个信赖方信任,但请输入 EAC,而不是为显示名称输入Outlook Web App。 对于说明,请输入 这是 Exchange 管理中心的信任,并且信赖 方WS-Federation被动协议 URLhttps://mail.contoso.com/ecp

在基于声明的标识模型中,作为联合身份验证服务的 Active Directory 联合身份验证服务 (AD FS) 的功能是颁发包含一组声明的令牌。 声明规则控制有关 AD FS 颁发的声明的决策。 声明规则和所有服务器配置数据都存储在 AD FS 配置数据库中。

您必须创建两个声明规则:

  • Active Directory 用户 SID
  • Active Directory UPN

若要添加所需的声明规则,请执行以下操作:

  1. In Server Manager, click Tools, and then click AD FS Management.

  2. In the console tree, under AD FS\Trust Relationships, click either Claims Provider Trusts or Relying Party Trusts, and then click the relying party trust for Outlook Web App.

  3. In the Relying Party Trusts window, right-click the Outlook Web App trust, and then click Edit Claim Rules.

  4. In the Edit Claim Rules window, on the Issuance Transform Rules tab, click Add Rule to start the Add Transform Claim Rule Wizard.

  5. On the Select Rule Template page, under Claim rule template, select Send Claims Using a Custom Rule in the list, and then click Next.

  6. On the Configure Rule page, in the Choose Rule Type step, under Claim rule name, enter the name for the claim rule. 对声明规则使用描述性名称 (例如 ActiveDirectoryUserSID) 。 Under Custom rule, enter the following claim rule language syntax for this rule:

    c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"] => issue(store = "Active Directory", types = ("http://schemas.microsoft.com/ws/2008/06/identity/claims/primarysid"), query = ";objectSID;{0}", param = c.Value);
    
  7. On the Configure Rule page, click Finish.

  8. In the Edit Claim Rules window, on the Issuance Transform Rules tab, click Add Rule to start the Add Transform Claim Rule Wizard.

  9. On the Select Rule Template page, under Claim rule template, select Send Claims Using a Custom Rule in the list, and then click Next.

  10. On the Configure Rule page, on the Choose Rule Type step, under Claim rule name, enter the name for the claim rule. 对声明规则使用描述性名称 (例如 ActiveDirectoryUPN) 。 Under Custom rule, enter the following claim rule language syntax for this rule:

    c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"] => issue(store = "Active Directory", types = ("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn"), query = ";userPrincipalName;{0}", param = c.Value);
    
  11. Click Finish.

  12. In the Edit Claim Rules window, click Apply, and then OK.

  13. 为 EAC 信赖方信任重复执行此程序的第 3-12 步。

您也可以使用 Windows PowerShell 创建信赖方信任和声明规则:

  1. 创建两个 .txt 文件,IssuanceAuthorizationRules.txt 和 IssuanceTransformRules.txt。

  2. 将它们的内容导入两个变量中。

  3. 运行以下两个 cmdlet 以创建信赖方信任。 在此示例中,这还将配置声明规则。

IssuanceAuthorizationRules.txt 包含:

@RuleTemplate = "AllowAllAuthzRule" => issue(Type = "http://schemas.microsoft.com/authorization/claims/permit", Value = "true");

IssuanceTransformRules.txt 包含:

@RuleName = "ActiveDirectoryUserSID" c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"] => issue(store = "Active Directory", types = ("http://schemas.microsoft.com/ws/2008/06/identity/claims/primarysid"), query = ";objectSID;{0}", param = c.Value);
@RuleName = "ActiveDirectoryUPN" c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"] => issue(store = "Active Directory", types = ("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn"), query = ";userPrincipalName;{0}", param = c.Value);

运行以下命令:

[string]$IssuanceAuthorizationRules=Get-Content -Path C:\IssuanceAuthorizationRules.txt

[string]$IssuanceTransformRules=Get-Content -Path c:\IssuanceTransformRules.txt

Add-ADFSRelyingPartyTrust -Name "Outlook Web App" -Enabled $true -Notes "This is a trust for https://mail.contoso.com/owa/" -WSFedEndpoint https://mail.contoso.com/owa/ -Identifier https://mail.contoso.com/owa/ -IssuanceTransformRules $IssuanceTransformRules -IssuanceAuthorizationRules $IssuanceAuthorizationRules

Add-ADFSRelyingPartyTrust -Name "Exchange admin center (EAC)" -Enabled $true -Notes "This is a trust for https://mail.contoso.com/ecp/" -WSFedEndpoint https://mail.contoso.com/ecp/ -Identifier https://mail.contoso.com/ecp/ -IssuanceTransformRules $IssuanceTransformRules -IssuanceAuthorizationRules $IssuanceAuthorizationRules

第 4 步 - 安装 Web 应用程序代理角色服务(可选)

注意

步骤 4、步骤 5 和步骤 6 适用于想要使用 Web 应用程序代理发布 Exchange OWA 和 ECP 的用户,以及想要让 Web 应用程序代理执行 AD FS 身份验证的用户。 但是,无需使用 Web 应用程序代理发布 Exchange,因此,如果不使用 Web 应用程序代理并且确实希望 Exchange 本身执行 AD FS 身份验证,则可以跳到步骤 7。

Web 应用程序代理是 Windows Server 2012 R2 中的新远程访问角色服务。 Web 应用程序代理为公司网络中的 Web 应用程序提供反向代理功能,以允许多种设备上的用户从公司网络外部访问这些应用程序。 Web 应用程序代理使用 Active Directory 联合身份验证服务 (AD FS) 对 Web 应用程序的访问进行预先身份验证,并充当 AD FS 代理。 尽管 Web 应用程序代理不是必须的,但是当外部客户端可以访问 AD FS 时,我们建议使用此代理。 但是,通过 Web 应用程序代理使用 AD FS 身份验证时,不支持 Outlook Web App 中的脱机访问。 若要获取有关与 Web 应用程序代理集成的详细信息,请参阅为发布内部应用程序安装和配置 Web 应用程序代理

警告

不能在安装了 AD FS 的同一服务器上安装 Web 应用程序代理。

若要部署 Web 应用程序代理,必须在将充当 Web 应用程序代理服务器的服务器上安装包含 Web 应用程序代理角色服务的远程访问服务器角色。 安装 Web 应用程序代理角色服务的步骤:

  1. On the Web Application Proxy server, in Server Manager, click Manage, and then click Add Roles and Features.

  2. In the Add Roles and Features Wizard, click Next three times to get to the Server Roles page.

  3. On the Server Roles page, select Remote Access in the list, and then click Next.

  4. On the Features page, click Next.

  5. On the Remote Access page, read the information, and then click Next.

  6. On the Role Services page, select Web Application Proxy. Then in the Add Roles and Features Wizard window, click Add Features, and then click Next.

  7. In the Confirmation window, click Install. You can also check Restart the destination server automatically if required.

  8. In the Installation progress dialog box, verify that the installation was successful, and then click Close.

以下 Windows PowerShell cmdlet 执行的任务与以上步骤相同。

Install-WindowsFeature Web-Application-Proxy -IncludeManagementTools

第 5 步 - 配置 Web 应用程序代理角色服务(可选)

必须配置 Web 应用程序代理才能连接到 AD FS 服务器。 对所有要部署为 Web 应用程序代理服务器的服务器重复此过程。

配置 Web 应用程序角色服务的步骤:

  1. On the Web Application Proxy server, in Server Manager, click Tools, and then click Remote Access Management.

  2. In the Configuration pane, click Web Application Proxy.

  3. In the Remote Access Management console, in the middle pane, click Run the Web Application Proxy Configuration Wizard.

  4. In the Web Application Proxy Configuration Wizard, in the Welcome dialog box, click Next.

  5. On the Federation Server page, do the following, and then click Next:

    • 在“ 联合身份验证服务名称 ”框中,输入 AD FS 服务器的完全限定域名 (FQDN) (例如 ,adfs.contoso.com) 。

    • In the User name and Password boxes, type the credentials of a local administrator account on the AD FS servers.

  6. In the AD FS Proxy Certificate dialog box, in the list of certificates currently installed on the Web Application Proxy server, select the certificate to be used by Web Application Proxy for AD FS proxy functionality, and then click Next. 此处选择的证书应是其主题为联合身份验证服务名称 (例如 ,adfs.contoso.com) 。

  7. In the Confirmation dialog box, review the settings. If required, you can copy the Windows PowerShell cmdlet to automate additional installations. Click Configure.

  8. In the Results dialog box, verify that the configuration was successful, and then click Close.

以下 Windows PowerShell cmdlet 执行的任务与以上步骤相同。

Install-WebApplicationProxy -CertificateThumprint 1a2b3c4d5e6f1a2b3c4d5e6f1a2b3c4d5e6f1a2b -FederationServiceName adfs.contoso.com

第 6 步 - 使用 Web 应用程序代理发布 Outlook Web App 和 EAC(可选)

在步骤 3 中,你为 Outlook Web App 和 EAC 创建了中继方信任的声明,现在需要发布这两个应用程序。 但在执行此操作之前,请验证是否已为其创建了信赖方信任,并验证 Web 应用程序代理 服务器上是否具有适用于 Outlook Web App 和 EAC 的证书。 对于 Web 应用程序代理需要发布的所有 AD FS 终结点,必须在 AD FS 管理控制台中将终结点设置为“启用代理”。

使用 Web 应用程序代理,按照步骤发布 Outlook Web App。 对于 EAC,重复这些步骤即可。 发布 EAC 时,需要更改名称、外部 URL、外部证书和后端 URL。

使用 Web 应用程序代理发布 Outlook Web App 和 EAC 的步骤:

  1. On the Web Application Proxy server, in the Remote Access Management console, in the Navigation pane, click Web Application Proxy, and then in the Tasks pane, click Publish.

  2. In the Publish New Application Wizard, on the Welcome page, click Next.

  3. On the Preauthentication page, click Active Directory Federation Services (AD FS), and then click Next.

  4. On the Relying Party page, in the list of relying parties, select the relying party for the application that you want to publish, and then click Next.

  5. On the Publishing Settings page, do the following, and then click Next:

    1. In the Name box, enter a friendly name for the application. This name is used only in the list of published applications in the Remote Access Management console. 可以将 OWAEAC 用于名称。

    2. 在“外部 URL”框中,输入此应用程序的外部 URL (例如,https://external.contoso.com/owa/对于 Outlook Web App,https://external.contoso.com/ecp/输入 EAC) 。

    3. In the External certificate list, select a certificate whose subject name matches the host name of the external URL.

    4. In the Backend server URL box, enter the URL of the back-end server. 请注意,输入外部 URL 时会自动输入此值,仅当后端服务器 URL 不同 (时,才应更改此值,例如https://mail.contoso.com/owa/,Outlook Web App和 https://mail.contoso.com/ecp/ EAC) 。

    注意

    Web Application Proxy can translate host names in URLs but cannot translate paths. Therefore, you can enter different host names, but you must enter the same path. 例如,可以输入 的外部 URL https://external.contoso.com/app1/ 和 后端服务器 URL https://mail.contoso.com/app1/。 但是,不能输入 的外部 URL https://external.contoso.com/app1/ 和 后端服务器 URL https://mail.contoso.com/internal-app1/

  6. On the Confirmation page, review the settings, and then click Publish. You can copy the Windows PowerShell command to set up additional published applications.

  7. On the Results page, make sure that the application published successfully, and then click Close.

以下 Windows PowerShell cmdlet 执行的任务与 Outlook Web App 的上述步骤相同。

Add-WebApplicationProxyApplication -BackendServerUrl 'https://mail.contoso.com/owa/' -ExternalCertificateThumbprint 'E9D5F6CDEA243E6E62090B96EC6DE873AF821983' -ExternalUrl 'https://external.contoso.com/owa/' -Name 'OWA' -ExternalPreAuthentication ADFS -ADFSRelyingPartyName 'Outlook Web App'

以下 Windows PowerShell cmdlet 执行的任务与 EAC 的上述步骤相同。

Add-WebApplicationProxyApplication -BackendServerUrl 'https://mail.contoso.com/ecp/' -ExternalCertificateThumbprint 'E9D5F6CDEA243E6E62090B96EC6DE873AF821983' -ExternalUrl 'https://external.contoso.com/ecp/' -Name 'EAC' -ExternalPreAuthentication ADFS -ADFSRelyingPartyName 'Exchange admin center'

完成这些步骤后,Web 应用程序代理会对 Outlook Web App 和 EAC 客户端执行 AD FS 身份验证,还会代表这两个应用程序代理对 Exchange 的连接。 您不需要为 Exchange 本身配置 AD FS 身份验证,因此,请继续执行第 10 步,测试您的配置。

第 7 步 - 将 Exchange 2013 配置为使用 AD FS 身份验证

对 AD FS 进行配置以用于对 Exchange 2013 中的 Outlook Web App 和 EAC 进行基于声明的身份验证时,必须为 Exchange 组织启用 AD FS。 必须使用 Set-OrganizationConfig cmdlet 为您的组织配置 AD FS 设置:

  • 将 AD FS 颁发者设置为 https://adfs.contoso.com/adfs/ls/

  • 将 AD FS URI 设置为 https://mail.contoso.com/owa/https://mail.contoso.com/ecp/

  • 在 AD FS 服务器上使用 Windows PowerShell 并输入 Get-ADFSCertificate -CertificateType "Token-signing"来查找 AD FS 令牌签名证书指纹。 然后,分配找到的令牌签名证书指纹。 如果 AD FS 令牌签名证书已过期,必须使用 Set-OrganizationConfig cmdlet 更新来自新 AD FS 令牌签名证书的指纹。

在 Exchange 命令行管理程序中运行以下命令。

$uris = @("https://mail.contoso.com/owa/","https://mail.contoso.com/ecp/")
Set-OrganizationConfig -AdfsIssuer "https://adfs.contoso.com/adfs/ls/" -AdfsAudienceUris $uris -AdfsSignCertificateThumbprint "88970C64278A15D642934DC2961D9CCA5E28DA6B"

注意

这些方案不支持 -AdfsEncryptCertificateThumbprint 参数。

有关详细信息和语法,请参阅 Set-OrganizationConfigGet-ADFSCertificate

第 8 步 - 在 OWA 和 ECP 虚拟目录上启用 AD FS 身份验证

对于 OWA 和 ECP 虚拟目录,将 AD FS 身份验证启用作为唯一的身份验证方法并禁用所有其他形式的身份验证。

警告

配置 OWA 虚拟目录之前必须配置 ECP 虚拟目录。

使用 Exchange 命令行管理程序配置 ECP 虚拟目录。 在 Shell 窗口中运行以下命令。

Get-EcpVirtualDirectory | Set-EcpVirtualDirectory -AdfsAuthentication $true -BasicAuthentication $false -DigestAuthentication $false -FormsAuthentication $false -WindowsAuthentication $false

使用 Exchange 命令行管理程序配置 OWA 虚拟目录。 在 Shell 窗口中运行以下命令。

Get-OwaVirtualDirectory | Set-OwaVirtualDirectory -AdfsAuthentication $true -BasicAuthentication $false -DigestAuthentication $false -FormsAuthentication $false -WindowsAuthentication $false -OAuthAuthentication $false

注意

上述 Exchange 命令行管理程序命令可用于配置组织中每个客户端访问服务器上的 OWA 和 ECP 虚拟目录。 如果不想将这些设置应用于所有客户端访问服务器,请使用 -Identity 参数并指定客户端访问服务器。 您可能会希望只对组织中面向 Internet 的客户端访问服务器应用这些设置。

有关详细信息和语法,请参阅 Get-OwaVirtualDirectorySet-OwaVirtualDirectoryGet-EcpVirtualDirectorySet-EcpVirtualDirectory

第 9 步 - 重启或再循环 Internet Information Services (IIS)

完成全部所需步骤(包括对 Exchange 虚拟目录进行更改)后,您需要重新启动 Internet 信息服务。 为此,可以使用下列方法之一:

  • 使用 Windows PowerShell:

    Restart-Service W3SVC,WAS -force
    
  • 使用命令行:单击“ 开始”,单击“ 运行”,键入 IISReset /noforce,然后单击“ 确定”。

  • (IIS) 管理器使用 Internet 信息服务器:在 服务器管理器>IIS 中,单击“工具”,然后单击“Internet Information Services (IIS) 管理器”。 In the Internet Information Servers (IIS) Manager window, in the action pane under Manage Server, click Restart.

第 10 步 - 为 Outlook Web App 和 EAC 测试 AD FS 声明

若要为 Outlook Web App 测试 AD FS 声明,请执行以下操作:

  • 在 Web 浏览器中,登录到 Outlook Web App (例如 https://mail.contoso.com/owa) 。

  • 在浏览器窗口中,如果您看到证书错误,只需继续转到 Outlook Web App 网站即可。 您应该会重定向到 ADFS 登录页面或 ADFS 凭据提示页面。

  • 键入用户名 (域\user) 和密码,然后单击“ 登录”。

此时,系统会在窗口中加载 Outlook Web App。

为 EAC 测试 AD FS 声明的步骤:

  1. 在 Web 浏览器中,转到 https://mail.contoso.com/ecp

  2. 在浏览器窗口中,如果您看到证书错误,只需继续转到 ECP 网站即可。 您应该会重定向到 ADFS 登录页面或 ADFS 凭据提示页面。

  3. 键入用户名 (域\user) 和密码,然后单击“ 登录”。

  4. EAC 应该会在窗口中加载。

您可能希望了解的其他信息

多重身份验证

对于本地 Exchange 2013 SP1 部署,使用声明部署和配置 Active Directory 联合身份验证服务 (AD FS) 2.0 意味着 Exchange 2013 SP1 中的 Outlook Web App 和 EAC 可以支持多重身份验证方法,例如基于证书的身份验证、身份验证或安全令牌,以及指纹身份验证。 双重身份验证常常会与其他形式的身份验证混淆。 多重身份验证需要使用三个身份验证要素中的两个。 这些因素是:

  • 只有用户才知道的信息(例如密码、PIN 或模式)

  • 只有用户才有的东西(例如 ATM 卡、安全令牌、智能卡或移动电话)

  • 只有用户本身才拥有的东西(例如生物特征,指纹)

有关 Windows Server 2012 R2 中多重身份验证的详细信息,请参阅概述:使用适用于敏感应用程序的附加多重身份验证管理风险操作实例:使用适用于敏感应用程序的附加多重身份验证管理风险

在 Windows Server 2012 R2 AD FS 角色服务中,联合身份验证服务充当安全令牌服务,提供用于声明的安全令牌,并为你提供支持多重身份验证的功能。 联合身份验证服务根据提供的凭据颁发令牌。 在帐户存储验证用户的凭据之后,便会根据信任策略的规则生成用户声明,然后将其添加到颁发给客户端的安全令牌中。 有关声明的详细信息,请参阅了解声明

与其他版本的 Exchange 共存

如果组织中部署了多个 Exchange 版本,则可以对 Outlook Web App 和 EAC 使用 AD FS 身份验证。 仅 Exchange 2010 和 Exchange 2013 部署支持此方案,并且仅当所有客户端都通过 Exchange 2013 服务器进行连接 ,并且 这些 Exchange 2013 服务器已配置为进行 AD FS 身份验证时。

在 Exchange 2010 服务器上有邮箱的用户可以通过已配置 AD FS 身份验证的 Exchange 2013 服务器来访问自己的邮箱。 对 Exchange 2013 服务器的初始客户端连接使用的是 AD FS 身份验证。 不过,对 Exchange 2010 服务器的代理连接使用的是 Kerberos。 不支持通过其他任何方式来为 Exchange Server 2010 直接配置 AD FS 身份验证。