gpt4 book ai didi

c# - Azure 诊断 - 加密 cscfg 中的连接字符串

转载 作者:行者123 更新时间:2023-12-03 04:32:17 25 4
gpt4 key购买 nike

在我们的项目中,我们想要使用 Azure 诊断。一切都很好,除了一件事之外,似乎无法加密 cscfg 文件中的 Azure 诊断连接字符串。以 cscfg 中的此配置部分为例(实际值被隐藏):

在上面,整个 conn 字符串(也称为 AccountKey)在 Azure 门户中可见。这是我们的问题。

验证链接: https://manage.windowsazure.com/microsoft.onmicrosoft.com#Workspaces/CloudServicesExtension/CloudService/your-cloud-srv/configure

此外,还可以在这个 cscfg 文件中看到它。在推出期间,我们不想公开 AccountKey除门户管理员之外的任何其他方。现在,我的问题是:是否可以在 cscfg 文件中使用加密的 AccountKey,或者,建议的方式是什么来激活 Azure 诊断,以便在 Azure Diag 激活之前可以解密 conn 字符串?

这一切都必须与最新的 Azure SDK 2.71 或 2.8.1 配合使用。

更新:如果我添加加密的 conn 字符串来表示 cscfg,例如 EncDiagConnString,如果我在 Azure 角色中提供解密的 conn 字符串,是否仍然可以使用 Azure SDK 2.7.1 或 Azure SDK 2.8.1 以编程方式启动诊断OnStart()方法?

更新2:似乎可以通过Azure管理API(REST API)在云服务之外激活Azure诊断,最好的选择似乎是使用Azure PowerShell cmdlet:https://azure.microsoft.com/en-us/documentation/articles/cloud-services-dotnet-diagnostics/

最佳答案

为此,您有两个选项是将连接字符串存储在 App Settings / Connections strings! 中。对于该应用程序。或者使用 Azure Key Vault存储应用程序 secret 并以编程方式访问它们。

关于c# - Azure 诊断 - 加密 cscfg 中的连接字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35032765/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com