Windows Server 上 AD FS 中憑證驗證的替代主機名稱繫結

適用於:Windows Server 2016 和更新版本

在許多網路上,本機防火牆原則可能無法允許流量通過非標準連接埠 (例如 49443)。 對於早期版本的 Windows,非標準連接埠可能會在 Windows Server 上的 AD FS 憑證驗證過程中產生問題。 無法對相同主機上的裝置驗證和使用者憑證驗證進行不同的繫結。

對於 Windows Server 2016 之前的 Windows 版本,預設連接埠 443 會繫結至接收裝置憑證。 無法變更此連接埠,以支援同一管道中的多個繫結。 智慧卡驗證無法運作,也沒有通知使用者,向其說明原因。

Windows Server 中的 AD FS 支援替代主機名稱繫結

Windows Server 中的 AD FS 透過使用兩種模式,來支援替代主機名稱繫結:

  • 第一種模式使用相同的主機 (adfs.contoso.com) 和不同的連接埠 (443、49443)。

  • 第二種模式使用相同連接埠 (443) 和不同主機 (adfs.contoso.comcertauth.adfs.contoso.com)。 此模式需要 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>'
    

在提示確認憑證設定時,選取 [是][全部皆是]