为什么我需要在 Azure Key Vault 中存储我的 ASP.NET 服务配置

Why I need to store my ASP.NET service configuration in Azure Key Vault

ASP.NET Core 中有一项功能,允许您将敏感的配置密钥作为机密存储在 Azure Key Vault 中。

但是,我看不到任何攻击场景,这将有助于保护我的配置值。

如果我的托管服务的服务器遭到破坏并且有人可以访问它,那么他可以使用这台受损机器的身份轻松访问 Azure Key Vault 机密。

这对我来说毫无意义,我认为我错过了这个功能本身的概念。

根据 documentation:

Common scenarios for using Azure Key Vault with ASP.NET Core apps include:

  • Controlling access to sensitive configuration data.

  • Meeting the requirement for FIPS 140-2 Level 2 validated Hardware Security Modules(HSMs) when storing configuration data.

在我个人看来,这更像是一个环境变量场景,您不希望变量位于任何员工都可以看到的 git 或者是一个开源项目甚至 public 项目。