是否可以从已部署的Web角色获取web.config? [英] Is it possible to get the web.config from a deployed Web Role?

查看:131
本文介绍了是否可以从已部署的Web角色获取web.config?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试确定为部署到Azure的Web角色加密web.config的优点.这个问题的答案似乎凸显了知道谁可以访问该实例的重要性:

I'm currently trying to decide the merits of encrypting the web.config for a Web Role deployed to Azure. The answer to this question seems highlights the importance of knowing who can access the instance:

应将数据库使用Azure Cloud时Web.config中的ConnectionString是否被加密?

但是,我给人的印象是,没有人可以以允许他们读取web.config的方式访问Web角色实例.

However, I was under the impression no-one could access a Web Role instance in a way that would allow them to read the web.config.

所以我的问题是:是否可以从部署的Web角色获取web.config?

例如:我未曾见过的Azure门户中有一个选项吗?是否可以通过其他部署进行访问?

For example: Is there an option in the Azure Portal I haven't seen? Would it be possible to access via another deployment?

推荐答案

首先,对web.config内容进行未加密意味着任何可以访问该服务包的人都可以访问web.config内容-并且可以比你要.例如,如果您具有自动构建,则公司中任何看到构建结果的人都将看到该数据.您可以决定是否可以接受.

First of all, having web.config contents unencrypted means anyone who can access the service package can access the web.config contents - and that can be more people than you want. For example, if you have an automatic build anyone in your company who sees the build results will see that data. You decide whether that's acceptable.

接下来,不要忘记软件中存在漏洞.可能在某个时候在IIS中发现了一个漏洞,该漏洞使得可以轻松下载web.config.

Next, don't forget that there're vulnerabilities in software. It might happen that at some point a vulnerability is found in IIS that allows for easy download of web.config.

接下来,如果您碰巧关闭了customErrors,并且在web.config中配置错误,则可能是谁向您的Web角色进行HTTP请求的人都会看到来自IIS的错误消息,说明在web.config中配置错误,并显示了发生错误配置的web.config的一部分.这可能会暴露您的秘密-这是类似暴露的示例.不太可能,但是在技术上是可能的.

Next, if you ever happen to have customErrors turned off and you have something misconfigured in web.config it might happen that whoever does an HTTP request to your web role will see an error message from IIS saying that this and that is misconfigured in web.config and showing part of web.config where the misconfiguration happened. That might happen to expose your secret - here's an example of similar exposure. Not very probable, but technically possible.

最后,就所有云提供商而言,您实际上并不能真正控制数据中心如何处理数据.他们可能会丢弃未破坏的磁盘,或者某些员工可能已损坏,并且您的服务包可能会泄漏.不太可能,但是在技术上是可能的.如果您问这样的问题(这是一个非常好的问题),您也应该考虑这种风险.

Finally, with all respect to all cloud providers you don't really control how data is being handled at datacenters. They might throw away an undestroyed disk or some employee may be corrupt and your service package may leak. Not very probable, but technically possible. If you ask questions like this one (and that's a very good question to ask) you should account for this risk too.

因此,与往常一样,没有绝对的安全性.您所能做的就是提高标准.正确地以加密形式存储连接字符串肯定会提高标准.

So as usual there's no absolute security. All you can is just raise the bar. Storing connection string in encrypted form properly certainly raises the bar.

您可能还对此相关问题的答案感兴趣.

这篇关于是否可以从已部署的Web角色获取web.config?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆