简体   繁体   English

加密web.config字符串Azure

[英]Encrypting a web.config string Azure

I need to encrypt the connection string in my web.config file for my MVC5 project. 我需要对我的MVC5项目的web.config文件中的连接字符串进行加密。 The database is an Azure SQL database and my application will be hosted on Azure as well. 该数据库是Azure SQL数据库,我的应用程序也将托管在Azure上。 I have never done encryption before and I am struggling. 我以前从未做过加密,因此我很努力。

First I followed instructions in this article - https://azure.microsoft.com/en-us/blog/securing-your-connection-string-in-windows-azure-part-1/ . 首先,我按照本文中的说明进行操作-https: //azure.microsoft.com/zh-cn/blog/securing-your-connection-string-in-windows-azure-part-1/ But when it came to loading the files on to Azure, the link contained in the document was broken, and I couldn't find out where to upload them. 但是,在将文件加载到Azure时,文档中包含的链接已损坏,我无法找到将它们上传到哪里。

After some research, I found out that Azure Key Vault is the way forward, but I am struggling to find out how to use Key Vault as it is not in Azure Management Portal and to use it you need Powershell knowledge. 经过研究,我发现Azure Key Vault是前进的方向,但是我正在努力寻找如何使用Key Vault的方法,因为它不在Azure管理门户中,要使用它,您需要Powershell知识。 I have tried to use Powershell as per this link https://channel9.msdn.com/Blogs/Windows-Azure/Azure-Key-Vault-Developer-Quick-Start only to find out that some of the commands are no longer in use. 我试图按照此链接使用Powershell https://channel9.msdn.com/Blogs/Windows-Azure/Azure-Key-Vault-Developer-Quick-Start只是为了发现某些命令不再存在采用。

Is there an easier method for me to follow? 有没有更简单的方法可供我遵循? What other options do I have? 我还有什么其他选择?

Thanks 谢谢

Yes, Key Vault could be the way to go. 是的,Key Vault可能是要走的路。 But i would recommend you to go to the Azure.com articles instead of blogs/videos/etc, because only the official site has the up-to-date information. 但是我建议您转到Azure.com文章,而不要访问Blog / videos / etc,因为只有官方网站才提供最新信息。 For example, here is the good start about client-side things . 例如, 这是有关客户端事物的良好开端 Here (yes, it is a blog, but very new :-) is the blog post that discusses the problem you mentioned. 这里 (是的,这是一个博客,但是很新::)是讨论您提到的问题的博客文章。

There are some more traditional techniques about securing your connection string like the process that replaces dev/test connstrings by production strings as a part of the secure build/deployment process. 关于安全保护连接字符串,还有一些更传统的技术 ,例如将过程用生产字符串替换dev / test connstrings的过程,作为安全构建/部署过程的一部分。 Here, Visual Studio Team Services build definitions and Continuous Integration/Deployment may be the another approach (you can create the build definition and, right before the deployment, you may replace the connstring using some kind of scripts). 在这里,Visual Studio Team Services构建定义和持续集成/部署可能是另一种方法(您可以创建构建定义,并且在部署之前,可以使用某种脚本替换connstring)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM