Azure Pipelines 本地代理无法连接并出现 SSL 错误

Rob*_*cey 9 windows-server-2012-r2 tls1.2 azure-devops azure-pipelines

我们有一台本地服务器 (Windows Server 2012 R2),其上运行着 Azure Pipelines 代理。今天(2022 年 1 月 31 日)该代理无法再连接到我们的 Azure DevOps 组织。

azure代理的日志文件

从日志文件来看,我认为这是因为它正在尝试连接较旧的 TLS 版本,该版本截至今天已不再可用 - https://devblogs.microsoft.com/devops/azure-devops-services-to -要求-tls-1-2/

因此,我按照有关如何确保启用 TLS 1.2 的说明进行操作,并通过运行此处建议的 PowerShell 脚本确认了注册表编辑器中的设置 - https://learn.microsoft.com/en-us/security/engineering/解决 tls1 问题#更新 windows-powershell-脚本或相关注册表设置

一切看起来都很好,但仍然无法解决同样的问题。机器也已重新启动。如果我在内置的 Internet Explorer 浏览器中尝试它请求的 URL,它会失败,但在 Chrome 中它会成功,因此它一定仍在尝试使用 TLS 1.2 连接,但我不知道为什么。我也尝试重新安装代理(使用最新版本),但由于相同的错误而失败。有什么建议么?

on-*_*ray 10

在受影响的计算机上,您可以尝试使用 AzDO TLS 1.2 转换就绪检查器运行分析:https://github.com/microsoft/azure-devops-tls12/blob/main/AzureDevOpsTls12Analysis.ps1

该脚本检查是否启用了客户端 TLS 1.2 使用,检查密码套件问题并检查是否存在使旧版 .NET Framework 应用程序支持 TLS 1.2 所需的开关。根据发现,它会打印缓解建议或生成定制的缓解脚本 (ps1)。

模拟问题中描述的问题,脚本给出建议:

MITIGATION 'gpeditREM': via Local Group Policy setting
    Run gpedit.msc:
    - Navigate to "Computer Config/Administrative Templates/Network/SSL Config Settings"
    - Choose setting "SSL Cipher Suite Order" -> Edit
    - If 'Enabled' is not checked, then continue to the next mitigation below.
    - If 'Enabled' is checked:
      - *either* change to 'Not configured' (resets to OS-default setting)"
      - *or* keep 'Enabled' and in field 'SSL Cipher Suites' add at least one of the following items to comma-separated list:
        TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
        TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
    - Press 'OK' button
    Restart the computer

MITIGATION 'regFunctionsDEL': deletion of cipher suite list in registry
    Mitigation script generated at .\Mitigation-regFunctionsDEL.ps1
    Run the mitigation script as Administrator:
    - If 'Done!' is printed, then operation was successfull.
    - If 'Mitigation was not effective!' is printed, then cipher suites are enforced via domain GPO - talk to your domain administrator.
Run Code Online (Sandbox Code Playgroud)

屏幕截图:WS 2012 R2 上的 TLS 1.2 转换就绪检查器

Windows Server 2012 R2(及更早版本)容易受到密码套件问题的影响,因为它仅支持 AzDevOps 当前所需的四个 TLS 1.2 密码套件中的两个(即使仅在应用此更新时才支持这两个)。

请记住,Azure DevOps 已回滚 1 月 31 日弃用的 TLS 1.0/1.1(IPv6 端点除外)。目前计划不早于 2022 年 3 月 31 日全面弃用(公告

  • 更新(2022 年 5 月):Azure DevOps 团队已完成dev.azure.com域上的 TLS 1.0/1.1 弃用。子域名*.visualstudio.com将紧随其后。
  • 更新(2022 年 8 月):Azure DevOps 已开始在*.visualstudio.com上弃用 TLS 1.0/1.1 。
  • 更新(2022 年 10 月):Azure DevOps 声明在所有域中已完成弃用 TLS 1.0/1.1。
  • 更新(2023 年 1 月):Azure DevOps 端点更改了它们支持的密码套件列表。删除了 TLS_DHE_* 密码,添加了两个 ECDHE+CBC 密码。这可能会导致禁用 ECDHE+CBC 的 Win Server 2012 R2 计算机出现问题。<-- 已于 2023 年 2 月 2 日恢复


Ken*_*n H 8

在服务器上使用 IISCrypto 启用以下 Cyphers 帮助我们解决了问题

密码套房酒店

TLS 1.2(按服务器首选顺序排列的套件)

  • TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 (0x9f) DH 2048 位 FS 256
  • TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 (0x9e) DH 2048 位 FS 128

这来自Vijay 的解决方案