Secure connection string in Worker Role

时间:2015-06-26 10:01:30

标签: c# asp.net azure connection-string azure-worker-roles

What other options are there to secure connection strings and not commit them to version control when using a Worker Role apart from encrypting ServiceConfiguration.Cloud.cscfg - if that is even possible?

Web Apps have accessible variables in the portal - that seems not to be the case with Worker Roles.

1 个答案:

答案 0 :(得分:1)

云服务(其中一部分是工作者角色)确实在门户网站中公开了“设置”,并且可以像在App Service WebApps中那样对其进行更改。您无法在云上加密.cscfg。您可以在本地加密它们,但在部署之前必须解密它们。

如果要保护连接字符串和敏感数据,可以使用Azure KeyVault来实现。然后,您可以保护连接字符串或其他敏感值,并在应用程序中以安全的方式从Vault中检索它们。