How paranoid should I be about my Azure application binary files being stolen?

眉间皱痕 提交于 2020-01-03 08:54:11

问题


I need to migrate a huge application to Windows Azure. The application depends on a third-party library that requires an activation key stored in a special binary file on the role instance filesystem.

Obviously that key has to be either included into the role package or stored somewhere where role can fetch it. The activation key will not be bound to the machine (since I have no idea where exactly a role will be run in the cloud) so anyone can use it to make a copy of that library work.

Since Azure roles run somewhere not under our control I feel somewhat paranoid about the key being stolen and made widely available.

How do I evaluate how likely it is to steal a binary file that is included into Azure role? How do I mitigate such risks?


回答1:


When asking questions like this you need to differentiate your attackers:

  • A2) Rogue internet hacker
  • A3) A developer in your organization
  • A4) A person in your organization who does deployments

Your role binaries are not accessible to A2, however they are very accessible to A3 and A4.

As mentioned in another answer, you can store your secrets in the Role Configuration File. However, these secrets are still accessible to A4 (anyone with access to the portal).

To defend against A4 you want to encrypt the secrets in the role configuration file with a key that isn't present in the role binaries or the role configuration. Then in your role binaries you decrypt the encrypted role setting, with the decryption key.

The key to use for encrypting the secrets is a certificate, which the Azure SDK will install for you. You can find a post about setting up certificates for azure here.

In summary, for secrets where you need to defend against people in your organization who do deployments/have access to your configuration files you do the following:

Have a trusted party do the following:

  • Generate a Certificate/Private Key
  • Encrypt secrets with the Certificate, and store the encrypted settings in your configuration files
  • Upload the Certificate/Private Key to your service.

Then modify your service to:

  • Have the service model install the Certificate/PrivateKey
  • Have your application, load the private key for decrypting secrets
  • Have your application load the encrypted settings from role configuration, and decrypt them with the private key.



回答2:


As far security is concerned, unless your team is extremely capable in this area, the default always upgraded Azure OS is probably much more secure than any self-configured host. At least, this is how we (aka my company, Lokad) assess the situation two years after migrating in full to Windows Azure compared to our previous self-hosted situation.

Then, if you have credentials, such as licence keys, then the most logical place to put them is the Role configuration file - not the Role binaries. You can naturally regenerate the special file within the VM as needed, but this way, you don't internally spread your credentials all over the place as you archive your binary versions.



来源:https://stackoverflow.com/questions/6213169/how-paranoid-should-i-be-about-my-azure-application-binary-files-being-stolen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!