简体   繁体   中英

Is it possible to encrypt the file using key vault and store it in storage account using “Azure Storage Data Movement Library”

I am able to Encrypt and decrypt blobs in Microsoft Azure Storage using Azure Key Vault but is it possible to do the same using Azure Storage Data Movement Library. Following is the code i am using with azure storage data movement library

                    TransferManager.Configurations.ParallelOperations = 32;
            TransferManager.Configurations.BlockSize = 4 * 1024 * 1024;
            ServicePointManager.DefaultConnectionLimit = Environment.ProcessorCount * 8;
            UploadOptions options = new UploadOptions();
            SingleTransferContext context = new SingleTransferContext();
            context.SetAttributesCallback = (destination) =>
            {
                CloudBlob destBlob = destination as CloudBlob;
                destBlob.Properties.ContentType = "application/octet-stream";
            };

            // Start the upload
            await TransferManager.UploadAsync(fileToUpload.InputStream, blob, options, context);

By Encrypt & Decrypt using Key Vault, do you mean this feature in Azure Storage Client library: https://docs.microsoft.com/en-us/azure/storage/storage-client-side-encryption ? DataMovement doesn't support this yet. If you mean to encrypt by yourself and upload the encrypted stream to Azure Storage with DataMovement, your code should just work as long as the stream is fixed length, readable and seekable.

I am able to Encrypt and decrypt blobs in Microsoft Azure Storage using Azure Key Vault but is it possible to do the same using Azure Storage Data Movement Library.

As far as I know, Azure Storage Data Movement Library doesn't support encrypt/decrypt features now. We could find others have reported the issue/feature request.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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