How do I hide my storage and SQL connection strings using Azure Cloud Services?

I would like to move the Storage and SQL connection string from the configuration files stored in various projects of my solution, just to access the Azure Portal.

Keeping the connection strings under version control means that if anyone looks at our codebase, they have unrestricted access to our Azure accounts.

On Azure websites, connection strings can be set in the portal and will persist the next time you deploy. Can you do the same with cloud services?

+3


source to share


2 answers


No, It is Immpossible. A cloud service is a virtual machine, it is not an application that can use connection strings.

If you have a continuous integration server, what you can do is: before deploying your application to the cloud service, run a script that will change the connection string value to whatever you like and deploy it. This way, the connection string only shows up in your CI server, not in your code.



Note that if you have already linked connection strings to your codebase, there is no way to remove them from history. (Unless you are doing force push , which is not recommended).

+4


source


This is now possible with Azure Key Vault. I haven't tried - but plan on - but here's a good tutorial on starting with key store and then using key store from a web app . Whether this works exactly for cloud services I'm not sure.



+2


source







All Articles