【Azure 应用服务】Azure Web App 服务默认支持一些 Weak TLS Ciphers Suite,是否有办法自定义修改呢?

服务,Weak ,办法,TLS · 浏览次数 : 115

小编点评

## Azure Web App 中如何关闭弱 TLS 密钥套件? Azure Web App 提供以下方法来关闭弱 TLS 密钥套件: 1. **修改注册表**: - 打开 `regedt32` 或 `regedit`工具。 - 搜索 `Computer\\HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\SecurityProviders`。 - 在 `Enabled` 字段中找到所有 `SCHANNEL` 和 `NULLSCHANNEL` 的子节点。 - 将 `Enabled` 值设置为 `0x0`。 - 保存配置文件。 2. **更新应用程序服务网关 (Application Gateway)**: - 在您的 Web App 中启用 `Application Gateway`。 - 在 `SSL Policy` 中设置最低可接受的加密套件为 `TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA`。 **注意**: * 这将仅适用于高级层 (Premium) 的 Web App。 * 其他定价层的 Web App 无法更改 `minTlsCipherSuite` 属性的值。 * 在启用 `Application Gateway` 后,您需要重新启动您的 Web App。

正文

问题描述

当 Azure Web App 进行安全扫描后,发现依旧支持很多弱TLS加密套件(Weak TLS Ciphers Suite),那么是否有办法来关闭这些弱的加密套件呢?

在Windows IIS环境中,可以通过修改注册表修改 For Microsoft IIS, you should make some changes to the system registry.

Incorrectly editing the registry may severely damage your system. Before making changes to the registry, you should back up any valued data on your computer.

a. Click Start, click Run, type regedt32 or type regedit, and then click OK.

b. In Registry Editor, locate the following registry key: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders

c. Set "Enabled" DWORD to "0x0" for the following registry keys:

  • SCHANNEL\Ciphers\DES 56/56
  • SCHANNEL\Ciphers\RC4 64/128
  • SCHANNEL\Ciphers\RC4 40/128
  • SCHANNEL\Ciphers\RC2 56/128
  • SCHANNEL\Ciphers\RC2 40/128
  • SCHANNEL\Ciphers\NULL
  • SCHANNEL\Hashes\MD5

那么,在Azure Web App服务中,是否有办法来修改 Weak TLS Ciphers 呢?

 

问题解答

当前,Web App 已经开始提供通过 API 来修改 minTlsCipherSuite 属性,通过修改最低可接受的加密套件,来实现对弱加密套件的排除。 但是,当前只有高级层(Premium) 支持。

具体的HTTP请求为:

PATCH https://management.chinacloudapi.cn/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web?api-version=2022-03-01

Request Body:

{ 
  "properties": { 
    "minTlsCipherSuite": "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" 
  } 
} 

 

而其他的定价层,当前并不支持,如果是高级层之下的Web App,当前并不支持修改 minTlsCipherSuite 的值。如果这些定价层的Web App需要解决弱加密套件问题,可以在前端加一个应用服务网关(Application Gateway), 网关服务支持修改加密套件。 详见:https://docs.azure.cn/zh-cn/application-gateway/application-gateway-ssl-policy-overview#custom-tls-policy

 

 

参考资料

Web Apps - Update Configuration : https://learn.microsoft.com/en-us/rest/api/appservice/web-apps/update-configuration

Disabling Weaker TLS Cipher Suites for Web Apps on Multi-tenant Premium App Service Plans : https://azure.github.io/AppService/2022/10/11/Public-preview-min-tls-cipher-suite.html#supported-cipher-suites

What are cipher suites and how do they work on App Service?

A cipher suite is a set of instructions that contains algorithms and protocols to help secure network connections between clients and servers. By default, the front-end’s OS would pick the most secure cipher suite that is supported by both the front-end and the client. However, if the client only supports weak cipher suites, then the front-end’s OS would end up picking a weak cipher suite that is supported by them both.

If a customer’s organization has restrictions on what cipher suites are not be allowed, they may update their web app’s minimum TLS cipher suite property to ensure that the weaker cipher suites would be disabled for their web app. The next part of the article will go through the new minimum TLS cipher suite feature that is currently in public preview.

Minimum TLS Cipher Suite Feature

The minimum TLS cipher suite feature comes with a pre-determined list of cipher suites that cannot be reordered nor reprioritized. Since the service is already using the ideal priority order, it is not recommended for customers to reprioritize the the cipher suite order. Customers can potentially leave their web apps exposed if weaker cipher suites are prioritized over the stronger ones. Customers also cannot add newer or different cipher suites to the list of supported cipher suites. When a minimum cipher suite is selected, all the cipher suites that are less secure than the selected minimum one would be disabled for the web app. There is no support to make exceptions and to disable only some of the cipher suites that are weaker than the selected minimum cipher suite.

与【Azure 应用服务】Azure Web App 服务默认支持一些 Weak TLS Ciphers Suite,是否有办法自定义修改呢?相似的内容:

【Azure 应用服务】Azure Web App 服务默认支持一些 Weak TLS Ciphers Suite,是否有办法自定义修改呢?

问题描述 当 Azure Web App 进行安全扫描后,发现依旧支持很多弱TLS加密套件(Weak TLS Ciphers Suite),那么是否有办法来关闭这些弱的加密套件呢? 在Windows IIS环境中,可以通过修改注册表修改 For Microsoft IIS, you should m

【Azure 应用服务】Web App Service 中的 应用程序配置(Application Setting) 怎么获取key vault中的值

问题描述 App Service中,如何通过 Application Setting 来配置 Key Vault中的值呢? 问题解答 首先,App Service服务可以直接通过引用的方式,无需代码的情况下,为Application Setting中的Key配置Key Vault中保存的值。参考官方

【Azure 应用服务】在App Service中新建WebJob时候遇见错误,不能成功创建新的工作任务

问题描述 在Azure App Service界面上,添加新的Web Job(工作任务)时,一直添加失败。无详细错误提示,在App Service的Activity Logs(活动日志)中,根本没有添加失败的任何操作记录,这是什么情况呢? Adding WebJob: Failed to add t

【Azure 应用服务】App Servie网站报403 ModSecurity Action错误

问题描述 App Service 部署应用程序,然后通过App Gateway(WAF) 提供公网访问,但是一直遇见403报错,刷新页面,回退,重新Web页面能缓解403问题。 问题分析 通过浏览器F12抓取网络日志(Network Trace)来定位403返回的情况,发现请求返回的Status为 

【Azure 应用服务】Azure JS Function 异步方法中执行SQL查询后,Callback函数中日志无法输出问题

Warning: Unexpected call to 'log' on the context object after function execution has completed. Please check for asynchronous calls that are not awaited or calls to 'done' made before function executi

【Azure 应用服务】Azure Powershell Function 出错 The term 'Connect-AzAccount' is not recognized

问题描述 在Azure Function中,执行Powershell的Function脚本时,先后出现 1:[Error] ERROR: The term 'Connect-AzAccount' is not recognized as a name of a cmdlet, function, s

【Azure 应用服务】Azure Function Timer触发函数加上Singleton后的问题

问题描述 在Azure Function Timer Trigger的函数中,添加了Singleton属性,当Function的实例变为3个后,发现Timer函数并没有在三个实例上同时运行,每次触发时,都只有在一个实例上运行。这时因为Singleton属性的原因吗? 问题解答 在调查Singleto

【Azure 应用服务】Azure Function Python函数部署到Azure后遇见 Value cannot be null. (Parameter 'receiverConnectionString') 错误

问题描述 使用VS Code创建Python Function,处理Event Hub中的数据。当部署到Azure Function App后,函数无法执行,查看 Function 日志出现 Value cannot be null. (Parameter 'receiverConnectionSt

【Azure 应用服务】Azure Function Python函数中,如何获取Event Hub Trigger的消息Event所属于的PartitionID呢?

问题描述 在通过Azure Function消费Event Hub中的消息时,我们从Function 的 Trigger Details 日志中,可以获得当前Funciton中处理的消息是哪一个分区(PartitionID), 偏移量Offset,序列号SequenceNumber 等信息。 但是在

【Azure 应用服务】Azure Function 部署槽交换时,一不小心把预生产槽上的配置参数交换到生产槽上,引发生产错误

问题描述 部署Function代码先到预生产槽中,进行测试后通过交换方式,把预生产槽中的代码交换到生产槽上,因为在预生产槽中的设置参数值与生产槽有不同,但是在交换的时候,没有仔细检查。导致在交换的时候,把预生产的一些设置值交换到生产中,引起生产错误。 那么是否只进行代码交换而不进行设置值的交换呢?