Azure配置设置比Web.Config更安全吗?

时间:2014-07-29 14:53:15

标签: asp.net security azure azure-cloud-services

我使用的是Azure云服务,而不是网站。

我想知道在Azure服务配置设置中存储敏感数据(密码)是否安全。

我真的不想实现加密Azure Web角色中的web.config所需的4部分博客系列,因此我认为我可以将我的设置保留在Azure配置中然后访问他们通过RoleEnvironment.GetConfigurationSettingValue()

这些设置在配置文件中很像web.config,所以我的问题是这个配置文件是仅用于构建云服务然后丢弃,还是在实例的生命周期内保留在磁盘上(从而将敏感数据暴露给攻击)。

我喜欢通过Portal在运行时更新这些设置的能力,我认为Portal是一个安全的端点,所以我可以使用它。但是,如果文件保留在磁盘上,那么它就不会比web.config文件恕我直言。

2 个答案:

答案 0 :(得分:4)

我们使用Web角色上安装的域证书加密/解密Azure配置设置和其他内容。我在我的博客上发布了一个完整的示例:Securing Azure ServiceConfiguration values for Enterprise Deployment

答案 1 :(得分:0)

我创建了一项功能请求:http://feedback.azure.com/forums/34192--general-feedback/suggestions/9025255-certificate-based-settings-encryption

这与远程桌面插件的功能类似(但更为惯用,imho)。远程桌面添加:

<ConfigurationSettings>
  <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" />
  <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="<name-of-user-account>" />
  <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="<base-64-encrypted-password>" />
  <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="<certificate-expiration>" />
  <Setting name="Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled" value="true" />
</ConfigurationSettings>
<Certificates>
  <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="<certificate-thumbprint>" thumbprintAlgorithm="sha1" />
</Certificates>

RDP插件“已知”Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword值已加密,将使用证书Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption对其进行解密。

我的功能请求是将名为thumbprint的属性添加到<Setting />节点。调用CloudCloudConfigurationManager.GetSetting()将使用指示的证书无缝解密该值。

那将是多么美妙......

相关问题