简体   繁体   English

Azure Key Vault 访问权限和密钥安全

[英]Azure Key Vault access permissions and key security

I am developing a .NET application that uploads files to Azure Storage.我正在开发一个将文件上传到 Azure 存储的 .NET 应用程序。 I am leveraging client-side encryption as done in the tutorial at https://azure.microsoft.com/en-us/documentation/articles/storage-encrypt-decrypt-blobs-key-vault/我正在利用https://azure.microsoft.com/en-us/documentation/articles/storage-encrypt-decrypt-blobs-key-vault/ 上的教程中所做的客户端加密

The application works, ie I can successfully upload an encrypted blob to a selected storage account and container.该应用程序工作正常,即我可以成功地将加密的 blob 上传到选定的存储帐户和容器。

However, I have some concerns about the security of the RSA key.但是,我对 RSA 密钥的安全性有一些担忧。 If the client application gets the key from Key Vault to use in the BlobEncryptionPolicy, that key could get compromised?如果客户端应用程序从 Key Vault 获取密钥以在 BlobEncryptionPolicy 中使用,那么该密钥可能会被泄露? The only thing the application really needs is the public key of the RSA pair, the private key should remain stored on the server (decrypting only happens by a trusted web app).应用程序真正需要的是 RSA 对的公钥,私钥应保留存储在服务器上(解密仅由受信任的 Web 应用程序进行)。

The other concern I have is that it is trivial for the AAD integration info to be obtained from the app.config.我担心的另一个问题是从 app.config 获取 AAD 集成信息是微不足道的。 How does one work around that?如何解决这个问题?

(note: the workstations on which the upload app will run are not necessarily trusted) (注意:运行上传应用程序的工作站不一定受信任)

Some additional reading of the Azure Storage and Key Vault walkthrough document at https://azure.microsoft.com/en-us/documentation/articles/storage-encrypt-decrypt-blobs-key-vault/ has provided the answer:https://azure.microsoft.com/en-us/documentation/articles/storage-encrypt-decrypt-blobs-key-vault/上的 Azure 存储和 Key Vault 演练文档的一些额外阅读提供了答案:

"The Storage client itself never has access to KEK." “存储客户端本身永远无法访问 KEK。”

The KEK is the "Key Encryption Key" which encrypts the actual one-time-use symmetric encryption key used to encrypt the actual blob. KEK 是“密钥加密密钥”,它对用于加密实际 blob 的实际一次性使用对称加密密钥进行加密。

All you need is a public key to encrypt a random symmetric key and use that symmetric key to encrypt your data.您只需要一个公钥来加密随机对称密钥并使用该对称密钥来加密您的数据。 The server process (Function or similar) has access to the private key used to decrypt the symmetric key, and then decrypt the blob.服务器进程(Function 或类似的)可以访问用于解密对称密钥的私钥,然后解密 blob。 Access the the private key, held in KV, can be restricted using RBAC policy and applying a managed identity to the process that needs to read the private key.访问保存在 KV 中的私钥,可以使用 RBAC 策略进行限制,并将托管身份应用于需要读取私钥的进程。

Finally, the public key really should not be a naked key, it should be in a X.509 cert so you can verify the authenticity of the server end point.最后,公钥真的不应该是裸密钥,它应该在 X.509 证书中,以便您可以验证服务器端点的真实性。

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

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