【问题标题】:Add Relying Party Trust is failing in ADFS SAML在 ADFS SAML 中添加信赖方信任失败
【发布时间】:2021-01-28 13:35:30
【问题描述】:

我已经花了好几个小时来解决这些问题,所以我认为快速回顾一下可能对其他人也有帮助。

【问题讨论】:

    标签: saml saml-2.0 adfs


    【解决方案1】:

    首先,当尝试从元数据 URL 导入 RP 时:

    我收到了这个错误:

    An error occured during an attempt to read the federation metadata. Verify that the specified URL or hostname is a valid federation metadata endpoint.
    ...
    Error message: The underlying connection was closed: An unexpected error occured on a send.
    

    问题原来是由于 Windows Server 至少在 2016 年之前使用 TLS 1.0 用于 .NET 框架(其中实现了 ADFS 配置向导),而我的托管元数据文档的服务只允许 TLS 1.2作为最低版本:

    从安全角度来看,将最低版本删除到 TLS 1.0 是不可行的,因此正确的解决方法是在 ADFS 服务器上使用 enable TLS 1.2 as the default version

    这将解决问题(我通过测试确认)但随后一些仅支持 TLS 1.0 的其他 RP 将停止工作,因此我不得不放弃直接从 URL 导入元数据并使用文件导入选项:

    在这种情况下弹出另一个错误,恰好是:

    An error occured during an attempt to read the federation metadata. Verify that the specified URL or hostname is a valid federation metadata endpoint.
    ...
    Error message: Entity descriptor '...'. ID6018: Digest verification failed for reference '...'.
    

    当我使用换行符和制表符格式化元数据文件中的 XML 以提高可读性时,结果证明这是由我引起的 - 最初都是在一行上。 ADFS 不允许这样做,因此文档必须与来自元数据端点的文档完全相同。

    同一问题可能会导致不同的错误消息和代码,具体取决于 Windows 和 ADFS 版本。例如,这也可能是由元数据完整性检查失败引起的:

    An error occured during an attempt to read the federation metadata. Verify that the specified URL or hostname is a valid federation metadata endpoint.
    ...
    Error message: Entity descriptor '...'. ID6013: The signature verification failed.
    

    在成功导入原始元数据文件并添加合适的索赔签发政策后,我终于可以正常工作了:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-04-09
      • 1970-01-01
      • 2013-05-26
      • 2013-03-16
      • 1970-01-01
      • 2014-10-11
      • 2016-11-30
      • 1970-01-01
      相关资源
      最近更新 更多