Windows Server 上 AD FS 中用于证书验证的备用主机名绑定

适用于:Windows Server 2016 及更高版本

在许多网络中,本地防火墙策略可能不允许通过非标准端口(如 49443)进行通信。 在 Windows Server 上使用 AD FS 对早期版本的 Windows 进行证书验证时,非标准端口可能会产生问题。 在同一台主机上,设备身份验证和用户证书身份验证不可能存在不同的绑定。

对于 Windows Server 2016 之前的 Windows 版本,默认端口 443 已绑定用于接收设备证书。 无法通过更改该端口的方法来支持同一通道中的多个绑定。 智能卡身份验证不起作用,也不会通知用户说明原因。

Windows Server 中的 AD FS 支持备用主机名绑定

Windows Server 中的 AD FS 通过两种模式来为备用主机名绑定提供支持:

  • 第一种模式使用相同的主机 (adfs.contoso.com) 和不同的端口(443、49443)。

  • 第二种模式使用不同的主机(adfs.contoso.comcertauth.adfs.contoso.com)和相同的端口 (443)。 此模式要求 TLS/SSL 证书支持 certauth.\<adfs-service-name> 作为备用主题名称。 备用主机名绑定可在创建服务器场时及性能配置,也可稍后使用 PowerShell 进行配置。

如何为证书身份验证配置备用主机名绑定

可以使用两种方法来添加用于证书身份验证的备用主机名绑定:

  • 第一种方法是使用 Windows Server 2016 的 AD FS 来设置新的 AD FS 服务器场。 如果证书包含主题备用名称 (SAN),则证书会自动设置为使用前面所述的第二种模式。 两个不同的主机(sts.contoso.comcertauth.sts.contoso.com)会自动设置为相同的端口。

    如果证书不包含 SAN,警告消息会显示证书主题备用名称不支持 certauth.*

    The SSL certificate subject alternative names do not support host name 'certauth.adfs.contoso.com'. Configuring certificate authentication binding on port '49443' and hostname 'adfs.contoso.com'.
    
    The SSL certificate does not contain all UPN suffix values that exist in the enterprise. Users with UPN suffix values not represented in the certificate will not be able to Workplace-Join their devices. For more information, see http://go.microsoft.com/fwlink/?LinkId=311954.
    

    如果安装的证书包含 SAN,则只能看到消息的第二部分:

    The SSL certificate does not contain all UPN suffix values that exist in the enterprise. Users with UPN suffix values not represented in the certificate will not be able to Workplace-Join their devices. For more information, see http://go.microsoft.com/fwlink/?LinkId=311954.
    
  • 第二种方法可在 Windows Server 上部署 AD FS 后使用。 可以使用 PowerShell cmdlet Set-AdfsAlternateTlsClientBinding 为证书身份验证添加备用主机名绑定。 有关详细信息,请参阅 Set-AdfsAlternateTlsClientBinding

    Set-AdfsAlternateTlsClientBinding -Member ADFS1.contoso.com -Thumbprint '<thumbprint of cert>'
    

在确认证书配置的提示下,选择“是”或“全是”。