From 787ea0797c274175617caedf71f2ee2b780d7cbd Mon Sep 17 00:00:00 2001 From: Steven Jin Date: Tue, 28 Jun 2022 17:05:48 -0700 Subject: [PATCH 01/18] fix retry --- .../azure/storage/blob/_download.py | 55 +++++++++++-------- 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_download.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_download.py index 854340b0b8de..4719a3cfbdcb 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_download.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_download.py @@ -11,8 +11,7 @@ from io import BytesIO from typing import Iterator, Union -import requests -from azure.core.exceptions import HttpResponseError, ServiceResponseError +from azure.core.exceptions import HttpResponseError, IncompleteReadError, ServiceResponseError from azure.core.tracing.common import with_current_context from ._shared.request_handlers import validate_and_format_range_headers @@ -205,17 +204,17 @@ def _download_chunk(self, chunk_start, chunk_end): download_stream_current=self.progress_total, **self.request_options ) - except HttpResponseError as error: - process_storage_error(error) - - try: - chunk_data = process_content(response, offset[0], offset[1], self.encryption_options) retry_active = False - except (requests.exceptions.ChunkedEncodingError, requests.exceptions.ConnectionError) as error: + except IncompleteReadError as error: retry_total -= 1 if retry_total <= 0: raise ServiceResponseError(error, error=error) time.sleep(1) + except HttpResponseError as error: + process_storage_error(error) + + chunk_data = process_content(response, offset[0], offset[1], self.encryption_options) + # This makes sure that if_match is set so that we can validate # that subsequent downloads are to an unmodified blob @@ -434,6 +433,14 @@ def _initial_request(self): self.size = self._file_size - self._start_range else: self.size = self._file_size + retry_active = False + + except IncompleteReadError as error: + retry_total -= 1 + if retry_total <= 0: + raise ServiceResponseError(error, error=error) + time.sleep(1) + continue except HttpResponseError as error: if self._start_range is None and error.response.status_code == 416: @@ -447,6 +454,13 @@ def _initial_request(self): download_stream_current=0, **self._request_options ) + retry_active = False + except IncompleteReadError as error: + retry_total -= 1 + if retry_total <= 0: + raise ServiceResponseError(error, error=error) + time.sleep(1) + continue except HttpResponseError as error: process_storage_error(error) @@ -456,22 +470,15 @@ def _initial_request(self): else: process_storage_error(error) - try: - if self.size == 0: - self._current_content = b"" - else: - self._current_content = process_content( - response, - self._initial_offset[0], - self._initial_offset[1], - self._encryption_options - ) - retry_active = False - except (requests.exceptions.ChunkedEncodingError, requests.exceptions.ConnectionError) as error: - retry_total -= 1 - if retry_total <= 0: - raise ServiceResponseError(error, error=error) - time.sleep(1) + if self.size == 0: + self._current_content = b"" + else: + self._current_content = process_content( + response, + self._initial_offset[0], + self._initial_offset[1], + self._encryption_options + ) # get page ranges to optimize downloading sparse page blob if response.properties.blob_type == 'PageBlob': From 228eeee47cafb532a0687dd723e4cefe2e573e29 Mon Sep 17 00:00:00 2001 From: Steven Jin Date: Tue, 28 Jun 2022 17:11:03 -0700 Subject: [PATCH 02/18] catch ServiceResponseError --- .../azure-storage-blob/azure/storage/blob/_download.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_download.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_download.py index 4719a3cfbdcb..dc1646336056 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_download.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_download.py @@ -205,7 +205,7 @@ def _download_chunk(self, chunk_start, chunk_end): **self.request_options ) retry_active = False - except IncompleteReadError as error: + except (IncompleteReadError, ServiceResponseError) as error: retry_total -= 1 if retry_total <= 0: raise ServiceResponseError(error, error=error) @@ -435,7 +435,7 @@ def _initial_request(self): self.size = self._file_size retry_active = False - except IncompleteReadError as error: + except (IncompleteReadError, ServiceResponseError) as error: retry_total -= 1 if retry_total <= 0: raise ServiceResponseError(error, error=error) @@ -455,7 +455,7 @@ def _initial_request(self): **self._request_options ) retry_active = False - except IncompleteReadError as error: + except (IncompleteReadError, ServiceResponseError) as error: retry_total -= 1 if retry_total <= 0: raise ServiceResponseError(error, error=error) From dc1b4819fcf3d75d77f9315907f5210339e695c3 Mon Sep 17 00:00:00 2001 From: Steven Jin Date: Tue, 28 Jun 2022 17:15:52 -0700 Subject: [PATCH 03/18] changelog --- sdk/storage/azure-storage-blob/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdk/storage/azure-storage-blob/CHANGELOG.md b/sdk/storage/azure-storage-blob/CHANGELOG.md index 92db7dfd442b..c452f916aee5 100644 --- a/sdk/storage/azure-storage-blob/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob/CHANGELOG.md @@ -5,6 +5,8 @@ ### Features Added ### Bugs Fixed +- Removed `requests` import from `azure.storage.blob._download`. #25017 +- Fixed retry mechanism in `azure.storage.blob._download`. #25017 ## 12.13.0b1 (2022-06-15) From 477ff17101e1a38840472443d98e410434e8a53f Mon Sep 17 00:00:00 2001 From: Steven Jin Date: Thu, 30 Jun 2022 20:26:38 -0700 Subject: [PATCH 04/18] undo retry changes --- .../azure/storage/blob/_download.py | 52 ++++++++----------- 1 file changed, 22 insertions(+), 30 deletions(-) diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_download.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_download.py index dc1646336056..11b9ee36f990 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_download.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_download.py @@ -11,7 +11,7 @@ from io import BytesIO from typing import Iterator, Union -from azure.core.exceptions import HttpResponseError, IncompleteReadError, ServiceResponseError +from azure.core.exceptions import HttpResponseError, ServiceResponseError, IncompleteReadError from azure.core.tracing.common import with_current_context from ._shared.request_handlers import validate_and_format_range_headers @@ -204,17 +204,17 @@ def _download_chunk(self, chunk_start, chunk_end): download_stream_current=self.progress_total, **self.request_options ) + except HttpResponseError as error: + process_storage_error(error) + + try: + chunk_data = process_content(response, offset[0], offset[1], self.encryption_options) retry_active = False except (IncompleteReadError, ServiceResponseError) as error: retry_total -= 1 if retry_total <= 0: raise ServiceResponseError(error, error=error) time.sleep(1) - except HttpResponseError as error: - process_storage_error(error) - - chunk_data = process_content(response, offset[0], offset[1], self.encryption_options) - # This makes sure that if_match is set so that we can validate # that subsequent downloads are to an unmodified blob @@ -433,14 +433,6 @@ def _initial_request(self): self.size = self._file_size - self._start_range else: self.size = self._file_size - retry_active = False - - except (IncompleteReadError, ServiceResponseError) as error: - retry_total -= 1 - if retry_total <= 0: - raise ServiceResponseError(error, error=error) - time.sleep(1) - continue except HttpResponseError as error: if self._start_range is None and error.response.status_code == 416: @@ -454,13 +446,6 @@ def _initial_request(self): download_stream_current=0, **self._request_options ) - retry_active = False - except (IncompleteReadError, ServiceResponseError) as error: - retry_total -= 1 - if retry_total <= 0: - raise ServiceResponseError(error, error=error) - time.sleep(1) - continue except HttpResponseError as error: process_storage_error(error) @@ -470,15 +455,22 @@ def _initial_request(self): else: process_storage_error(error) - if self.size == 0: - self._current_content = b"" - else: - self._current_content = process_content( - response, - self._initial_offset[0], - self._initial_offset[1], - self._encryption_options - ) + try: + if self.size == 0: + self._current_content = b"" + else: + self._current_content = process_content( + response, + self._initial_offset[0], + self._initial_offset[1], + self._encryption_options + ) + retry_active = False + except (IncompleteReadError, ServiceResponseError) as error: + retry_total -= 1 + if retry_total <= 0: + raise ServiceResponseError(error, error=error) + time.sleep(1) # get page ranges to optimize downloading sparse page blob if response.properties.blob_type == 'PageBlob': From 872be12f79da9e3623f3b0832237afa2cbad4159 Mon Sep 17 00:00:00 2001 From: Steven Jin Date: Thu, 30 Jun 2022 20:28:37 -0700 Subject: [PATCH 05/18] changelog formatting --- sdk/storage/azure-storage-blob/CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sdk/storage/azure-storage-blob/CHANGELOG.md b/sdk/storage/azure-storage-blob/CHANGELOG.md index c452f916aee5..73c3d1e431ce 100644 --- a/sdk/storage/azure-storage-blob/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob/CHANGELOG.md @@ -5,8 +5,7 @@ ### Features Added ### Bugs Fixed -- Removed `requests` import from `azure.storage.blob._download`. #25017 -- Fixed retry mechanism in `azure.storage.blob._download`. #25017 +- Removed forced `requests` import for sync calls. (25017) ## 12.13.0b1 (2022-06-15) From f388cf637c01c16b1fa1793fcc6d020f59862bfc Mon Sep 17 00:00:00 2001 From: Steven Jin Date: Mon, 25 Jul 2022 10:52:05 -0700 Subject: [PATCH 06/18] add tests --- .../azure/storage/blob/_download.py | 6 ++-- .../azure-storage-blob/tests/test_get_blob.py | 18 ++++++++++ .../azure-storage-blob/tests/test_retry.py | 33 ++++++++++++++++--- 3 files changed, 49 insertions(+), 8 deletions(-) diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_download.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_download.py index cdbfe1de2afc..077ec9812f7e 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_download.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_download.py @@ -11,7 +11,7 @@ from io import BytesIO from typing import Generic, Iterator, TypeVar -from azure.core.exceptions import HttpResponseError, ServiceResponseError, IncompleteReadError +from azure.core.exceptions import DecodeError, HttpResponseError, ServiceResponseError, IncompleteReadError from azure.core.tracing.common import with_current_context from ._shared.request_handlers import validate_and_format_range_headers @@ -212,7 +212,7 @@ def _download_chunk(self, chunk_start, chunk_end): try: chunk_data = process_content(response, offset[0], offset[1], self.encryption_options) retry_active = False - except (IncompleteReadError, ServiceResponseError) as error: + except (IncompleteReadError, HttpResponseError, DecodeError) as error: retry_total -= 1 if retry_total <= 0: raise ServiceResponseError(error, error=error) @@ -473,7 +473,7 @@ def _initial_request(self): self._encryption_options ) retry_active = False - except (IncompleteReadError, ServiceResponseError) as error: + except (IncompleteReadError, HttpResponseError, DecodeError) as error: retry_total -= 1 if retry_total <= 0: raise ServiceResponseError(error, error=error) diff --git a/sdk/storage/azure-storage-blob/tests/test_get_blob.py b/sdk/storage/azure-storage-blob/tests/test_get_blob.py index 1f5152d001e0..28da56ae4223 100644 --- a/sdk/storage/azure-storage-blob/tests/test_get_blob.py +++ b/sdk/storage/azure-storage-blob/tests/test_get_blob.py @@ -1019,4 +1019,22 @@ def test_get_blob_progress_readinto(self, storage_account_name, storage_account_ progress.assert_complete() self.assertEqual(len(data), read) + @BlobPreparer() + def test_unicode_get_blob_binary_data2(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + base64_data = 'AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/wABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR4fICEiIyQlJicoKSorLC0uLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVpbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gIGCg4SFhoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnp+goaKjpKWmp6ipqqusra6vsLGys7S1tre4ubq7vL2+v8DBwsPExcbHyMnKy8zNzs/Q0dLT1NXW19jZ2tvc3d7f4OHi4+Tl5ufo6err7O3u7/Dx8vP09fb3+Pn6+/z9/v8AAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaW1xdXl9gYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+f4CBgoOEhYaHiImKi4yNjo+QkZKTlJWWl5iZmpucnZ6foKGio6SlpqeoqaqrrK2ur7CxsrO0tba3uLm6u7y9vr/AwcLDxMXGx8jJysvMzc7P0NHS09TV1tfY2drb3N3e3+Dh4uPk5ebn6Onq6+zt7u/w8fLz9PX29/j5+vv8/f7/AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w==' + binary_data = base64.b64decode(base64_data) + + blob_name = self._get_blob_reference() + blob = self.bsc.get_blob_client(self.container_name, blob_name) + blob.upload_blob(binary_data) + + # Act + content = blob.download_blob() + + # Assert + self.assertIsInstance(content.properties, BlobProperties) + self.assertEqual(content.readall(), binary_data) + + # ------------------------------------------------------------------------------ diff --git a/sdk/storage/azure-storage-blob/tests/test_retry.py b/sdk/storage/azure-storage-blob/tests/test_retry.py index 6a15b04dd038..0a0a78dd5094 100644 --- a/sdk/storage/azure-storage-blob/tests/test_retry.py +++ b/sdk/storage/azure-storage-blob/tests/test_retry.py @@ -3,14 +3,15 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -import unittest +from unittest import mock import pytest from azure.core.exceptions import ( HttpResponseError, ResourceExistsError, AzureError, - ClientAuthenticationError + ClientAuthenticationError, + ServiceResponseError ) from azure.core.pipeline.transport import( RequestsTransport @@ -24,6 +25,9 @@ LinearRetry, ExponentialRetry, ) +from requests import Response +from requests.exceptions import ContentDecodingError, ChunkedEncodingError +from azure.core.exceptions import DecodeError from settings.testcase import BlobPreparer from devtools_testutils.storage import StorageTestCase @@ -434,6 +438,25 @@ def test_invalid_account_key(self, storage_account_name, storage_account_key): # No retry should be performed since the signing error is fatal self.assertEqual(retry_counter.count, 0) - -# ------------------------------------------------------------------------------ - + @pytest.mark.live_test_only + @BlobPreparer() + def test_streaming_error(self, storage_account_name, storage_account_key): + """Test that retry mechanisms are working when streaming data.""" + container_name = self.get_resource_name('utcontainer') + service = self._create_storage_service( + BlobServiceClient, storage_account_name, storage_account_key) + container = service.get_container_client(container_name) + container.create_container() + assert container.exists() + blob_name = "myblob" + container.upload_blob(blob_name, b"abcde") + + for error in (ContentDecodingError(), ChunkedEncodingError(), ChunkedEncodingError("IncompleteRead")): + iterator_mock = mock.MagicMock() + iterator_mock.__next__.side_effect = error + iter_content_mock = mock.Mock() + iter_content_mock.return_value = iterator_mock + with mock.patch.object(Response, "iter_content", iter_content_mock), pytest.raises(ServiceResponseError): + blob = container.get_blob_client(blob=blob_name) + blob.download_blob() + assert iterator_mock.__next__.call_count == 3 From 9c597a425b89402beb71be4c0f18706de6741916 Mon Sep 17 00:00:00 2001 From: Steven Jin Date: Mon, 25 Jul 2022 10:53:09 -0700 Subject: [PATCH 07/18] naming --- sdk/storage/azure-storage-blob/tests/test_retry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob/tests/test_retry.py b/sdk/storage/azure-storage-blob/tests/test_retry.py index 0a0a78dd5094..3f263520c9f3 100644 --- a/sdk/storage/azure-storage-blob/tests/test_retry.py +++ b/sdk/storage/azure-storage-blob/tests/test_retry.py @@ -440,7 +440,7 @@ def test_invalid_account_key(self, storage_account_name, storage_account_key): @pytest.mark.live_test_only @BlobPreparer() - def test_streaming_error(self, storage_account_name, storage_account_key): + def test_streaming_retry(self, storage_account_name, storage_account_key): """Test that retry mechanisms are working when streaming data.""" container_name = self.get_resource_name('utcontainer') service = self._create_storage_service( From 61082afced22d707d9df3163022dab07c3e79529 Mon Sep 17 00:00:00 2001 From: Steven Jin Date: Mon, 25 Jul 2022 14:04:47 -0700 Subject: [PATCH 08/18] pr review --- sdk/storage/azure-storage-blob/CHANGELOG.md | 2 -- .../azure-storage-blob/tests/test_get_blob.py | 18 ------------------ 2 files changed, 20 deletions(-) diff --git a/sdk/storage/azure-storage-blob/CHANGELOG.md b/sdk/storage/azure-storage-blob/CHANGELOG.md index 6f86c2e80e18..fdaf03a33d72 100644 --- a/sdk/storage/azure-storage-blob/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob/CHANGELOG.md @@ -13,8 +13,6 @@ ### Bugs Fixed - Stable release of features from 12.13.0b1. - Added support for deleting versions in `delete_blobs` by supplying `version_id`. -- Stable release of features from 12.13.0b1. -- Added support for deleting versions in `delete_blobs` by supplying `version_id`. - Removed forced `requests` import for sync calls. (#25017) ## 12.13.0b1 (2022-06-15) diff --git a/sdk/storage/azure-storage-blob/tests/test_get_blob.py b/sdk/storage/azure-storage-blob/tests/test_get_blob.py index 28da56ae4223..1f5152d001e0 100644 --- a/sdk/storage/azure-storage-blob/tests/test_get_blob.py +++ b/sdk/storage/azure-storage-blob/tests/test_get_blob.py @@ -1019,22 +1019,4 @@ def test_get_blob_progress_readinto(self, storage_account_name, storage_account_ progress.assert_complete() self.assertEqual(len(data), read) - @BlobPreparer() - def test_unicode_get_blob_binary_data2(self, storage_account_name, storage_account_key): - self._setup(storage_account_name, storage_account_key) - base64_data = 'AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/wABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR4fICEiIyQlJicoKSorLC0uLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVpbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gIGCg4SFhoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnp+goaKjpKWmp6ipqqusra6vsLGys7S1tre4ubq7vL2+v8DBwsPExcbHyMnKy8zNzs/Q0dLT1NXW19jZ2tvc3d7f4OHi4+Tl5ufo6err7O3u7/Dx8vP09fb3+Pn6+/z9/v8AAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaW1xdXl9gYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+f4CBgoOEhYaHiImKi4yNjo+QkZKTlJWWl5iZmpucnZ6foKGio6SlpqeoqaqrrK2ur7CxsrO0tba3uLm6u7y9vr/AwcLDxMXGx8jJysvMzc7P0NHS09TV1tfY2drb3N3e3+Dh4uPk5ebn6Onq6+zt7u/w8fLz9PX29/j5+vv8/f7/AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w==' - binary_data = base64.b64decode(base64_data) - - blob_name = self._get_blob_reference() - blob = self.bsc.get_blob_client(self.container_name, blob_name) - blob.upload_blob(binary_data) - - # Act - content = blob.download_blob() - - # Assert - self.assertIsInstance(content.properties, BlobProperties) - self.assertEqual(content.readall(), binary_data) - - # ------------------------------------------------------------------------------ From 77266e54d1b1c712a695e309e0c4eb626105c804 Mon Sep 17 00:00:00 2001 From: Steven Jin Date: Mon, 25 Jul 2022 14:06:01 -0700 Subject: [PATCH 09/18] typo --- sdk/storage/azure-storage-blob/CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob/CHANGELOG.md b/sdk/storage/azure-storage-blob/CHANGELOG.md index fdaf03a33d72..01db06299db5 100644 --- a/sdk/storage/azure-storage-blob/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob/CHANGELOG.md @@ -13,7 +13,6 @@ ### Bugs Fixed - Stable release of features from 12.13.0b1. - Added support for deleting versions in `delete_blobs` by supplying `version_id`. -- Removed forced `requests` import for sync calls. (#25017) ## 12.13.0b1 (2022-06-15) From dc3198f390691a0ce6adb557b4384ed45af09ef6 Mon Sep 17 00:00:00 2001 From: Steven Jin Date: Mon, 25 Jul 2022 14:08:21 -0700 Subject: [PATCH 10/18] some formatting --- sdk/storage/azure-storage-blob/tests/test_retry.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdk/storage/azure-storage-blob/tests/test_retry.py b/sdk/storage/azure-storage-blob/tests/test_retry.py index 3f263520c9f3..a71d64175dd1 100644 --- a/sdk/storage/azure-storage-blob/tests/test_retry.py +++ b/sdk/storage/azure-storage-blob/tests/test_retry.py @@ -460,3 +460,5 @@ def test_streaming_retry(self, storage_account_name, storage_account_key): blob = container.get_blob_client(blob=blob_name) blob.download_blob() assert iterator_mock.__next__.call_count == 3 + + # ------------------------------------------------------------------------------ From 66436debea9ddf35421d4077ba9e9611a600d6a0 Mon Sep 17 00:00:00 2001 From: Steven Jin Date: Tue, 26 Jul 2022 12:57:07 -0700 Subject: [PATCH 11/18] streaming retry recording --- .../test_retry.test_streaming_retry.yaml | 684 ++++++++++++++++++ 1 file changed, 684 insertions(+) create mode 100644 sdk/storage/azure-storage-blob/tests/recordings/test_retry.test_streaming_retry.yaml diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_retry.test_streaming_retry.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_retry.test_streaming_retry.yaml new file mode 100644 index 000000000000..e1cb7f6d18f2 --- /dev/null +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_retry.test_streaming_retry.yaml @@ -0,0 +1,684 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) + x-ms-date: + - Tue, 26 Jul 2022 19:56:29 GMT + x-ms-version: + - '2021-08-06' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainercf7c0d02?restype=container + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 26 Jul 2022 19:56:30 GMT + etag: + - '"0x8DA6F40EEFFD3EE"' + last-modified: + - Tue, 26 Jul 2022 19:56:30 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-version: + - '2021-08-06' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) + x-ms-date: + - Tue, 26 Jul 2022 19:56:30 GMT + x-ms-version: + - '2021-08-06' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainercf7c0d02?restype=container + response: + body: + string: '' + headers: + access-control-allow-origin: + - '*' + access-control-expose-headers: + - x-ms-request-id,x-ms-client-request-id,x-ms-version,x-ms-lease-status,x-ms-lease-state,x-ms-has-immutability-policy,x-ms-has-legal-hold,x-ms-immutable-storage-with-versioning-enabled,x-ms-default-encryption-scope,x-ms-deny-encryption-scope-override,Server,Content-Range,ETag,Last-Modified,Accept-Ranges + content-length: + - '0' + date: + - Tue, 26 Jul 2022 19:56:30 GMT + etag: + - '"0x8DA6F40EEFFD3EE"' + last-modified: + - Tue, 26 Jul 2022 19:56:30 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-default-encryption-scope: + - $account-encryption-key + x-ms-deny-encryption-scope-override: + - 'false' + x-ms-has-immutability-policy: + - 'false' + x-ms-has-legal-hold: + - 'false' + x-ms-immutable-storage-with-versioning-enabled: + - 'false' + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-version: + - '2021-08-06' + status: + code: 200 + message: OK +- request: + body: abcde + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '5' + Content-Type: + - application/octet-stream + If-None-Match: + - '*' + User-Agent: + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) + x-ms-blob-type: + - BlockBlob + x-ms-date: + - Tue, 26 Jul 2022 19:56:30 GMT + x-ms-version: + - '2021-08-06' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainercf7c0d02/myblob + response: + body: + string: '' + headers: + content-length: + - '0' + content-md5: + - q1a02StAcTrMWviZhdS3hg== + date: + - Tue, 26 Jul 2022 19:56:30 GMT + etag: + - '"0x8DA6F40EF1AFCE8"' + last-modified: + - Tue, 26 Jul 2022 19:56:30 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: + - ExJGZ9Dkswo= + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2021-08-06' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) + x-ms-date: + - Tue, 26 Jul 2022 19:56:30 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2021-08-06' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainercf7c0d02/myblob + response: + body: + string: abcde + headers: + accept-ranges: + - bytes + access-control-allow-origin: + - '*' + access-control-expose-headers: + - x-ms-request-id,x-ms-client-request-id,x-ms-version,x-ms-creation-time,x-ms-blob-content-md5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,Server,Content-Range,ETag,Last-Modified,Accept-Ranges + content-length: + - '5' + content-range: + - bytes 0-4/5 + content-type: + - application/octet-stream + date: + - Tue, 26 Jul 2022 19:56:30 GMT + etag: + - '"0x8DA6F40EF1AFCE8"' + last-modified: + - Tue, 26 Jul 2022 19:56:30 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-content-md5: + - q1a02StAcTrMWviZhdS3hg== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Tue, 26 Jul 2022 19:56:30 GMT + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2021-08-06' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) + x-ms-date: + - Tue, 26 Jul 2022 19:56:31 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2021-08-06' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainercf7c0d02/myblob + response: + body: + string: abcde + headers: + accept-ranges: + - bytes + access-control-allow-origin: + - '*' + access-control-expose-headers: + - x-ms-request-id,x-ms-client-request-id,x-ms-version,x-ms-creation-time,x-ms-blob-content-md5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,Server,Content-Range,ETag,Last-Modified,Accept-Ranges + content-length: + - '5' + content-range: + - bytes 0-4/5 + content-type: + - application/octet-stream + date: + - Tue, 26 Jul 2022 19:56:31 GMT + etag: + - '"0x8DA6F40EF1AFCE8"' + last-modified: + - Tue, 26 Jul 2022 19:56:30 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-content-md5: + - q1a02StAcTrMWviZhdS3hg== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Tue, 26 Jul 2022 19:56:30 GMT + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2021-08-06' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) + x-ms-date: + - Tue, 26 Jul 2022 19:56:32 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2021-08-06' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainercf7c0d02/myblob + response: + body: + string: abcde + headers: + accept-ranges: + - bytes + access-control-allow-origin: + - '*' + access-control-expose-headers: + - x-ms-request-id,x-ms-client-request-id,x-ms-version,x-ms-creation-time,x-ms-blob-content-md5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,Server,Content-Range,ETag,Last-Modified,Accept-Ranges + content-length: + - '5' + content-range: + - bytes 0-4/5 + content-type: + - application/octet-stream + date: + - Tue, 26 Jul 2022 19:56:33 GMT + etag: + - '"0x8DA6F40EF1AFCE8"' + last-modified: + - Tue, 26 Jul 2022 19:56:30 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-content-md5: + - q1a02StAcTrMWviZhdS3hg== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Tue, 26 Jul 2022 19:56:30 GMT + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2021-08-06' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) + x-ms-date: + - Tue, 26 Jul 2022 19:56:33 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2021-08-06' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainercf7c0d02/myblob + response: + body: + string: abcde + headers: + accept-ranges: + - bytes + access-control-allow-origin: + - '*' + access-control-expose-headers: + - x-ms-request-id,x-ms-client-request-id,x-ms-version,x-ms-creation-time,x-ms-blob-content-md5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,Server,Content-Range,ETag,Last-Modified,Accept-Ranges + content-length: + - '5' + content-range: + - bytes 0-4/5 + content-type: + - application/octet-stream + date: + - Tue, 26 Jul 2022 19:56:33 GMT + etag: + - '"0x8DA6F40EF1AFCE8"' + last-modified: + - Tue, 26 Jul 2022 19:56:30 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-content-md5: + - q1a02StAcTrMWviZhdS3hg== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Tue, 26 Jul 2022 19:56:30 GMT + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2021-08-06' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) + x-ms-date: + - Tue, 26 Jul 2022 19:56:34 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2021-08-06' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainercf7c0d02/myblob + response: + body: + string: abcde + headers: + accept-ranges: + - bytes + access-control-allow-origin: + - '*' + access-control-expose-headers: + - x-ms-request-id,x-ms-client-request-id,x-ms-version,x-ms-creation-time,x-ms-blob-content-md5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,Server,Content-Range,ETag,Last-Modified,Accept-Ranges + content-length: + - '5' + content-range: + - bytes 0-4/5 + content-type: + - application/octet-stream + date: + - Tue, 26 Jul 2022 19:56:34 GMT + etag: + - '"0x8DA6F40EF1AFCE8"' + last-modified: + - Tue, 26 Jul 2022 19:56:30 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-content-md5: + - q1a02StAcTrMWviZhdS3hg== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Tue, 26 Jul 2022 19:56:30 GMT + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2021-08-06' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) + x-ms-date: + - Tue, 26 Jul 2022 19:56:35 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2021-08-06' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainercf7c0d02/myblob + response: + body: + string: abcde + headers: + accept-ranges: + - bytes + access-control-allow-origin: + - '*' + access-control-expose-headers: + - x-ms-request-id,x-ms-client-request-id,x-ms-version,x-ms-creation-time,x-ms-blob-content-md5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,Server,Content-Range,ETag,Last-Modified,Accept-Ranges + content-length: + - '5' + content-range: + - bytes 0-4/5 + content-type: + - application/octet-stream + date: + - Tue, 26 Jul 2022 19:56:35 GMT + etag: + - '"0x8DA6F40EF1AFCE8"' + last-modified: + - Tue, 26 Jul 2022 19:56:30 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-content-md5: + - q1a02StAcTrMWviZhdS3hg== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Tue, 26 Jul 2022 19:56:30 GMT + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2021-08-06' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) + x-ms-date: + - Tue, 26 Jul 2022 19:56:36 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2021-08-06' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainercf7c0d02/myblob + response: + body: + string: abcde + headers: + accept-ranges: + - bytes + access-control-allow-origin: + - '*' + access-control-expose-headers: + - x-ms-request-id,x-ms-client-request-id,x-ms-version,x-ms-creation-time,x-ms-blob-content-md5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,Server,Content-Range,ETag,Last-Modified,Accept-Ranges + content-length: + - '5' + content-range: + - bytes 0-4/5 + content-type: + - application/octet-stream + date: + - Tue, 26 Jul 2022 19:56:35 GMT + etag: + - '"0x8DA6F40EF1AFCE8"' + last-modified: + - Tue, 26 Jul 2022 19:56:30 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-content-md5: + - q1a02StAcTrMWviZhdS3hg== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Tue, 26 Jul 2022 19:56:30 GMT + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2021-08-06' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) + x-ms-date: + - Tue, 26 Jul 2022 19:56:37 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2021-08-06' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainercf7c0d02/myblob + response: + body: + string: abcde + headers: + accept-ranges: + - bytes + access-control-allow-origin: + - '*' + access-control-expose-headers: + - x-ms-request-id,x-ms-client-request-id,x-ms-version,x-ms-creation-time,x-ms-blob-content-md5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,Server,Content-Range,ETag,Last-Modified,Accept-Ranges + content-length: + - '5' + content-range: + - bytes 0-4/5 + content-type: + - application/octet-stream + date: + - Tue, 26 Jul 2022 19:56:37 GMT + etag: + - '"0x8DA6F40EF1AFCE8"' + last-modified: + - Tue, 26 Jul 2022 19:56:30 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-content-md5: + - q1a02StAcTrMWviZhdS3hg== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Tue, 26 Jul 2022 19:56:30 GMT + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2021-08-06' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) + x-ms-date: + - Tue, 26 Jul 2022 19:56:39 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2021-08-06' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainercf7c0d02/myblob + response: + body: + string: abcde + headers: + accept-ranges: + - bytes + access-control-allow-origin: + - '*' + access-control-expose-headers: + - x-ms-request-id,x-ms-client-request-id,x-ms-version,x-ms-creation-time,x-ms-blob-content-md5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,Server,Content-Range,ETag,Last-Modified,Accept-Ranges + content-length: + - '5' + content-range: + - bytes 0-4/5 + content-type: + - application/octet-stream + date: + - Tue, 26 Jul 2022 19:56:39 GMT + etag: + - '"0x8DA6F40EF1AFCE8"' + last-modified: + - Tue, 26 Jul 2022 19:56:30 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-content-md5: + - q1a02StAcTrMWviZhdS3hg== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Tue, 26 Jul 2022 19:56:30 GMT + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2021-08-06' + status: + code: 206 + message: Partial Content +version: 1 From 5bda09a22d43f0b2d84a0f84aebbf36f65a00ceb Mon Sep 17 00:00:00 2001 From: Steven Jin Date: Tue, 26 Jul 2022 12:58:40 -0700 Subject: [PATCH 12/18] unmark stream retry test as live-only --- sdk/storage/azure-storage-blob/tests/test_retry.py | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob/tests/test_retry.py b/sdk/storage/azure-storage-blob/tests/test_retry.py index a71d64175dd1..a1d25db02ede 100644 --- a/sdk/storage/azure-storage-blob/tests/test_retry.py +++ b/sdk/storage/azure-storage-blob/tests/test_retry.py @@ -438,7 +438,6 @@ def test_invalid_account_key(self, storage_account_name, storage_account_key): # No retry should be performed since the signing error is fatal self.assertEqual(retry_counter.count, 0) - @pytest.mark.live_test_only @BlobPreparer() def test_streaming_retry(self, storage_account_name, storage_account_key): """Test that retry mechanisms are working when streaming data.""" From a366a86f864f1b7f62ebed92542d6010615cf3f5 Mon Sep 17 00:00:00 2001 From: Steven Jin Date: Wed, 27 Jul 2022 13:02:58 -0700 Subject: [PATCH 13/18] fix extra headers --- .../test_retry.test_streaming_retry.yaml | 154 +++++++----------- 1 file changed, 57 insertions(+), 97 deletions(-) diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_retry.test_streaming_retry.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_retry.test_streaming_retry.yaml index e1cb7f6d18f2..476a38cec3aa 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_retry.test_streaming_retry.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_retry.test_streaming_retry.yaml @@ -13,7 +13,7 @@ interactions: User-Agent: - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 26 Jul 2022 19:56:29 GMT + - Wed, 27 Jul 2022 20:01:25 GMT x-ms-version: - '2021-08-06' method: PUT @@ -25,11 +25,11 @@ interactions: content-length: - '0' date: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:27 GMT etag: - - '"0x8DA6F40EEFFD3EE"' + - '"0x8DA700ACAF9DF12"' last-modified: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:28 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: @@ -49,7 +49,7 @@ interactions: User-Agent: - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:25 GMT x-ms-version: - '2021-08-06' method: GET @@ -58,18 +58,14 @@ interactions: body: string: '' headers: - access-control-allow-origin: - - '*' - access-control-expose-headers: - - x-ms-request-id,x-ms-client-request-id,x-ms-version,x-ms-lease-status,x-ms-lease-state,x-ms-has-immutability-policy,x-ms-has-legal-hold,x-ms-immutable-storage-with-versioning-enabled,x-ms-default-encryption-scope,x-ms-deny-encryption-scope-override,Server,Content-Range,ETag,Last-Modified,Accept-Ranges content-length: - '0' date: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:27 GMT etag: - - '"0x8DA6F40EEFFD3EE"' + - '"0x8DA700ACAF9DF12"' last-modified: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:28 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-default-encryption-scope: @@ -111,7 +107,7 @@ interactions: x-ms-blob-type: - BlockBlob x-ms-date: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:25 GMT x-ms-version: - '2021-08-06' method: PUT @@ -125,11 +121,11 @@ interactions: content-md5: - q1a02StAcTrMWviZhdS3hg== date: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:27 GMT etag: - - '"0x8DA6F40EF1AFCE8"' + - '"0x8DA700ACB03C6C7"' last-modified: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:28 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -153,7 +149,7 @@ interactions: User-Agent: - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:25 GMT x-ms-range: - bytes=0-33554431 x-ms-version: @@ -166,10 +162,6 @@ interactions: headers: accept-ranges: - bytes - access-control-allow-origin: - - '*' - access-control-expose-headers: - - x-ms-request-id,x-ms-client-request-id,x-ms-version,x-ms-creation-time,x-ms-blob-content-md5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,Server,Content-Range,ETag,Last-Modified,Accept-Ranges content-length: - '5' content-range: @@ -177,11 +169,11 @@ interactions: content-type: - application/octet-stream date: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:27 GMT etag: - - '"0x8DA6F40EF1AFCE8"' + - '"0x8DA700ACB03C6C7"' last-modified: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:28 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-content-md5: @@ -189,7 +181,7 @@ interactions: x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:28 GMT x-ms-lease-state: - available x-ms-lease-status: @@ -213,7 +205,7 @@ interactions: User-Agent: - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 26 Jul 2022 19:56:31 GMT + - Wed, 27 Jul 2022 20:01:26 GMT x-ms-range: - bytes=0-33554431 x-ms-version: @@ -226,10 +218,6 @@ interactions: headers: accept-ranges: - bytes - access-control-allow-origin: - - '*' - access-control-expose-headers: - - x-ms-request-id,x-ms-client-request-id,x-ms-version,x-ms-creation-time,x-ms-blob-content-md5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,Server,Content-Range,ETag,Last-Modified,Accept-Ranges content-length: - '5' content-range: @@ -237,11 +225,11 @@ interactions: content-type: - application/octet-stream date: - - Tue, 26 Jul 2022 19:56:31 GMT + - Wed, 27 Jul 2022 20:01:29 GMT etag: - - '"0x8DA6F40EF1AFCE8"' + - '"0x8DA700ACB03C6C7"' last-modified: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:28 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-content-md5: @@ -249,7 +237,7 @@ interactions: x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:28 GMT x-ms-lease-state: - available x-ms-lease-status: @@ -273,7 +261,7 @@ interactions: User-Agent: - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 26 Jul 2022 19:56:32 GMT + - Wed, 27 Jul 2022 20:01:27 GMT x-ms-range: - bytes=0-33554431 x-ms-version: @@ -286,10 +274,6 @@ interactions: headers: accept-ranges: - bytes - access-control-allow-origin: - - '*' - access-control-expose-headers: - - x-ms-request-id,x-ms-client-request-id,x-ms-version,x-ms-creation-time,x-ms-blob-content-md5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,Server,Content-Range,ETag,Last-Modified,Accept-Ranges content-length: - '5' content-range: @@ -297,11 +281,11 @@ interactions: content-type: - application/octet-stream date: - - Tue, 26 Jul 2022 19:56:33 GMT + - Wed, 27 Jul 2022 20:01:30 GMT etag: - - '"0x8DA6F40EF1AFCE8"' + - '"0x8DA700ACB03C6C7"' last-modified: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:28 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-content-md5: @@ -309,7 +293,7 @@ interactions: x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:28 GMT x-ms-lease-state: - available x-ms-lease-status: @@ -333,7 +317,7 @@ interactions: User-Agent: - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 26 Jul 2022 19:56:33 GMT + - Wed, 27 Jul 2022 20:01:27 GMT x-ms-range: - bytes=0-33554431 x-ms-version: @@ -346,10 +330,6 @@ interactions: headers: accept-ranges: - bytes - access-control-allow-origin: - - '*' - access-control-expose-headers: - - x-ms-request-id,x-ms-client-request-id,x-ms-version,x-ms-creation-time,x-ms-blob-content-md5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,Server,Content-Range,ETag,Last-Modified,Accept-Ranges content-length: - '5' content-range: @@ -357,11 +337,11 @@ interactions: content-type: - application/octet-stream date: - - Tue, 26 Jul 2022 19:56:33 GMT + - Wed, 27 Jul 2022 20:01:29 GMT etag: - - '"0x8DA6F40EF1AFCE8"' + - '"0x8DA700ACB03C6C7"' last-modified: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:28 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-content-md5: @@ -369,7 +349,7 @@ interactions: x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:28 GMT x-ms-lease-state: - available x-ms-lease-status: @@ -393,7 +373,7 @@ interactions: User-Agent: - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 26 Jul 2022 19:56:34 GMT + - Wed, 27 Jul 2022 20:01:28 GMT x-ms-range: - bytes=0-33554431 x-ms-version: @@ -406,10 +386,6 @@ interactions: headers: accept-ranges: - bytes - access-control-allow-origin: - - '*' - access-control-expose-headers: - - x-ms-request-id,x-ms-client-request-id,x-ms-version,x-ms-creation-time,x-ms-blob-content-md5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,Server,Content-Range,ETag,Last-Modified,Accept-Ranges content-length: - '5' content-range: @@ -417,11 +393,11 @@ interactions: content-type: - application/octet-stream date: - - Tue, 26 Jul 2022 19:56:34 GMT + - Wed, 27 Jul 2022 20:01:31 GMT etag: - - '"0x8DA6F40EF1AFCE8"' + - '"0x8DA700ACB03C6C7"' last-modified: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:28 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-content-md5: @@ -429,7 +405,7 @@ interactions: x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:28 GMT x-ms-lease-state: - available x-ms-lease-status: @@ -453,7 +429,7 @@ interactions: User-Agent: - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 26 Jul 2022 19:56:35 GMT + - Wed, 27 Jul 2022 20:01:29 GMT x-ms-range: - bytes=0-33554431 x-ms-version: @@ -466,10 +442,6 @@ interactions: headers: accept-ranges: - bytes - access-control-allow-origin: - - '*' - access-control-expose-headers: - - x-ms-request-id,x-ms-client-request-id,x-ms-version,x-ms-creation-time,x-ms-blob-content-md5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,Server,Content-Range,ETag,Last-Modified,Accept-Ranges content-length: - '5' content-range: @@ -477,11 +449,11 @@ interactions: content-type: - application/octet-stream date: - - Tue, 26 Jul 2022 19:56:35 GMT + - Wed, 27 Jul 2022 20:01:32 GMT etag: - - '"0x8DA6F40EF1AFCE8"' + - '"0x8DA700ACB03C6C7"' last-modified: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:28 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-content-md5: @@ -489,7 +461,7 @@ interactions: x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:28 GMT x-ms-lease-state: - available x-ms-lease-status: @@ -513,7 +485,7 @@ interactions: User-Agent: - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 26 Jul 2022 19:56:36 GMT + - Wed, 27 Jul 2022 20:01:29 GMT x-ms-range: - bytes=0-33554431 x-ms-version: @@ -526,10 +498,6 @@ interactions: headers: accept-ranges: - bytes - access-control-allow-origin: - - '*' - access-control-expose-headers: - - x-ms-request-id,x-ms-client-request-id,x-ms-version,x-ms-creation-time,x-ms-blob-content-md5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,Server,Content-Range,ETag,Last-Modified,Accept-Ranges content-length: - '5' content-range: @@ -537,11 +505,11 @@ interactions: content-type: - application/octet-stream date: - - Tue, 26 Jul 2022 19:56:35 GMT + - Wed, 27 Jul 2022 20:01:32 GMT etag: - - '"0x8DA6F40EF1AFCE8"' + - '"0x8DA700ACB03C6C7"' last-modified: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:28 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-content-md5: @@ -549,7 +517,7 @@ interactions: x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:28 GMT x-ms-lease-state: - available x-ms-lease-status: @@ -573,7 +541,7 @@ interactions: User-Agent: - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 26 Jul 2022 19:56:37 GMT + - Wed, 27 Jul 2022 20:01:30 GMT x-ms-range: - bytes=0-33554431 x-ms-version: @@ -586,10 +554,6 @@ interactions: headers: accept-ranges: - bytes - access-control-allow-origin: - - '*' - access-control-expose-headers: - - x-ms-request-id,x-ms-client-request-id,x-ms-version,x-ms-creation-time,x-ms-blob-content-md5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,Server,Content-Range,ETag,Last-Modified,Accept-Ranges content-length: - '5' content-range: @@ -597,11 +561,11 @@ interactions: content-type: - application/octet-stream date: - - Tue, 26 Jul 2022 19:56:37 GMT + - Wed, 27 Jul 2022 20:01:33 GMT etag: - - '"0x8DA6F40EF1AFCE8"' + - '"0x8DA700ACB03C6C7"' last-modified: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:28 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-content-md5: @@ -609,7 +573,7 @@ interactions: x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:28 GMT x-ms-lease-state: - available x-ms-lease-status: @@ -633,7 +597,7 @@ interactions: User-Agent: - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 26 Jul 2022 19:56:39 GMT + - Wed, 27 Jul 2022 20:01:31 GMT x-ms-range: - bytes=0-33554431 x-ms-version: @@ -646,10 +610,6 @@ interactions: headers: accept-ranges: - bytes - access-control-allow-origin: - - '*' - access-control-expose-headers: - - x-ms-request-id,x-ms-client-request-id,x-ms-version,x-ms-creation-time,x-ms-blob-content-md5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,Server,Content-Range,ETag,Last-Modified,Accept-Ranges content-length: - '5' content-range: @@ -657,11 +617,11 @@ interactions: content-type: - application/octet-stream date: - - Tue, 26 Jul 2022 19:56:39 GMT + - Wed, 27 Jul 2022 20:01:34 GMT etag: - - '"0x8DA6F40EF1AFCE8"' + - '"0x8DA700ACB03C6C7"' last-modified: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:28 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-content-md5: @@ -669,7 +629,7 @@ interactions: x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Tue, 26 Jul 2022 19:56:30 GMT + - Wed, 27 Jul 2022 20:01:28 GMT x-ms-lease-state: - available x-ms-lease-status: From 46239bf25ed828fddb0946b338d9dd565a569f63 Mon Sep 17 00:00:00 2001 From: Steven Jin Date: Wed, 27 Jul 2022 13:03:09 -0700 Subject: [PATCH 14/18] raise HttpResponseError on failed retries --- .../azure-storage-blob/azure/storage/blob/_download.py | 4 ++-- sdk/storage/azure-storage-blob/tests/test_retry.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_download.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_download.py index 077ec9812f7e..26f75f67b1b9 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_download.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_download.py @@ -215,7 +215,7 @@ def _download_chunk(self, chunk_start, chunk_end): except (IncompleteReadError, HttpResponseError, DecodeError) as error: retry_total -= 1 if retry_total <= 0: - raise ServiceResponseError(error, error=error) + raise HttpResponseError(error, error=error) time.sleep(1) # This makes sure that if_match is set so that we can validate @@ -476,7 +476,7 @@ def _initial_request(self): except (IncompleteReadError, HttpResponseError, DecodeError) as error: retry_total -= 1 if retry_total <= 0: - raise ServiceResponseError(error, error=error) + raise HttpResponseError(error, error=error) time.sleep(1) # get page ranges to optimize downloading sparse page blob diff --git a/sdk/storage/azure-storage-blob/tests/test_retry.py b/sdk/storage/azure-storage-blob/tests/test_retry.py index a1d25db02ede..2d9fceeb837f 100644 --- a/sdk/storage/azure-storage-blob/tests/test_retry.py +++ b/sdk/storage/azure-storage-blob/tests/test_retry.py @@ -441,6 +441,7 @@ def test_invalid_account_key(self, storage_account_name, storage_account_key): @BlobPreparer() def test_streaming_retry(self, storage_account_name, storage_account_key): """Test that retry mechanisms are working when streaming data.""" + # Should check that multiple requests went through the pipeline container_name = self.get_resource_name('utcontainer') service = self._create_storage_service( BlobServiceClient, storage_account_name, storage_account_key) @@ -455,7 +456,7 @@ def test_streaming_retry(self, storage_account_name, storage_account_key): iterator_mock.__next__.side_effect = error iter_content_mock = mock.Mock() iter_content_mock.return_value = iterator_mock - with mock.patch.object(Response, "iter_content", iter_content_mock), pytest.raises(ServiceResponseError): + with mock.patch.object(Response, "iter_content", iter_content_mock), pytest.raises(HttpResponseError): blob = container.get_blob_client(blob=blob_name) blob.download_blob() assert iterator_mock.__next__.call_count == 3 From b9d02745007098ceb5b2dda7275b102e072bd972 Mon Sep 17 00:00:00 2001 From: Steven Jin Date: Wed, 27 Jul 2022 13:18:22 -0700 Subject: [PATCH 15/18] some rerecordings --- ...get_blob_strict_mode_unencrypted_blob.yaml | 176 ++++++-- ...ion.test_missing_attribute_kek_unwrap.yaml | 396 ++++++++++++++---- ...ob_strict_mode_unencrypted_blob_async.yaml | 70 ++-- ...st_missing_attribute_kek_unwrap_async.yaml | 156 ++++--- ...test_decryption_on_non_encrypted_blob.yaml | 188 +++++++-- ...ryption_v2.test_encryption_modify_cek.yaml | 232 +++++++--- ...on_v2.test_encryption_v2_v1_downgrade.yaml | 238 ++++++++--- ...test_decryption_on_non_encrypted_blob.yaml | 84 ++-- ...n_v2_async.test_encryption_modify_cek.yaml | 115 +++-- ...async.test_encryption_v2_v1_downgrade.yaml | 121 +++--- 10 files changed, 1226 insertions(+), 550 deletions(-) diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption.test_get_blob_strict_mode_unencrypted_blob.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption.test_get_blob_strict_mode_unencrypted_blob.yaml index 9f52d286c7f1..7fe54508d0b3 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption.test_get_blob_strict_mode_unencrypted_blob.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption.test_get_blob_strict_mode_unencrypted_blob.yaml @@ -11,11 +11,11 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.12.1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Mon, 06 Jun 2022 23:40:27 GMT + - Wed, 27 Jul 2022 20:08:23 GMT x-ms-version: - - '2021-06-08' + - '2021-08-06' method: PUT uri: https://storagename.blob.core.windows.net/utcontainer403f19fe?restype=container response: @@ -25,15 +25,15 @@ interactions: content-length: - '0' date: - - Mon, 06 Jun 2022 23:40:27 GMT + - Wed, 27 Jul 2022 20:08:25 GMT etag: - - '"0x8DA4815EFD21552"' + - '"0x8DA700BC42EC346"' last-modified: - - Mon, 06 Jun 2022 23:40:28 GMT + - Wed, 27 Jul 2022 20:08:26 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2021-06-08' + - '2021-08-06' status: code: 201 message: Created @@ -53,13 +53,13 @@ interactions: If-None-Match: - '*' User-Agent: - - azsdk-python-storage-blob/12.12.1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-blob-type: - BlockBlob x-ms-date: - - Mon, 06 Jun 2022 23:40:28 GMT + - Wed, 27 Jul 2022 20:08:23 GMT x-ms-version: - - '2021-06-08' + - '2021-08-06' method: PUT uri: https://storagename.blob.core.windows.net/utcontainer403f19fe/encryption_block_blob403f19fe response: @@ -71,11 +71,11 @@ interactions: content-md5: - E1bGfXrRY42Ba/uCLdLCXQ== date: - - Mon, 06 Jun 2022 23:40:27 GMT + - Wed, 27 Jul 2022 20:08:25 GMT etag: - - '"0x8DA4815EFE0DF93"' + - '"0x8DA700BC4342311"' last-modified: - - Mon, 06 Jun 2022 23:40:28 GMT + - Wed, 27 Jul 2022 20:08:26 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -83,7 +83,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2021-06-08' + - '2021-08-06' status: code: 201 message: Created @@ -97,11 +97,11 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.12.1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Mon, 06 Jun 2022 23:40:28 GMT + - Wed, 27 Jul 2022 20:08:23 GMT x-ms-version: - - '2021-06-08' + - '2021-08-06' method: HEAD uri: https://storagename.blob.core.windows.net/utcontainer403f19fe/encryption_block_blob403f19fe response: @@ -117,15 +117,13 @@ interactions: content-type: - application/octet-stream date: - - Mon, 06 Jun 2022 23:40:27 GMT + - Wed, 27 Jul 2022 20:08:25 GMT etag: - - '"0x8DA4815EFE0DF93"' + - '"0x8DA700BC4342311"' last-modified: - - Mon, 06 Jun 2022 23:40:28 GMT + - Wed, 27 Jul 2022 20:08:26 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin x-ms-access-tier: - Hot x-ms-access-tier-inferred: @@ -133,7 +131,7 @@ interactions: x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Mon, 06 Jun 2022 23:40:28 GMT + - Wed, 27 Jul 2022 20:08:26 GMT x-ms-lease-state: - available x-ms-lease-status: @@ -141,7 +139,7 @@ interactions: x-ms-server-encrypted: - 'true' x-ms-version: - - '2021-06-08' + - '2021-08-06' status: code: 200 message: OK @@ -155,13 +153,13 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.12.1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Mon, 06 Jun 2022 23:40:28 GMT + - Wed, 27 Jul 2022 20:08:23 GMT x-ms-range: - bytes=0-1023 x-ms-version: - - '2021-06-08' + - '2021-08-06' method: GET uri: https://storagename.blob.core.windows.net/utcontainer403f19fe/encryption_block_blob403f19fe response: @@ -177,21 +175,19 @@ interactions: content-type: - application/octet-stream date: - - Mon, 06 Jun 2022 23:40:27 GMT + - Wed, 27 Jul 2022 20:08:25 GMT etag: - - '"0x8DA4815EFE0DF93"' + - '"0x8DA700BC4342311"' last-modified: - - Mon, 06 Jun 2022 23:40:28 GMT + - Wed, 27 Jul 2022 20:08:26 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin x-ms-blob-content-md5: - E1bGfXrRY42Ba/uCLdLCXQ== x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Mon, 06 Jun 2022 23:40:28 GMT + - Wed, 27 Jul 2022 20:08:26 GMT x-ms-lease-state: - available x-ms-lease-status: @@ -199,7 +195,119 @@ interactions: x-ms-server-encrypted: - 'true' x-ms-version: - - '2021-06-08' + - '2021-08-06' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) + x-ms-date: + - Wed, 27 Jul 2022 20:08:24 GMT + x-ms-range: + - bytes=0-1023 + x-ms-version: + - '2021-08-06' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainer403f19fe/encryption_block_blob403f19fe + response: + body: + string: Foo + headers: + accept-ranges: + - bytes + content-length: + - '3' + content-range: + - bytes 0-2/3 + content-type: + - application/octet-stream + date: + - Wed, 27 Jul 2022 20:08:26 GMT + etag: + - '"0x8DA700BC4342311"' + last-modified: + - Wed, 27 Jul 2022 20:08:26 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-content-md5: + - E1bGfXrRY42Ba/uCLdLCXQ== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Wed, 27 Jul 2022 20:08:26 GMT + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2021-08-06' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) + x-ms-date: + - Wed, 27 Jul 2022 20:08:25 GMT + x-ms-range: + - bytes=0-1023 + x-ms-version: + - '2021-08-06' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainer403f19fe/encryption_block_blob403f19fe + response: + body: + string: Foo + headers: + accept-ranges: + - bytes + content-length: + - '3' + content-range: + - bytes 0-2/3 + content-type: + - application/octet-stream + date: + - Wed, 27 Jul 2022 20:08:27 GMT + etag: + - '"0x8DA700BC4342311"' + last-modified: + - Wed, 27 Jul 2022 20:08:26 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-content-md5: + - E1bGfXrRY42Ba/uCLdLCXQ== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Wed, 27 Jul 2022 20:08:26 GMT + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2021-08-06' status: code: 206 message: Partial Content diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption.test_missing_attribute_kek_unwrap.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption.test_missing_attribute_kek_unwrap.yaml index a3ea539939f0..3b20d2309923 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption.test_missing_attribute_kek_unwrap.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption.test_missing_attribute_kek_unwrap.yaml @@ -11,11 +11,11 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.12.1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Mon, 06 Jun 2022 22:43:10 GMT + - Wed, 27 Jul 2022 20:15:14 GMT x-ms-version: - - '2021-06-08' + - '2021-08-06' method: PUT uri: https://storagename.blob.core.windows.net/utcontainer684c1679?restype=container response: @@ -25,21 +25,21 @@ interactions: content-length: - '0' date: - - Mon, 06 Jun 2022 22:43:09 GMT + - Wed, 27 Jul 2022 20:15:17 GMT etag: - - '"0x8DA480DEEC3EE30"' + - '"0x8DA700CB96ADA9E"' last-modified: - - Mon, 06 Jun 2022 22:43:10 GMT + - Wed, 27 Jul 2022 20:15:17 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2021-06-08' + - '2021-08-06' status: code: 201 message: Created - request: body: !!binary | - fyi/ELf2ea5+qQ22bNOPfQ== + 3JRTu2J69KTqupQ/ukS0TA== headers: Accept: - application/xml @@ -54,18 +54,18 @@ interactions: If-None-Match: - '*' User-Agent: - - azsdk-python-storage-blob/12.12.1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-blob-type: - BlockBlob x-ms-date: - - Mon, 06 Jun 2022 22:43:10 GMT + - Wed, 27 Jul 2022 20:15:14 GMT x-ms-meta-encryptiondata: - - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "bGTlKI5MsFWgr5h1IfFHKNhYqHn19WFFVGTa4p3SKNNvxcVyM8+a6A==", + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "bi7siNpILszaZgdE4KONpYyOoCVeh7oSBneH44exxeCqH7k9qlck4Q==", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "1.0", "EncryptionAlgorithm": - "AES_CBC_256"}, "ContentEncryptionIV": "oTSAZ3TXZDqLEmYgP0LnIg==", "KeyWrappingMetadata": - {"EncryptionLibrary": "Python 12.12.1"}, "EncryptionMode": "FullBlob"}' + "AES_CBC_256"}, "ContentEncryptionIV": "8RNtA8J9pwPpDiV0K5hblA==", "KeyWrappingMetadata": + {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' x-ms-version: - - '2021-06-08' + - '2021-08-06' method: PUT uri: https://storagename.blob.core.windows.net/utcontainer684c1679/encryption_block_blob684c1679 response: @@ -75,21 +75,21 @@ interactions: content-length: - '0' content-md5: - - pKhQH//5cvx3zovpL8wI4w== + - s1SjcMZv5j9irXeMc0pPnA== date: - - Mon, 06 Jun 2022 22:43:09 GMT + - Wed, 27 Jul 2022 20:15:17 GMT etag: - - '"0x8DA480DEED25D70"' + - '"0x8DA700CB96F5851"' last-modified: - - Mon, 06 Jun 2022 22:43:10 GMT + - Wed, 27 Jul 2022 20:15:17 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: - - A5z3KGqzTTI= + - 7FW90Y+97fo= x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2021-06-08' + - '2021-08-06' status: code: 201 message: Created @@ -103,11 +103,11 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.12.1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Mon, 06 Jun 2022 22:43:10 GMT + - Wed, 27 Jul 2022 20:15:14 GMT x-ms-version: - - '2021-06-08' + - '2021-08-06' method: HEAD uri: https://storagename.blob.core.windows.net/utcontainer684c1679/encryption_block_blob684c1679 response: @@ -119,19 +119,17 @@ interactions: content-length: - '16' content-md5: - - pKhQH//5cvx3zovpL8wI4w== + - s1SjcMZv5j9irXeMc0pPnA== content-type: - application/octet-stream date: - - Mon, 06 Jun 2022 22:43:09 GMT + - Wed, 27 Jul 2022 20:15:17 GMT etag: - - '"0x8DA480DEED25D70"' + - '"0x8DA700CB96F5851"' last-modified: - - Mon, 06 Jun 2022 22:43:10 GMT + - Wed, 27 Jul 2022 20:15:17 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin x-ms-access-tier: - Hot x-ms-access-tier-inferred: @@ -139,20 +137,20 @@ interactions: x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Mon, 06 Jun 2022 22:43:10 GMT + - Wed, 27 Jul 2022 20:15:17 GMT x-ms-lease-state: - available x-ms-lease-status: - unlocked x-ms-meta-encryptiondata: - - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "bGTlKI5MsFWgr5h1IfFHKNhYqHn19WFFVGTa4p3SKNNvxcVyM8+a6A==", + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "bi7siNpILszaZgdE4KONpYyOoCVeh7oSBneH44exxeCqH7k9qlck4Q==", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "1.0", "EncryptionAlgorithm": - "AES_CBC_256"}, "ContentEncryptionIV": "oTSAZ3TXZDqLEmYgP0LnIg==", "KeyWrappingMetadata": - {"EncryptionLibrary": "Python 12.12.1"}, "EncryptionMode": "FullBlob"}' + "AES_CBC_256"}, "ContentEncryptionIV": "8RNtA8J9pwPpDiV0K5hblA==", "KeyWrappingMetadata": + {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' x-ms-server-encrypted: - 'true' x-ms-version: - - '2021-06-08' + - '2021-08-06' status: code: 200 message: OK @@ -166,19 +164,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.12.1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Mon, 06 Jun 2022 22:43:10 GMT + - Wed, 27 Jul 2022 20:15:14 GMT x-ms-range: - bytes=0-1023 x-ms-version: - - '2021-06-08' + - '2021-08-06' method: GET uri: https://storagename.blob.core.windows.net/utcontainer684c1679/encryption_block_blob684c1679 response: body: string: !!binary | - fyi/ELf2ea5+qQ22bNOPfQ== + 3JRTu2J69KTqupQ/ukS0TA== headers: accept-ranges: - bytes @@ -189,34 +187,32 @@ interactions: content-type: - application/octet-stream date: - - Mon, 06 Jun 2022 22:43:09 GMT + - Wed, 27 Jul 2022 20:15:17 GMT etag: - - '"0x8DA480DEED25D70"' + - '"0x8DA700CB96F5851"' last-modified: - - Mon, 06 Jun 2022 22:43:10 GMT + - Wed, 27 Jul 2022 20:15:17 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin x-ms-blob-content-md5: - - pKhQH//5cvx3zovpL8wI4w== + - s1SjcMZv5j9irXeMc0pPnA== x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Mon, 06 Jun 2022 22:43:10 GMT + - Wed, 27 Jul 2022 20:15:17 GMT x-ms-lease-state: - available x-ms-lease-status: - unlocked x-ms-meta-encryptiondata: - - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "bGTlKI5MsFWgr5h1IfFHKNhYqHn19WFFVGTa4p3SKNNvxcVyM8+a6A==", + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "bi7siNpILszaZgdE4KONpYyOoCVeh7oSBneH44exxeCqH7k9qlck4Q==", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "1.0", "EncryptionAlgorithm": - "AES_CBC_256"}, "ContentEncryptionIV": "oTSAZ3TXZDqLEmYgP0LnIg==", "KeyWrappingMetadata": - {"EncryptionLibrary": "Python 12.12.1"}, "EncryptionMode": "FullBlob"}' + "AES_CBC_256"}, "ContentEncryptionIV": "8RNtA8J9pwPpDiV0K5hblA==", "KeyWrappingMetadata": + {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' x-ms-server-encrypted: - 'true' x-ms-version: - - '2021-06-08' + - '2021-08-06' status: code: 206 message: Partial Content @@ -230,11 +226,135 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.12.1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Mon, 06 Jun 2022 22:43:10 GMT + - Wed, 27 Jul 2022 20:15:15 GMT + x-ms-range: + - bytes=0-1023 + x-ms-version: + - '2021-08-06' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainer684c1679/encryption_block_blob684c1679 + response: + body: + string: !!binary | + 3JRTu2J69KTqupQ/ukS0TA== + headers: + accept-ranges: + - bytes + content-length: + - '16' + content-range: + - bytes 0-15/16 + content-type: + - application/octet-stream + date: + - Wed, 27 Jul 2022 20:15:18 GMT + etag: + - '"0x8DA700CB96F5851"' + last-modified: + - Wed, 27 Jul 2022 20:15:17 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-content-md5: + - s1SjcMZv5j9irXeMc0pPnA== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Wed, 27 Jul 2022 20:15:17 GMT + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-meta-encryptiondata: + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "bi7siNpILszaZgdE4KONpYyOoCVeh7oSBneH44exxeCqH7k9qlck4Q==", + "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "1.0", "EncryptionAlgorithm": + "AES_CBC_256"}, "ContentEncryptionIV": "8RNtA8J9pwPpDiV0K5hblA==", "KeyWrappingMetadata": + {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2021-08-06' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) + x-ms-date: + - Wed, 27 Jul 2022 20:15:16 GMT + x-ms-range: + - bytes=0-1023 + x-ms-version: + - '2021-08-06' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainer684c1679/encryption_block_blob684c1679 + response: + body: + string: !!binary | + 3JRTu2J69KTqupQ/ukS0TA== + headers: + accept-ranges: + - bytes + content-length: + - '16' + content-range: + - bytes 0-15/16 + content-type: + - application/octet-stream + date: + - Wed, 27 Jul 2022 20:15:19 GMT + etag: + - '"0x8DA700CB96F5851"' + last-modified: + - Wed, 27 Jul 2022 20:15:17 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-content-md5: + - s1SjcMZv5j9irXeMc0pPnA== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Wed, 27 Jul 2022 20:15:17 GMT + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-meta-encryptiondata: + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "bi7siNpILszaZgdE4KONpYyOoCVeh7oSBneH44exxeCqH7k9qlck4Q==", + "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "1.0", "EncryptionAlgorithm": + "AES_CBC_256"}, "ContentEncryptionIV": "8RNtA8J9pwPpDiV0K5hblA==", "KeyWrappingMetadata": + {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2021-08-06' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) + x-ms-date: + - Wed, 27 Jul 2022 20:15:16 GMT x-ms-version: - - '2021-06-08' + - '2021-08-06' method: HEAD uri: https://storagename.blob.core.windows.net/utcontainer684c1679/encryption_block_blob684c1679 response: @@ -246,19 +366,17 @@ interactions: content-length: - '16' content-md5: - - pKhQH//5cvx3zovpL8wI4w== + - s1SjcMZv5j9irXeMc0pPnA== content-type: - application/octet-stream date: - - Mon, 06 Jun 2022 22:43:09 GMT + - Wed, 27 Jul 2022 20:15:19 GMT etag: - - '"0x8DA480DEED25D70"' + - '"0x8DA700CB96F5851"' last-modified: - - Mon, 06 Jun 2022 22:43:10 GMT + - Wed, 27 Jul 2022 20:15:17 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin x-ms-access-tier: - Hot x-ms-access-tier-inferred: @@ -266,20 +384,20 @@ interactions: x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Mon, 06 Jun 2022 22:43:10 GMT + - Wed, 27 Jul 2022 20:15:17 GMT x-ms-lease-state: - available x-ms-lease-status: - unlocked x-ms-meta-encryptiondata: - - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "bGTlKI5MsFWgr5h1IfFHKNhYqHn19WFFVGTa4p3SKNNvxcVyM8+a6A==", + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "bi7siNpILszaZgdE4KONpYyOoCVeh7oSBneH44exxeCqH7k9qlck4Q==", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "1.0", "EncryptionAlgorithm": - "AES_CBC_256"}, "ContentEncryptionIV": "oTSAZ3TXZDqLEmYgP0LnIg==", "KeyWrappingMetadata": - {"EncryptionLibrary": "Python 12.12.1"}, "EncryptionMode": "FullBlob"}' + "AES_CBC_256"}, "ContentEncryptionIV": "8RNtA8J9pwPpDiV0K5hblA==", "KeyWrappingMetadata": + {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' x-ms-server-encrypted: - 'true' x-ms-version: - - '2021-06-08' + - '2021-08-06' status: code: 200 message: OK @@ -293,19 +411,143 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.12.1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) + x-ms-date: + - Wed, 27 Jul 2022 20:15:17 GMT + x-ms-range: + - bytes=0-1023 + x-ms-version: + - '2021-08-06' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainer684c1679/encryption_block_blob684c1679 + response: + body: + string: !!binary | + 3JRTu2J69KTqupQ/ukS0TA== + headers: + accept-ranges: + - bytes + content-length: + - '16' + content-range: + - bytes 0-15/16 + content-type: + - application/octet-stream + date: + - Wed, 27 Jul 2022 20:15:19 GMT + etag: + - '"0x8DA700CB96F5851"' + last-modified: + - Wed, 27 Jul 2022 20:15:17 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-content-md5: + - s1SjcMZv5j9irXeMc0pPnA== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Wed, 27 Jul 2022 20:15:17 GMT + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-meta-encryptiondata: + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "bi7siNpILszaZgdE4KONpYyOoCVeh7oSBneH44exxeCqH7k9qlck4Q==", + "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "1.0", "EncryptionAlgorithm": + "AES_CBC_256"}, "ContentEncryptionIV": "8RNtA8J9pwPpDiV0K5hblA==", "KeyWrappingMetadata": + {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2021-08-06' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) + x-ms-date: + - Wed, 27 Jul 2022 20:15:18 GMT + x-ms-range: + - bytes=0-1023 + x-ms-version: + - '2021-08-06' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainer684c1679/encryption_block_blob684c1679 + response: + body: + string: !!binary | + 3JRTu2J69KTqupQ/ukS0TA== + headers: + accept-ranges: + - bytes + content-length: + - '16' + content-range: + - bytes 0-15/16 + content-type: + - application/octet-stream + date: + - Wed, 27 Jul 2022 20:15:20 GMT + etag: + - '"0x8DA700CB96F5851"' + last-modified: + - Wed, 27 Jul 2022 20:15:17 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-content-md5: + - s1SjcMZv5j9irXeMc0pPnA== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Wed, 27 Jul 2022 20:15:17 GMT + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-meta-encryptiondata: + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "bi7siNpILszaZgdE4KONpYyOoCVeh7oSBneH44exxeCqH7k9qlck4Q==", + "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "1.0", "EncryptionAlgorithm": + "AES_CBC_256"}, "ContentEncryptionIV": "8RNtA8J9pwPpDiV0K5hblA==", "KeyWrappingMetadata": + {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2021-08-06' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Mon, 06 Jun 2022 22:43:10 GMT + - Wed, 27 Jul 2022 20:15:19 GMT x-ms-range: - bytes=0-1023 x-ms-version: - - '2021-06-08' + - '2021-08-06' method: GET uri: https://storagename.blob.core.windows.net/utcontainer684c1679/encryption_block_blob684c1679 response: body: string: !!binary | - fyi/ELf2ea5+qQ22bNOPfQ== + 3JRTu2J69KTqupQ/ukS0TA== headers: accept-ranges: - bytes @@ -316,34 +558,32 @@ interactions: content-type: - application/octet-stream date: - - Mon, 06 Jun 2022 22:43:09 GMT + - Wed, 27 Jul 2022 20:15:21 GMT etag: - - '"0x8DA480DEED25D70"' + - '"0x8DA700CB96F5851"' last-modified: - - Mon, 06 Jun 2022 22:43:10 GMT + - Wed, 27 Jul 2022 20:15:17 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin x-ms-blob-content-md5: - - pKhQH//5cvx3zovpL8wI4w== + - s1SjcMZv5j9irXeMc0pPnA== x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Mon, 06 Jun 2022 22:43:10 GMT + - Wed, 27 Jul 2022 20:15:17 GMT x-ms-lease-state: - available x-ms-lease-status: - unlocked x-ms-meta-encryptiondata: - - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "bGTlKI5MsFWgr5h1IfFHKNhYqHn19WFFVGTa4p3SKNNvxcVyM8+a6A==", + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "bi7siNpILszaZgdE4KONpYyOoCVeh7oSBneH44exxeCqH7k9qlck4Q==", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "1.0", "EncryptionAlgorithm": - "AES_CBC_256"}, "ContentEncryptionIV": "oTSAZ3TXZDqLEmYgP0LnIg==", "KeyWrappingMetadata": - {"EncryptionLibrary": "Python 12.12.1"}, "EncryptionMode": "FullBlob"}' + "AES_CBC_256"}, "ContentEncryptionIV": "8RNtA8J9pwPpDiV0K5hblA==", "KeyWrappingMetadata": + {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' x-ms-server-encrypted: - 'true' x-ms-version: - - '2021-06-08' + - '2021-08-06' status: code: 206 message: Partial Content diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_async.test_get_blob_strict_mode_unencrypted_blob_async.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_async.test_get_blob_strict_mode_unencrypted_blob_async.yaml index 9af8769bed87..15c386bd8344 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_async.test_get_blob_strict_mode_unencrypted_blob_async.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_async.test_get_blob_strict_mode_unencrypted_blob_async.yaml @@ -5,11 +5,11 @@ interactions: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.12.1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Mon, 06 Jun 2022 23:55:04 GMT + - Wed, 27 Jul 2022 20:08:25 GMT x-ms-version: - - '2021-06-08' + - '2021-08-06' method: PUT uri: https://storagename.blob.core.windows.net/utcontainer99cf1ef8?restype=container response: @@ -17,15 +17,15 @@ interactions: string: '' headers: content-length: '0' - date: Mon, 06 Jun 2022 23:55:04 GMT - etag: '"0x8DA4817FA6E52F6"' - last-modified: Mon, 06 Jun 2022 23:55:04 GMT + date: Wed, 27 Jul 2022 20:08:27 GMT + etag: '"0x8DA700BC58005EA"' + last-modified: Wed, 27 Jul 2022 20:08:28 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2021-06-08' + x-ms-version: '2021-08-06' status: code: 201 message: Created - url: https://jalauzoncanary.blob.core.windows.net/utcontainer99cf1ef8?restype=container + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainer99cf1ef8?restype=container - request: body: Foo headers: @@ -38,13 +38,13 @@ interactions: If-None-Match: - '*' User-Agent: - - azsdk-python-storage-blob/12.12.1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-blob-type: - BlockBlob x-ms-date: - - Mon, 06 Jun 2022 23:55:04 GMT + - Wed, 27 Jul 2022 20:08:25 GMT x-ms-version: - - '2021-06-08' + - '2021-08-06' method: PUT uri: https://storagename.blob.core.windows.net/utcontainer99cf1ef8/encryption_block_blob99cf1ef8 response: @@ -53,28 +53,28 @@ interactions: headers: content-length: '0' content-md5: E1bGfXrRY42Ba/uCLdLCXQ== - date: Mon, 06 Jun 2022 23:55:04 GMT - etag: '"0x8DA4817FA79297F"' - last-modified: Mon, 06 Jun 2022 23:55:05 GMT + date: Wed, 27 Jul 2022 20:08:27 GMT + etag: '"0x8DA700BC5837C30"' + last-modified: Wed, 27 Jul 2022 20:08:28 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: 7Wml2VbcwgU= x-ms-request-server-encrypted: 'true' - x-ms-version: '2021-06-08' + x-ms-version: '2021-08-06' status: code: 201 message: Created - url: https://jalauzoncanary.blob.core.windows.net/utcontainer99cf1ef8/encryption_block_blob99cf1ef8 + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainer99cf1ef8/encryption_block_blob99cf1ef8 - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.12.1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Mon, 06 Jun 2022 23:55:05 GMT + - Wed, 27 Jul 2022 20:08:25 GMT x-ms-version: - - '2021-06-08' + - '2021-08-06' method: HEAD uri: https://storagename.blob.core.windows.net/utcontainer99cf1ef8/encryption_block_blob99cf1ef8 response: @@ -85,36 +85,35 @@ interactions: content-length: '3' content-md5: E1bGfXrRY42Ba/uCLdLCXQ== content-type: application/octet-stream - date: Mon, 06 Jun 2022 23:55:04 GMT - etag: '"0x8DA4817FA79297F"' - last-modified: Mon, 06 Jun 2022 23:55:05 GMT + date: Wed, 27 Jul 2022 20:08:27 GMT + etag: '"0x8DA700BC5837C30"' + last-modified: Wed, 27 Jul 2022 20:08:28 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: Origin x-ms-access-tier: Hot x-ms-access-tier-inferred: 'true' x-ms-blob-type: BlockBlob - x-ms-creation-time: Mon, 06 Jun 2022 23:55:05 GMT + x-ms-creation-time: Wed, 27 Jul 2022 20:08:28 GMT x-ms-lease-state: available x-ms-lease-status: unlocked x-ms-server-encrypted: 'true' - x-ms-version: '2021-06-08' + x-ms-version: '2021-08-06' status: code: 200 message: OK - url: https://jalauzoncanary.blob.core.windows.net/utcontainer99cf1ef8/encryption_block_blob99cf1ef8 + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainer99cf1ef8/encryption_block_blob99cf1ef8 - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.12.1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Mon, 06 Jun 2022 23:55:05 GMT + - Wed, 27 Jul 2022 20:08:25 GMT x-ms-range: - bytes=0-4095 x-ms-version: - - '2021-06-08' + - '2021-08-06' method: GET uri: https://storagename.blob.core.windows.net/utcontainer99cf1ef8/encryption_block_blob99cf1ef8 response: @@ -125,20 +124,19 @@ interactions: content-length: '3' content-range: bytes 0-2/3 content-type: application/octet-stream - date: Mon, 06 Jun 2022 23:55:04 GMT - etag: '"0x8DA4817FA79297F"' - last-modified: Mon, 06 Jun 2022 23:55:05 GMT + date: Wed, 27 Jul 2022 20:08:27 GMT + etag: '"0x8DA700BC5837C30"' + last-modified: Wed, 27 Jul 2022 20:08:28 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: Origin x-ms-blob-content-md5: E1bGfXrRY42Ba/uCLdLCXQ== x-ms-blob-type: BlockBlob - x-ms-creation-time: Mon, 06 Jun 2022 23:55:05 GMT + x-ms-creation-time: Wed, 27 Jul 2022 20:08:28 GMT x-ms-lease-state: available x-ms-lease-status: unlocked x-ms-server-encrypted: 'true' - x-ms-version: '2021-06-08' + x-ms-version: '2021-08-06' status: code: 206 message: Partial Content - url: https://jalauzoncanary.blob.core.windows.net/utcontainer99cf1ef8/encryption_block_blob99cf1ef8 + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainer99cf1ef8/encryption_block_blob99cf1ef8 version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_async.test_missing_attribute_kek_unwrap_async.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_async.test_missing_attribute_kek_unwrap_async.yaml index f25a253f9e9d..05686ce53a8f 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_async.test_missing_attribute_kek_unwrap_async.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_async.test_missing_attribute_kek_unwrap_async.yaml @@ -5,11 +5,11 @@ interactions: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.12.1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Mon, 06 Jun 2022 23:55:06 GMT + - Wed, 27 Jul 2022 20:15:19 GMT x-ms-version: - - '2021-06-08' + - '2021-08-06' method: PUT uri: https://storagename.blob.core.windows.net/utcontainer96591b73?restype=container response: @@ -17,18 +17,18 @@ interactions: string: '' headers: content-length: '0' - date: Mon, 06 Jun 2022 23:55:06 GMT - etag: '"0x8DA4817FBAD4095"' - last-modified: Mon, 06 Jun 2022 23:55:07 GMT + date: Wed, 27 Jul 2022 20:15:21 GMT + etag: '"0x8DA700CBBF9ABE3"' + last-modified: Wed, 27 Jul 2022 20:15:22 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2021-06-08' + x-ms-version: '2021-08-06' status: code: 201 message: Created - url: https://jalauzoncanary.blob.core.windows.net/utcontainer96591b73?restype=container + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainer96591b73?restype=container - request: body: !!binary | - BFa+DBSHIY8BxyBf85fPqA== + krY1ciytSpZHAj6nVR4cVQ== headers: Accept: - application/xml @@ -39,18 +39,18 @@ interactions: If-None-Match: - '*' User-Agent: - - azsdk-python-storage-blob/12.12.1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-blob-type: - BlockBlob x-ms-date: - - Mon, 06 Jun 2022 23:55:07 GMT + - Wed, 27 Jul 2022 20:15:19 GMT x-ms-meta-encryptiondata: - - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "6B6jJ/Lnl+gFaQFZVqVMJBPSp+SRfu2kVL9j41DYLBg7HI8/iIfMvg==", + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "EZ4MC793em17b06uk4bbnOwYedj9CLM/ZkVISRNduv/LhchArOFEcQ==", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "1.0", "EncryptionAlgorithm": - "AES_CBC_256"}, "ContentEncryptionIV": "ImVMzWtVKX+MSAaiV0+//g==", "KeyWrappingMetadata": - {"EncryptionLibrary": "Python 12.12.1"}, "EncryptionMode": "FullBlob"}' + "AES_CBC_256"}, "ContentEncryptionIV": "7wLR5pEPH401zsHgvIDlXg==", "KeyWrappingMetadata": + {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' x-ms-version: - - '2021-06-08' + - '2021-08-06' method: PUT uri: https://storagename.blob.core.windows.net/utcontainer96591b73/encryption_block_blob96591b73 response: @@ -58,29 +58,29 @@ interactions: string: '' headers: content-length: '0' - content-md5: iube8Cq/HsIrxIUVDDywtw== - date: Mon, 06 Jun 2022 23:55:06 GMT - etag: '"0x8DA4817FBB63603"' - last-modified: Mon, 06 Jun 2022 23:55:07 GMT + content-md5: dSF27rTjzAXFmN+ugkAMxA== + date: Wed, 27 Jul 2022 20:15:21 GMT + etag: '"0x8DA700CBBFD9249"' + last-modified: Wed, 27 Jul 2022 20:15:22 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-content-crc64: dOWNj/xAGJo= + x-ms-content-crc64: TMm7R78l/2U= x-ms-request-server-encrypted: 'true' - x-ms-version: '2021-06-08' + x-ms-version: '2021-08-06' status: code: 201 message: Created - url: https://jalauzoncanary.blob.core.windows.net/utcontainer96591b73/encryption_block_blob96591b73 + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainer96591b73/encryption_block_blob96591b73 - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.12.1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Mon, 06 Jun 2022 23:55:07 GMT + - Wed, 27 Jul 2022 20:15:19 GMT x-ms-version: - - '2021-06-08' + - '2021-08-06' method: HEAD uri: https://storagename.blob.core.windows.net/utcontainer96591b73/encryption_block_blob96591b73 response: @@ -89,86 +89,84 @@ interactions: headers: accept-ranges: bytes content-length: '16' - content-md5: iube8Cq/HsIrxIUVDDywtw== + content-md5: dSF27rTjzAXFmN+ugkAMxA== content-type: application/octet-stream - date: Mon, 06 Jun 2022 23:55:06 GMT - etag: '"0x8DA4817FBB63603"' - last-modified: Mon, 06 Jun 2022 23:55:07 GMT + date: Wed, 27 Jul 2022 20:15:21 GMT + etag: '"0x8DA700CBBFD9249"' + last-modified: Wed, 27 Jul 2022 20:15:22 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: Origin x-ms-access-tier: Hot x-ms-access-tier-inferred: 'true' x-ms-blob-type: BlockBlob - x-ms-creation-time: Mon, 06 Jun 2022 23:55:07 GMT + x-ms-creation-time: Wed, 27 Jul 2022 20:15:22 GMT x-ms-lease-state: available x-ms-lease-status: unlocked x-ms-meta-encryptiondata: '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": - "6B6jJ/Lnl+gFaQFZVqVMJBPSp+SRfu2kVL9j41DYLBg7HI8/iIfMvg==", "Algorithm": "A256KW"}, + "EZ4MC793em17b06uk4bbnOwYedj9CLM/ZkVISRNduv/LhchArOFEcQ==", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "1.0", "EncryptionAlgorithm": "AES_CBC_256"}, - "ContentEncryptionIV": "ImVMzWtVKX+MSAaiV0+//g==", "KeyWrappingMetadata": - {"EncryptionLibrary": "Python 12.12.1"}, "EncryptionMode": "FullBlob"}' + "ContentEncryptionIV": "7wLR5pEPH401zsHgvIDlXg==", "KeyWrappingMetadata": + {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' x-ms-server-encrypted: 'true' - x-ms-version: '2021-06-08' + x-ms-version: '2021-08-06' status: code: 200 message: OK - url: https://jalauzoncanary.blob.core.windows.net/utcontainer96591b73/encryption_block_blob96591b73 + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainer96591b73/encryption_block_blob96591b73 - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.12.1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Mon, 06 Jun 2022 23:55:07 GMT + - Wed, 27 Jul 2022 20:15:19 GMT x-ms-range: - bytes=0-4095 x-ms-version: - - '2021-06-08' + - '2021-08-06' method: GET uri: https://storagename.blob.core.windows.net/utcontainer96591b73/encryption_block_blob96591b73 response: body: string: !!binary | - BFa+DBSHIY8BxyBf85fPqA== + krY1ciytSpZHAj6nVR4cVQ== headers: accept-ranges: bytes content-length: '16' content-range: bytes 0-15/16 content-type: application/octet-stream - date: Mon, 06 Jun 2022 23:55:06 GMT - etag: '"0x8DA4817FBB63603"' - last-modified: Mon, 06 Jun 2022 23:55:07 GMT + date: Wed, 27 Jul 2022 20:15:21 GMT + etag: '"0x8DA700CBBFD9249"' + last-modified: Wed, 27 Jul 2022 20:15:22 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: Origin - x-ms-blob-content-md5: iube8Cq/HsIrxIUVDDywtw== + x-ms-blob-content-md5: dSF27rTjzAXFmN+ugkAMxA== x-ms-blob-type: BlockBlob - x-ms-creation-time: Mon, 06 Jun 2022 23:55:07 GMT + x-ms-creation-time: Wed, 27 Jul 2022 20:15:22 GMT x-ms-lease-state: available x-ms-lease-status: unlocked x-ms-meta-encryptiondata: '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": - "6B6jJ/Lnl+gFaQFZVqVMJBPSp+SRfu2kVL9j41DYLBg7HI8/iIfMvg==", "Algorithm": "A256KW"}, + "EZ4MC793em17b06uk4bbnOwYedj9CLM/ZkVISRNduv/LhchArOFEcQ==", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "1.0", "EncryptionAlgorithm": "AES_CBC_256"}, - "ContentEncryptionIV": "ImVMzWtVKX+MSAaiV0+//g==", "KeyWrappingMetadata": - {"EncryptionLibrary": "Python 12.12.1"}, "EncryptionMode": "FullBlob"}' + "ContentEncryptionIV": "7wLR5pEPH401zsHgvIDlXg==", "KeyWrappingMetadata": + {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' x-ms-server-encrypted: 'true' - x-ms-version: '2021-06-08' + x-ms-version: '2021-08-06' status: code: 206 message: Partial Content - url: https://jalauzoncanary.blob.core.windows.net/utcontainer96591b73/encryption_block_blob96591b73 + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainer96591b73/encryption_block_blob96591b73 - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.12.1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Mon, 06 Jun 2022 23:55:07 GMT + - Wed, 27 Jul 2022 20:15:19 GMT x-ms-version: - - '2021-06-08' + - '2021-08-06' method: HEAD uri: https://storagename.blob.core.windows.net/utcontainer96591b73/encryption_block_blob96591b73 response: @@ -177,73 +175,71 @@ interactions: headers: accept-ranges: bytes content-length: '16' - content-md5: iube8Cq/HsIrxIUVDDywtw== + content-md5: dSF27rTjzAXFmN+ugkAMxA== content-type: application/octet-stream - date: Mon, 06 Jun 2022 23:55:07 GMT - etag: '"0x8DA4817FBB63603"' - last-modified: Mon, 06 Jun 2022 23:55:07 GMT + date: Wed, 27 Jul 2022 20:15:21 GMT + etag: '"0x8DA700CBBFD9249"' + last-modified: Wed, 27 Jul 2022 20:15:22 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: Origin x-ms-access-tier: Hot x-ms-access-tier-inferred: 'true' x-ms-blob-type: BlockBlob - x-ms-creation-time: Mon, 06 Jun 2022 23:55:07 GMT + x-ms-creation-time: Wed, 27 Jul 2022 20:15:22 GMT x-ms-lease-state: available x-ms-lease-status: unlocked x-ms-meta-encryptiondata: '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": - "6B6jJ/Lnl+gFaQFZVqVMJBPSp+SRfu2kVL9j41DYLBg7HI8/iIfMvg==", "Algorithm": "A256KW"}, + "EZ4MC793em17b06uk4bbnOwYedj9CLM/ZkVISRNduv/LhchArOFEcQ==", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "1.0", "EncryptionAlgorithm": "AES_CBC_256"}, - "ContentEncryptionIV": "ImVMzWtVKX+MSAaiV0+//g==", "KeyWrappingMetadata": - {"EncryptionLibrary": "Python 12.12.1"}, "EncryptionMode": "FullBlob"}' + "ContentEncryptionIV": "7wLR5pEPH401zsHgvIDlXg==", "KeyWrappingMetadata": + {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' x-ms-server-encrypted: 'true' - x-ms-version: '2021-06-08' + x-ms-version: '2021-08-06' status: code: 200 message: OK - url: https://jalauzoncanary.blob.core.windows.net/utcontainer96591b73/encryption_block_blob96591b73 + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainer96591b73/encryption_block_blob96591b73 - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.12.1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Mon, 06 Jun 2022 23:55:07 GMT + - Wed, 27 Jul 2022 20:15:19 GMT x-ms-range: - bytes=0-4095 x-ms-version: - - '2021-06-08' + - '2021-08-06' method: GET uri: https://storagename.blob.core.windows.net/utcontainer96591b73/encryption_block_blob96591b73 response: body: string: !!binary | - BFa+DBSHIY8BxyBf85fPqA== + krY1ciytSpZHAj6nVR4cVQ== headers: accept-ranges: bytes content-length: '16' content-range: bytes 0-15/16 content-type: application/octet-stream - date: Mon, 06 Jun 2022 23:55:07 GMT - etag: '"0x8DA4817FBB63603"' - last-modified: Mon, 06 Jun 2022 23:55:07 GMT + date: Wed, 27 Jul 2022 20:15:21 GMT + etag: '"0x8DA700CBBFD9249"' + last-modified: Wed, 27 Jul 2022 20:15:22 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: Origin - x-ms-blob-content-md5: iube8Cq/HsIrxIUVDDywtw== + x-ms-blob-content-md5: dSF27rTjzAXFmN+ugkAMxA== x-ms-blob-type: BlockBlob - x-ms-creation-time: Mon, 06 Jun 2022 23:55:07 GMT + x-ms-creation-time: Wed, 27 Jul 2022 20:15:22 GMT x-ms-lease-state: available x-ms-lease-status: unlocked x-ms-meta-encryptiondata: '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": - "6B6jJ/Lnl+gFaQFZVqVMJBPSp+SRfu2kVL9j41DYLBg7HI8/iIfMvg==", "Algorithm": "A256KW"}, + "EZ4MC793em17b06uk4bbnOwYedj9CLM/ZkVISRNduv/LhchArOFEcQ==", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "1.0", "EncryptionAlgorithm": "AES_CBC_256"}, - "ContentEncryptionIV": "ImVMzWtVKX+MSAaiV0+//g==", "KeyWrappingMetadata": - {"EncryptionLibrary": "Python 12.12.1"}, "EncryptionMode": "FullBlob"}' + "ContentEncryptionIV": "7wLR5pEPH401zsHgvIDlXg==", "KeyWrappingMetadata": + {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' x-ms-server-encrypted: 'true' - x-ms-version: '2021-06-08' + x-ms-version: '2021-08-06' status: code: 206 message: Partial Content - url: https://jalauzoncanary.blob.core.windows.net/utcontainer96591b73/encryption_block_blob96591b73 + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainer96591b73/encryption_block_blob96591b73 version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_v2.test_decryption_on_non_encrypted_blob.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_v2.test_decryption_on_non_encrypted_blob.yaml index 1b03fa0828ab..997b361f8771 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_v2.test_decryption_on_non_encrypted_blob.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_v2.test_decryption_on_non_encrypted_blob.yaml @@ -11,9 +11,9 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:44:18 GMT + - Wed, 27 Jul 2022 20:17:17 GMT x-ms-version: - '2021-08-06' method: PUT @@ -25,11 +25,11 @@ interactions: content-length: - '0' date: - - Tue, 14 Jun 2022 23:44:18 GMT + - Wed, 27 Jul 2022 20:17:19 GMT etag: - - '"0x8DA4E5FCCC63995"' + - '"0x8DA700D02785D5F"' last-modified: - - Tue, 14 Jun 2022 23:44:19 GMT + - Wed, 27 Jul 2022 20:17:20 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: @@ -51,11 +51,11 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-blob-type: - BlockBlob x-ms-date: - - Tue, 14 Jun 2022 23:44:19 GMT + - Wed, 27 Jul 2022 20:17:17 GMT x-ms-version: - '2021-08-06' method: PUT @@ -69,11 +69,11 @@ interactions: content-md5: - o87WgihooSvxgQmgMUvigg== date: - - Tue, 14 Jun 2022 23:44:18 GMT + - Wed, 27 Jul 2022 20:17:19 GMT etag: - - '"0x8DA4E5FCCD239AD"' + - '"0x8DA700D027C75FD"' last-modified: - - Tue, 14 Jun 2022 23:44:19 GMT + - Wed, 27 Jul 2022 20:17:20 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -95,9 +95,9 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:44:19 GMT + - Wed, 27 Jul 2022 20:17:17 GMT x-ms-version: - '2021-08-06' method: HEAD @@ -115,15 +115,13 @@ interactions: content-type: - application/octet-stream date: - - Tue, 14 Jun 2022 23:44:18 GMT + - Wed, 27 Jul 2022 20:17:19 GMT etag: - - '"0x8DA4E5FCCD239AD"' + - '"0x8DA700D027C75FD"' last-modified: - - Tue, 14 Jun 2022 23:44:19 GMT + - Wed, 27 Jul 2022 20:17:20 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin x-ms-access-tier: - Hot x-ms-access-tier-inferred: @@ -131,7 +129,7 @@ interactions: x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Tue, 14 Jun 2022 23:44:19 GMT + - Wed, 27 Jul 2022 20:17:20 GMT x-ms-lease-state: - available x-ms-lease-status: @@ -153,9 +151,9 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:44:19 GMT + - Wed, 27 Jul 2022 20:17:17 GMT x-ms-range: - bytes=0-33554431 x-ms-version: @@ -175,21 +173,19 @@ interactions: content-type: - application/octet-stream date: - - Tue, 14 Jun 2022 23:44:18 GMT + - Wed, 27 Jul 2022 20:17:19 GMT etag: - - '"0x8DA4E5FCCD239AD"' + - '"0x8DA700D027C75FD"' last-modified: - - Tue, 14 Jun 2022 23:44:19 GMT + - Wed, 27 Jul 2022 20:17:20 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin x-ms-blob-content-md5: - o87WgihooSvxgQmgMUvigg== x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Tue, 14 Jun 2022 23:44:19 GMT + - Wed, 27 Jul 2022 20:17:20 GMT x-ms-lease-state: - available x-ms-lease-status: @@ -211,9 +207,121 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:44:19 GMT + - Wed, 27 Jul 2022 20:17:18 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2021-08-06' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainer82b190f/encryptionv2_blob82b190f + response: + body: + string: Hello World Not Encrypted! + headers: + accept-ranges: + - bytes + content-length: + - '26' + content-range: + - bytes 0-25/26 + content-type: + - application/octet-stream + date: + - Wed, 27 Jul 2022 20:17:20 GMT + etag: + - '"0x8DA700D027C75FD"' + last-modified: + - Wed, 27 Jul 2022 20:17:20 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-content-md5: + - o87WgihooSvxgQmgMUvigg== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Wed, 27 Jul 2022 20:17:20 GMT + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2021-08-06' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) + x-ms-date: + - Wed, 27 Jul 2022 20:17:19 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2021-08-06' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainer82b190f/encryptionv2_blob82b190f + response: + body: + string: Hello World Not Encrypted! + headers: + accept-ranges: + - bytes + content-length: + - '26' + content-range: + - bytes 0-25/26 + content-type: + - application/octet-stream + date: + - Wed, 27 Jul 2022 20:17:21 GMT + etag: + - '"0x8DA700D027C75FD"' + last-modified: + - Wed, 27 Jul 2022 20:17:20 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-content-md5: + - o87WgihooSvxgQmgMUvigg== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Wed, 27 Jul 2022 20:17:20 GMT + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2021-08-06' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) + x-ms-date: + - Wed, 27 Jul 2022 20:17:19 GMT x-ms-version: - '2021-08-06' method: HEAD @@ -231,15 +339,13 @@ interactions: content-type: - application/octet-stream date: - - Tue, 14 Jun 2022 23:44:18 GMT + - Wed, 27 Jul 2022 20:17:21 GMT etag: - - '"0x8DA4E5FCCD239AD"' + - '"0x8DA700D027C75FD"' last-modified: - - Tue, 14 Jun 2022 23:44:19 GMT + - Wed, 27 Jul 2022 20:17:20 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin x-ms-access-tier: - Hot x-ms-access-tier-inferred: @@ -247,7 +353,7 @@ interactions: x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Tue, 14 Jun 2022 23:44:19 GMT + - Wed, 27 Jul 2022 20:17:20 GMT x-ms-lease-state: - available x-ms-lease-status: @@ -269,9 +375,9 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:44:19 GMT + - Wed, 27 Jul 2022 20:17:19 GMT x-ms-range: - bytes=0-33554431 x-ms-version: @@ -291,21 +397,19 @@ interactions: content-type: - application/octet-stream date: - - Tue, 14 Jun 2022 23:44:19 GMT + - Wed, 27 Jul 2022 20:17:21 GMT etag: - - '"0x8DA4E5FCCD239AD"' + - '"0x8DA700D027C75FD"' last-modified: - - Tue, 14 Jun 2022 23:44:19 GMT + - Wed, 27 Jul 2022 20:17:20 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin x-ms-blob-content-md5: - o87WgihooSvxgQmgMUvigg== x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Tue, 14 Jun 2022 23:44:19 GMT + - Wed, 27 Jul 2022 20:17:20 GMT x-ms-lease-state: - available x-ms-lease-status: diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_v2.test_encryption_modify_cek.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_v2.test_encryption_modify_cek.yaml index 41dfd2291e61..796421de9c7d 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_v2.test_encryption_modify_cek.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_v2.test_encryption_modify_cek.yaml @@ -11,9 +11,9 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:44:33 GMT + - Wed, 27 Jul 2022 20:17:37 GMT x-ms-version: - '2021-08-06' method: PUT @@ -25,11 +25,11 @@ interactions: content-length: - '0' date: - - Tue, 14 Jun 2022 23:44:33 GMT + - Wed, 27 Jul 2022 20:17:39 GMT etag: - - '"0x8DA4E5FD5A92FEA"' + - '"0x8DA700D0E8AA69E"' last-modified: - - Tue, 14 Jun 2022 23:44:33 GMT + - Wed, 27 Jul 2022 20:17:40 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: @@ -39,7 +39,7 @@ interactions: message: Created - request: body: !!binary | - AAAAAAAAAAAAAAAAZYHPxefdTTsAJ18ZUKIEvEPBVgxxiuBVFfvhR0hI+XcGOLeqRZ8= + AAAAAAAAAAAAAAAAr7QLe2JbeXOm1rIQBXBIcUp3fPfnJkFe+VHRaFBs5Lirq0LGGTk= headers: Accept: - application/xml @@ -52,16 +52,16 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-blob-type: - BlockBlob x-ms-date: - - Tue, 14 Jun 2022 23:44:34 GMT + - Wed, 27 Jul 2022 20:17:37 GMT x-ms-meta-encryptiondata: - - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "ariJDpxXRWLyaWRAjSEDYXbr9QUf2oL7eSFYa3fyqyBSTy+dPODFTVLFaJ3uMEVZ", + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "Sy1Mr6+WaibVrN1fppCZORokrd1z9TZU2YWerhqyUegPGqeb6OJ3sY1fVkXIhuB+", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "2.0", "EncryptionAlgorithm": "AES_GCM_256"}, "EncryptedRegionInfo": {"DataLength": 4194304, "NonceLength": - 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.13.0b1"}, "EncryptionMode": + 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' x-ms-version: - '2021-08-06' @@ -74,17 +74,17 @@ interactions: content-length: - '0' content-md5: - - Y1O2v9wB3U2jzxSElp+XLQ== + - gvt0bFJ3ti1nMgzgkViEoQ== date: - - Tue, 14 Jun 2022 23:44:33 GMT + - Wed, 27 Jul 2022 20:17:39 GMT etag: - - '"0x8DA4E5FD5B6E813"' + - '"0x8DA700D0E8E453A"' last-modified: - - Tue, 14 Jun 2022 23:44:34 GMT + - Wed, 27 Jul 2022 20:17:40 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: - - khr4AUq07xY= + - 5kbLkT4DPU4= x-ms-request-server-encrypted: - 'true' x-ms-version: @@ -102,9 +102,9 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:44:34 GMT + - Wed, 27 Jul 2022 20:17:37 GMT x-ms-version: - '2021-08-06' method: HEAD @@ -118,19 +118,17 @@ interactions: content-length: - '50' content-md5: - - Y1O2v9wB3U2jzxSElp+XLQ== + - gvt0bFJ3ti1nMgzgkViEoQ== content-type: - application/octet-stream date: - - Tue, 14 Jun 2022 23:44:33 GMT + - Wed, 27 Jul 2022 20:17:39 GMT etag: - - '"0x8DA4E5FD5B6E813"' + - '"0x8DA700D0E8E453A"' last-modified: - - Tue, 14 Jun 2022 23:44:34 GMT + - Wed, 27 Jul 2022 20:17:40 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin x-ms-access-tier: - Hot x-ms-access-tier-inferred: @@ -138,16 +136,16 @@ interactions: x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Tue, 14 Jun 2022 23:44:34 GMT + - Wed, 27 Jul 2022 20:17:40 GMT x-ms-lease-state: - available x-ms-lease-status: - unlocked x-ms-meta-encryptiondata: - - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "ariJDpxXRWLyaWRAjSEDYXbr9QUf2oL7eSFYa3fyqyBSTy+dPODFTVLFaJ3uMEVZ", + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "Sy1Mr6+WaibVrN1fppCZORokrd1z9TZU2YWerhqyUegPGqeb6OJ3sY1fVkXIhuB+", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "2.0", "EncryptionAlgorithm": "AES_GCM_256"}, "EncryptedRegionInfo": {"DataLength": 4194304, "NonceLength": - 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.13.0b1"}, "EncryptionMode": + 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' x-ms-server-encrypted: - 'true' @@ -168,14 +166,14 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:44:34 GMT + - Wed, 27 Jul 2022 20:17:37 GMT x-ms-meta-encryptiondata: - - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "dQfgiXGAajdOqPeSUVaFt24cBtzIE5FHN/WtSF+G9hGZuyT/Ej1AaQ==", + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "9oTvw869CqZxdlgJR7t+FxwNwkn3LjbesX9+llU+4Wi8D5oxLu2yOQ==", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "2.0", "EncryptionAlgorithm": "AES_GCM_256"}, "EncryptedRegionInfo": {"DataLength": 4194304, "NonceLength": - 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.13.0b1"}, "EncryptionMode": + 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' x-ms-version: - '2021-08-06' @@ -188,11 +186,11 @@ interactions: content-length: - '0' date: - - Tue, 14 Jun 2022 23:44:33 GMT + - Wed, 27 Jul 2022 20:17:39 GMT etag: - - '"0x8DA4E5FD5D23446"' + - '"0x8DA700D0E94ACE3"' last-modified: - - Tue, 14 Jun 2022 23:44:34 GMT + - Wed, 27 Jul 2022 20:17:40 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-request-server-encrypted: @@ -212,9 +210,9 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:44:34 GMT + - Wed, 27 Jul 2022 20:17:37 GMT x-ms-version: - '2021-08-06' method: HEAD @@ -228,19 +226,17 @@ interactions: content-length: - '50' content-md5: - - Y1O2v9wB3U2jzxSElp+XLQ== + - gvt0bFJ3ti1nMgzgkViEoQ== content-type: - application/octet-stream date: - - Tue, 14 Jun 2022 23:44:33 GMT + - Wed, 27 Jul 2022 20:17:39 GMT etag: - - '"0x8DA4E5FD5D23446"' + - '"0x8DA700D0E94ACE3"' last-modified: - - Tue, 14 Jun 2022 23:44:34 GMT + - Wed, 27 Jul 2022 20:17:40 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin x-ms-access-tier: - Hot x-ms-access-tier-inferred: @@ -248,16 +244,16 @@ interactions: x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Tue, 14 Jun 2022 23:44:34 GMT + - Wed, 27 Jul 2022 20:17:40 GMT x-ms-lease-state: - available x-ms-lease-status: - unlocked x-ms-meta-encryptiondata: - - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "dQfgiXGAajdOqPeSUVaFt24cBtzIE5FHN/WtSF+G9hGZuyT/Ej1AaQ==", + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "9oTvw869CqZxdlgJR7t+FxwNwkn3LjbesX9+llU+4Wi8D5oxLu2yOQ==", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "2.0", "EncryptionAlgorithm": "AES_GCM_256"}, "EncryptedRegionInfo": {"DataLength": 4194304, "NonceLength": - 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.13.0b1"}, "EncryptionMode": + 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' x-ms-server-encrypted: - 'true' @@ -276,9 +272,9 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:44:34 GMT + - Wed, 27 Jul 2022 20:17:37 GMT x-ms-range: - bytes=0-33554655 x-ms-version: @@ -288,7 +284,7 @@ interactions: response: body: string: !!binary | - AAAAAAAAAAAAAAAAZYHPxefdTTsAJ18ZUKIEvEPBVgxxiuBVFfvhR0hI+XcGOLeqRZ8= + AAAAAAAAAAAAAAAAr7QLe2JbeXOm1rIQBXBIcUp3fPfnJkFe+VHRaFBs5Lirq0LGGTk= headers: accept-ranges: - bytes @@ -299,30 +295,154 @@ interactions: content-type: - application/octet-stream date: - - Tue, 14 Jun 2022 23:44:33 GMT + - Wed, 27 Jul 2022 20:17:39 GMT etag: - - '"0x8DA4E5FD5D23446"' + - '"0x8DA700D0E94ACE3"' last-modified: - - Tue, 14 Jun 2022 23:44:34 GMT + - Wed, 27 Jul 2022 20:17:40 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin x-ms-blob-content-md5: - - Y1O2v9wB3U2jzxSElp+XLQ== + - gvt0bFJ3ti1nMgzgkViEoQ== x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Tue, 14 Jun 2022 23:44:34 GMT + - Wed, 27 Jul 2022 20:17:40 GMT x-ms-lease-state: - available x-ms-lease-status: - unlocked x-ms-meta-encryptiondata: - - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "dQfgiXGAajdOqPeSUVaFt24cBtzIE5FHN/WtSF+G9hGZuyT/Ej1AaQ==", + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "9oTvw869CqZxdlgJR7t+FxwNwkn3LjbesX9+llU+4Wi8D5oxLu2yOQ==", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "2.0", "EncryptionAlgorithm": "AES_GCM_256"}, "EncryptedRegionInfo": {"DataLength": 4194304, "NonceLength": - 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.13.0b1"}, "EncryptionMode": + 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": + "FullBlob"}' + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2021-08-06' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) + x-ms-date: + - Wed, 27 Jul 2022 20:17:38 GMT + x-ms-range: + - bytes=0-33554655 + x-ms-version: + - '2021-08-06' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainerb6b1481/encryptionv2_blobb6b1481 + response: + body: + string: !!binary | + AAAAAAAAAAAAAAAAr7QLe2JbeXOm1rIQBXBIcUp3fPfnJkFe+VHRaFBs5Lirq0LGGTk= + headers: + accept-ranges: + - bytes + content-length: + - '50' + content-range: + - bytes 0-49/50 + content-type: + - application/octet-stream + date: + - Wed, 27 Jul 2022 20:17:40 GMT + etag: + - '"0x8DA700D0E94ACE3"' + last-modified: + - Wed, 27 Jul 2022 20:17:40 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-content-md5: + - gvt0bFJ3ti1nMgzgkViEoQ== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Wed, 27 Jul 2022 20:17:40 GMT + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-meta-encryptiondata: + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "9oTvw869CqZxdlgJR7t+FxwNwkn3LjbesX9+llU+4Wi8D5oxLu2yOQ==", + "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "2.0", "EncryptionAlgorithm": + "AES_GCM_256"}, "EncryptedRegionInfo": {"DataLength": 4194304, "NonceLength": + 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": + "FullBlob"}' + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2021-08-06' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) + x-ms-date: + - Wed, 27 Jul 2022 20:17:39 GMT + x-ms-range: + - bytes=0-33554655 + x-ms-version: + - '2021-08-06' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainerb6b1481/encryptionv2_blobb6b1481 + response: + body: + string: !!binary | + AAAAAAAAAAAAAAAAr7QLe2JbeXOm1rIQBXBIcUp3fPfnJkFe+VHRaFBs5Lirq0LGGTk= + headers: + accept-ranges: + - bytes + content-length: + - '50' + content-range: + - bytes 0-49/50 + content-type: + - application/octet-stream + date: + - Wed, 27 Jul 2022 20:17:41 GMT + etag: + - '"0x8DA700D0E94ACE3"' + last-modified: + - Wed, 27 Jul 2022 20:17:40 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-content-md5: + - gvt0bFJ3ti1nMgzgkViEoQ== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Wed, 27 Jul 2022 20:17:40 GMT + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-meta-encryptiondata: + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "9oTvw869CqZxdlgJR7t+FxwNwkn3LjbesX9+llU+4Wi8D5oxLu2yOQ==", + "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "2.0", "EncryptionAlgorithm": + "AES_GCM_256"}, "EncryptedRegionInfo": {"DataLength": 4194304, "NonceLength": + 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' x-ms-server-encrypted: - 'true' diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_v2.test_encryption_v2_v1_downgrade.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_v2.test_encryption_v2_v1_downgrade.yaml index 9f15efa14b98..4072a93bf399 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_v2.test_encryption_v2_v1_downgrade.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_v2.test_encryption_v2_v1_downgrade.yaml @@ -11,9 +11,9 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:44:25 GMT + - Wed, 27 Jul 2022 20:17:57 GMT x-ms-version: - '2021-08-06' method: PUT @@ -25,11 +25,11 @@ interactions: content-length: - '0' date: - - Tue, 14 Jun 2022 23:44:24 GMT + - Wed, 27 Jul 2022 20:17:59 GMT etag: - - '"0x8DA4E5FD0CA04EF"' + - '"0x8DA700D1A462AEA"' last-modified: - - Tue, 14 Jun 2022 23:44:25 GMT + - Wed, 27 Jul 2022 20:18:00 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: @@ -39,7 +39,7 @@ interactions: message: Created - request: body: !!binary | - AAAAAAAAAAAAAAAAW2J2rFtcFtqqVlupjRM31Nnm9+MMBtAv+7qwcRu4LwXN+QEpziU= + AAAAAAAAAAAAAAAAFKq0cPTvYBJyn6KwKTj3aAKeuax3dvGuYzRqfyAtd4VHLBn7V0g= headers: Accept: - application/xml @@ -52,16 +52,16 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-blob-type: - BlockBlob x-ms-date: - - Tue, 14 Jun 2022 23:44:25 GMT + - Wed, 27 Jul 2022 20:17:57 GMT x-ms-meta-encryptiondata: - - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "IGlxCOiHiVs2vlTqyPxEVbmMVvMqU4WkRYGZ6HayAfkPwy5R9q/FHtsaZjwHL8eC", + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "FTzYr8MQLMf82Hdopu1V6zEn1m+dHmuPXr8IwGxdBJq5SOp9oKbEjWqYiDIQoNqg", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "2.0", "EncryptionAlgorithm": "AES_GCM_256"}, "EncryptedRegionInfo": {"DataLength": 4194304, "NonceLength": - 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.13.0b1"}, "EncryptionMode": + 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' x-ms-version: - '2021-08-06' @@ -74,17 +74,17 @@ interactions: content-length: - '0' content-md5: - - YZfxJkVMzfXlPmCSHBZA9g== + - mxlo1QAe63EUWKpj3rriaw== date: - - Tue, 14 Jun 2022 23:44:24 GMT + - Wed, 27 Jul 2022 20:17:59 GMT etag: - - '"0x8DA4E5FD0D55115"' + - '"0x8DA700D1A49C3C7"' last-modified: - - Tue, 14 Jun 2022 23:44:25 GMT + - Wed, 27 Jul 2022 20:18:00 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: - - Pvnx6m5iPp0= + - 43cS1Zmw/5o= x-ms-request-server-encrypted: - 'true' x-ms-version: @@ -102,9 +102,9 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:44:25 GMT + - Wed, 27 Jul 2022 20:17:57 GMT x-ms-version: - '2021-08-06' method: HEAD @@ -118,19 +118,17 @@ interactions: content-length: - '50' content-md5: - - YZfxJkVMzfXlPmCSHBZA9g== + - mxlo1QAe63EUWKpj3rriaw== content-type: - application/octet-stream date: - - Tue, 14 Jun 2022 23:44:25 GMT + - Wed, 27 Jul 2022 20:17:59 GMT etag: - - '"0x8DA4E5FD0D55115"' + - '"0x8DA700D1A49C3C7"' last-modified: - - Tue, 14 Jun 2022 23:44:25 GMT + - Wed, 27 Jul 2022 20:18:00 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin x-ms-access-tier: - Hot x-ms-access-tier-inferred: @@ -138,16 +136,16 @@ interactions: x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Tue, 14 Jun 2022 23:44:25 GMT + - Wed, 27 Jul 2022 20:18:00 GMT x-ms-lease-state: - available x-ms-lease-status: - unlocked x-ms-meta-encryptiondata: - - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "IGlxCOiHiVs2vlTqyPxEVbmMVvMqU4WkRYGZ6HayAfkPwy5R9q/FHtsaZjwHL8eC", + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "FTzYr8MQLMf82Hdopu1V6zEn1m+dHmuPXr8IwGxdBJq5SOp9oKbEjWqYiDIQoNqg", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "2.0", "EncryptionAlgorithm": "AES_GCM_256"}, "EncryptedRegionInfo": {"DataLength": 4194304, "NonceLength": - 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.13.0b1"}, "EncryptionMode": + 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' x-ms-server-encrypted: - 'true' @@ -168,15 +166,15 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:44:25 GMT + - Wed, 27 Jul 2022 20:17:57 GMT x-ms-meta-encryptiondata: - - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "IGlxCOiHiVs2vlTqyPxEVbmMVvMqU4WkRYGZ6HayAfkPwy5R9q/FHtsaZjwHL8eC", + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "FTzYr8MQLMf82Hdopu1V6zEn1m+dHmuPXr8IwGxdBJq5SOp9oKbEjWqYiDIQoNqg", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "1.0", "EncryptionAlgorithm": "AES_CBC_256"}, "EncryptedRegionInfo": {"DataLength": 4194304, "NonceLength": - 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.13.0b1"}, "EncryptionMode": - "FullBlob", "ContentEncryptionIV": "r+gUP647YdHfxxqLf+BBfQ=="}' + 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": + "FullBlob", "ContentEncryptionIV": "LR1U+a7TPMgU0hTX1lUOpg=="}' x-ms-version: - '2021-08-06' method: PUT @@ -188,11 +186,11 @@ interactions: content-length: - '0' date: - - Tue, 14 Jun 2022 23:44:25 GMT + - Wed, 27 Jul 2022 20:17:59 GMT etag: - - '"0x8DA4E5FD0EA5C9D"' + - '"0x8DA700D1A4EA511"' last-modified: - - Tue, 14 Jun 2022 23:44:26 GMT + - Wed, 27 Jul 2022 20:18:00 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-request-server-encrypted: @@ -212,9 +210,9 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:44:26 GMT + - Wed, 27 Jul 2022 20:17:57 GMT x-ms-version: - '2021-08-06' method: HEAD @@ -228,19 +226,17 @@ interactions: content-length: - '50' content-md5: - - YZfxJkVMzfXlPmCSHBZA9g== + - mxlo1QAe63EUWKpj3rriaw== content-type: - application/octet-stream date: - - Tue, 14 Jun 2022 23:44:25 GMT + - Wed, 27 Jul 2022 20:17:59 GMT etag: - - '"0x8DA4E5FD0EA5C9D"' + - '"0x8DA700D1A4EA511"' last-modified: - - Tue, 14 Jun 2022 23:44:26 GMT + - Wed, 27 Jul 2022 20:18:00 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin x-ms-access-tier: - Hot x-ms-access-tier-inferred: @@ -248,17 +244,17 @@ interactions: x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Tue, 14 Jun 2022 23:44:25 GMT + - Wed, 27 Jul 2022 20:18:00 GMT x-ms-lease-state: - available x-ms-lease-status: - unlocked x-ms-meta-encryptiondata: - - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "IGlxCOiHiVs2vlTqyPxEVbmMVvMqU4WkRYGZ6HayAfkPwy5R9q/FHtsaZjwHL8eC", + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "FTzYr8MQLMf82Hdopu1V6zEn1m+dHmuPXr8IwGxdBJq5SOp9oKbEjWqYiDIQoNqg", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "1.0", "EncryptionAlgorithm": "AES_CBC_256"}, "EncryptedRegionInfo": {"DataLength": 4194304, "NonceLength": - 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.13.0b1"}, "EncryptionMode": - "FullBlob", "ContentEncryptionIV": "r+gUP647YdHfxxqLf+BBfQ=="}' + 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": + "FullBlob", "ContentEncryptionIV": "LR1U+a7TPMgU0hTX1lUOpg=="}' x-ms-server-encrypted: - 'true' x-ms-version: @@ -276,9 +272,9 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:44:26 GMT + - Wed, 27 Jul 2022 20:17:57 GMT x-ms-range: - bytes=0-33554431 x-ms-version: @@ -288,7 +284,7 @@ interactions: response: body: string: !!binary | - AAAAAAAAAAAAAAAAW2J2rFtcFtqqVlupjRM31Nnm9+MMBtAv+7qwcRu4LwXN+QEpziU= + AAAAAAAAAAAAAAAAFKq0cPTvYBJyn6KwKTj3aAKeuax3dvGuYzRqfyAtd4VHLBn7V0g= headers: accept-ranges: - bytes @@ -299,31 +295,155 @@ interactions: content-type: - application/octet-stream date: - - Tue, 14 Jun 2022 23:44:26 GMT + - Wed, 27 Jul 2022 20:17:59 GMT etag: - - '"0x8DA4E5FD0EA5C9D"' + - '"0x8DA700D1A4EA511"' last-modified: - - Tue, 14 Jun 2022 23:44:26 GMT + - Wed, 27 Jul 2022 20:18:00 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin x-ms-blob-content-md5: - - YZfxJkVMzfXlPmCSHBZA9g== + - mxlo1QAe63EUWKpj3rriaw== x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Tue, 14 Jun 2022 23:44:25 GMT + - Wed, 27 Jul 2022 20:18:00 GMT x-ms-lease-state: - available x-ms-lease-status: - unlocked x-ms-meta-encryptiondata: - - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "IGlxCOiHiVs2vlTqyPxEVbmMVvMqU4WkRYGZ6HayAfkPwy5R9q/FHtsaZjwHL8eC", + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "FTzYr8MQLMf82Hdopu1V6zEn1m+dHmuPXr8IwGxdBJq5SOp9oKbEjWqYiDIQoNqg", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "1.0", "EncryptionAlgorithm": "AES_CBC_256"}, "EncryptedRegionInfo": {"DataLength": 4194304, "NonceLength": - 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.13.0b1"}, "EncryptionMode": - "FullBlob", "ContentEncryptionIV": "r+gUP647YdHfxxqLf+BBfQ=="}' + 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": + "FullBlob", "ContentEncryptionIV": "LR1U+a7TPMgU0hTX1lUOpg=="}' + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2021-08-06' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) + x-ms-date: + - Wed, 27 Jul 2022 20:17:58 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2021-08-06' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainer7369162f/encryptionv2_blob7369162f + response: + body: + string: !!binary | + AAAAAAAAAAAAAAAAFKq0cPTvYBJyn6KwKTj3aAKeuax3dvGuYzRqfyAtd4VHLBn7V0g= + headers: + accept-ranges: + - bytes + content-length: + - '50' + content-range: + - bytes 0-49/50 + content-type: + - application/octet-stream + date: + - Wed, 27 Jul 2022 20:18:00 GMT + etag: + - '"0x8DA700D1A4EA511"' + last-modified: + - Wed, 27 Jul 2022 20:18:00 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-content-md5: + - mxlo1QAe63EUWKpj3rriaw== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Wed, 27 Jul 2022 20:18:00 GMT + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-meta-encryptiondata: + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "FTzYr8MQLMf82Hdopu1V6zEn1m+dHmuPXr8IwGxdBJq5SOp9oKbEjWqYiDIQoNqg", + "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "1.0", "EncryptionAlgorithm": + "AES_CBC_256"}, "EncryptedRegionInfo": {"DataLength": 4194304, "NonceLength": + 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": + "FullBlob", "ContentEncryptionIV": "LR1U+a7TPMgU0hTX1lUOpg=="}' + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2021-08-06' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) + x-ms-date: + - Wed, 27 Jul 2022 20:17:59 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2021-08-06' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainer7369162f/encryptionv2_blob7369162f + response: + body: + string: !!binary | + AAAAAAAAAAAAAAAAFKq0cPTvYBJyn6KwKTj3aAKeuax3dvGuYzRqfyAtd4VHLBn7V0g= + headers: + accept-ranges: + - bytes + content-length: + - '50' + content-range: + - bytes 0-49/50 + content-type: + - application/octet-stream + date: + - Wed, 27 Jul 2022 20:18:01 GMT + etag: + - '"0x8DA700D1A4EA511"' + last-modified: + - Wed, 27 Jul 2022 20:18:00 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-content-md5: + - mxlo1QAe63EUWKpj3rriaw== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Wed, 27 Jul 2022 20:18:00 GMT + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-meta-encryptiondata: + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "FTzYr8MQLMf82Hdopu1V6zEn1m+dHmuPXr8IwGxdBJq5SOp9oKbEjWqYiDIQoNqg", + "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "1.0", "EncryptionAlgorithm": + "AES_CBC_256"}, "EncryptedRegionInfo": {"DataLength": 4194304, "NonceLength": + 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": + "FullBlob", "ContentEncryptionIV": "LR1U+a7TPMgU0hTX1lUOpg=="}' x-ms-server-encrypted: - 'true' x-ms-version: diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_v2_async.test_decryption_on_non_encrypted_blob.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_v2_async.test_decryption_on_non_encrypted_blob.yaml index 926b7376b792..af6c94386185 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_v2_async.test_decryption_on_non_encrypted_blob.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_v2_async.test_decryption_on_non_encrypted_blob.yaml @@ -5,9 +5,9 @@ interactions: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:46:06 GMT + - Wed, 27 Jul 2022 20:17:19 GMT x-ms-version: - '2021-08-06' method: PUT @@ -17,15 +17,15 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 14 Jun 2022 23:46:06 GMT - etag: '"0x8DA4E600D3346D0"' - last-modified: Tue, 14 Jun 2022 23:46:07 GMT + date: Wed, 27 Jul 2022 20:17:22 GMT + etag: '"0x8DA700D03CC43FE"' + last-modified: Wed, 27 Jul 2022 20:17:22 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: '2021-08-06' status: code: 201 message: Created - url: https://jalauzoncanary.blob.core.windows.net/utcontainera7ee1b8c?restype=container + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainera7ee1b8c?restype=container - request: body: Hello World Not Encrypted! headers: @@ -36,11 +36,11 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-blob-type: - BlockBlob x-ms-date: - - Tue, 14 Jun 2022 23:46:07 GMT + - Wed, 27 Jul 2022 20:17:19 GMT x-ms-version: - '2021-08-06' method: PUT @@ -51,9 +51,9 @@ interactions: headers: content-length: '0' content-md5: o87WgihooSvxgQmgMUvigg== - date: Tue, 14 Jun 2022 23:46:06 GMT - etag: '"0x8DA4E600D3D0769"' - last-modified: Tue, 14 Jun 2022 23:46:07 GMT + date: Wed, 27 Jul 2022 20:17:22 GMT + etag: '"0x8DA700D03CF5117"' + last-modified: Wed, 27 Jul 2022 20:17:22 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: Uo3ZNCShFc8= x-ms-request-server-encrypted: 'true' @@ -61,16 +61,16 @@ interactions: status: code: 201 message: Created - url: https://jalauzoncanary.blob.core.windows.net/utcontainera7ee1b8c/encryptionv2_bloba7ee1b8c + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainera7ee1b8c/encryptionv2_bloba7ee1b8c - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:46:07 GMT + - Wed, 27 Jul 2022 20:17:19 GMT x-ms-version: - '2021-08-06' method: HEAD @@ -83,15 +83,14 @@ interactions: content-length: '26' content-md5: o87WgihooSvxgQmgMUvigg== content-type: application/octet-stream - date: Tue, 14 Jun 2022 23:46:07 GMT - etag: '"0x8DA4E600D3D0769"' - last-modified: Tue, 14 Jun 2022 23:46:07 GMT + date: Wed, 27 Jul 2022 20:17:22 GMT + etag: '"0x8DA700D03CF5117"' + last-modified: Wed, 27 Jul 2022 20:17:22 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: Origin x-ms-access-tier: Hot x-ms-access-tier-inferred: 'true' x-ms-blob-type: BlockBlob - x-ms-creation-time: Tue, 14 Jun 2022 23:46:07 GMT + x-ms-creation-time: Wed, 27 Jul 2022 20:17:22 GMT x-ms-lease-state: available x-ms-lease-status: unlocked x-ms-server-encrypted: 'true' @@ -99,16 +98,16 @@ interactions: status: code: 200 message: OK - url: https://jalauzoncanary.blob.core.windows.net/utcontainera7ee1b8c/encryptionv2_bloba7ee1b8c + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainera7ee1b8c/encryptionv2_bloba7ee1b8c - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:46:07 GMT + - Wed, 27 Jul 2022 20:17:19 GMT x-ms-range: - bytes=0-33554431 x-ms-version: @@ -123,14 +122,13 @@ interactions: content-length: '26' content-range: bytes 0-25/26 content-type: application/octet-stream - date: Tue, 14 Jun 2022 23:46:07 GMT - etag: '"0x8DA4E600D3D0769"' - last-modified: Tue, 14 Jun 2022 23:46:07 GMT + date: Wed, 27 Jul 2022 20:17:22 GMT + etag: '"0x8DA700D03CF5117"' + last-modified: Wed, 27 Jul 2022 20:17:22 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: Origin x-ms-blob-content-md5: o87WgihooSvxgQmgMUvigg== x-ms-blob-type: BlockBlob - x-ms-creation-time: Tue, 14 Jun 2022 23:46:07 GMT + x-ms-creation-time: Wed, 27 Jul 2022 20:17:22 GMT x-ms-lease-state: available x-ms-lease-status: unlocked x-ms-server-encrypted: 'true' @@ -138,16 +136,16 @@ interactions: status: code: 206 message: Partial Content - url: https://jalauzoncanary.blob.core.windows.net/utcontainera7ee1b8c/encryptionv2_bloba7ee1b8c + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainera7ee1b8c/encryptionv2_bloba7ee1b8c - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:46:07 GMT + - Wed, 27 Jul 2022 20:17:19 GMT x-ms-version: - '2021-08-06' method: HEAD @@ -160,15 +158,14 @@ interactions: content-length: '26' content-md5: o87WgihooSvxgQmgMUvigg== content-type: application/octet-stream - date: Tue, 14 Jun 2022 23:46:07 GMT - etag: '"0x8DA4E600D3D0769"' - last-modified: Tue, 14 Jun 2022 23:46:07 GMT + date: Wed, 27 Jul 2022 20:17:22 GMT + etag: '"0x8DA700D03CF5117"' + last-modified: Wed, 27 Jul 2022 20:17:22 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: Origin x-ms-access-tier: Hot x-ms-access-tier-inferred: 'true' x-ms-blob-type: BlockBlob - x-ms-creation-time: Tue, 14 Jun 2022 23:46:07 GMT + x-ms-creation-time: Wed, 27 Jul 2022 20:17:22 GMT x-ms-lease-state: available x-ms-lease-status: unlocked x-ms-server-encrypted: 'true' @@ -176,16 +173,16 @@ interactions: status: code: 200 message: OK - url: https://jalauzoncanary.blob.core.windows.net/utcontainera7ee1b8c/encryptionv2_bloba7ee1b8c + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainera7ee1b8c/encryptionv2_bloba7ee1b8c - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:46:07 GMT + - Wed, 27 Jul 2022 20:17:19 GMT x-ms-range: - bytes=0-33554431 x-ms-version: @@ -200,14 +197,13 @@ interactions: content-length: '26' content-range: bytes 0-25/26 content-type: application/octet-stream - date: Tue, 14 Jun 2022 23:46:07 GMT - etag: '"0x8DA4E600D3D0769"' - last-modified: Tue, 14 Jun 2022 23:46:07 GMT + date: Wed, 27 Jul 2022 20:17:22 GMT + etag: '"0x8DA700D03CF5117"' + last-modified: Wed, 27 Jul 2022 20:17:22 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: Origin x-ms-blob-content-md5: o87WgihooSvxgQmgMUvigg== x-ms-blob-type: BlockBlob - x-ms-creation-time: Tue, 14 Jun 2022 23:46:07 GMT + x-ms-creation-time: Wed, 27 Jul 2022 20:17:22 GMT x-ms-lease-state: available x-ms-lease-status: unlocked x-ms-server-encrypted: 'true' @@ -215,5 +211,5 @@ interactions: status: code: 206 message: Partial Content - url: https://jalauzoncanary.blob.core.windows.net/utcontainera7ee1b8c/encryptionv2_bloba7ee1b8c + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainera7ee1b8c/encryptionv2_bloba7ee1b8c version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_v2_async.test_encryption_modify_cek.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_v2_async.test_encryption_modify_cek.yaml index d7be4de0bc4d..421dcb1f0e54 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_v2_async.test_encryption_modify_cek.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_v2_async.test_encryption_modify_cek.yaml @@ -5,9 +5,9 @@ interactions: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:46:08 GMT + - Wed, 27 Jul 2022 20:17:39 GMT x-ms-version: - '2021-08-06' method: PUT @@ -17,18 +17,18 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 14 Jun 2022 23:46:08 GMT - etag: '"0x8DA4E600E152391"' - last-modified: Tue, 14 Jun 2022 23:46:08 GMT + date: Wed, 27 Jul 2022 20:17:42 GMT + etag: '"0x8DA700D0FDFCC67"' + last-modified: Wed, 27 Jul 2022 20:17:42 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: '2021-08-06' status: code: 201 message: Created - url: https://jalauzoncanary.blob.core.windows.net/utcontainer8fcf16fe?restype=container + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainer8fcf16fe?restype=container - request: body: !!binary | - AAAAAAAAAAAAAAAAoHVaE2Ztos+TLlCWtfqLrz/f12aDR/91Kh+rQa81nZNgV2kg/OM= + AAAAAAAAAAAAAAAAscKD1CkffB7ZhkqLqnw+sl9bhavADJ54hwzkmE152yc+qSwYj8U= headers: Accept: - application/xml @@ -37,16 +37,16 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-blob-type: - BlockBlob x-ms-date: - - Tue, 14 Jun 2022 23:46:08 GMT + - Wed, 27 Jul 2022 20:17:39 GMT x-ms-meta-encryptiondata: - - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "4oN9Gsq8JYDcaTju8uF9QyZFtJ2e5SNchz5mtxcA6VBankYaKmMiQIzsigt6+3IF", + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "ObVT9UgKZP7Ypura4vrIybwJNmnVP+NsgOkQO8/a9a6sL0jEHBbaFfnVhUFP2+lj", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "2.0", "EncryptionAlgorithm": "AES_GCM_256"}, "EncryptedRegionInfo": {"DataLength": 4194304, "NonceLength": - 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.13.0b1"}, "EncryptionMode": + 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' x-ms-version: - '2021-08-06' @@ -57,27 +57,27 @@ interactions: string: '' headers: content-length: '0' - content-md5: 7LPl9MYKTdW/Zdxrks1ffg== - date: Tue, 14 Jun 2022 23:46:08 GMT - etag: '"0x8DA4E600E1E6CC1"' - last-modified: Tue, 14 Jun 2022 23:46:08 GMT + content-md5: T63Q6aYOClZmuWRvo2djlQ== + date: Wed, 27 Jul 2022 20:17:42 GMT + etag: '"0x8DA700D0FE2F4C6"' + last-modified: Wed, 27 Jul 2022 20:17:42 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-content-crc64: afmFYqgmbDo= + x-ms-content-crc64: GN9+KY0aPF0= x-ms-request-server-encrypted: 'true' x-ms-version: '2021-08-06' status: code: 201 message: Created - url: https://jalauzoncanary.blob.core.windows.net/utcontainer8fcf16fe/encryptionv2_blob8fcf16fe + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainer8fcf16fe/encryptionv2_blob8fcf16fe - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:46:08 GMT + - Wed, 27 Jul 2022 20:17:39 GMT x-ms-version: - '2021-08-06' method: HEAD @@ -88,44 +88,43 @@ interactions: headers: accept-ranges: bytes content-length: '50' - content-md5: 7LPl9MYKTdW/Zdxrks1ffg== + content-md5: T63Q6aYOClZmuWRvo2djlQ== content-type: application/octet-stream - date: Tue, 14 Jun 2022 23:46:08 GMT - etag: '"0x8DA4E600E1E6CC1"' - last-modified: Tue, 14 Jun 2022 23:46:08 GMT + date: Wed, 27 Jul 2022 20:17:42 GMT + etag: '"0x8DA700D0FE2F4C6"' + last-modified: Wed, 27 Jul 2022 20:17:42 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: Origin x-ms-access-tier: Hot x-ms-access-tier-inferred: 'true' x-ms-blob-type: BlockBlob - x-ms-creation-time: Tue, 14 Jun 2022 23:46:08 GMT + x-ms-creation-time: Wed, 27 Jul 2022 20:17:42 GMT x-ms-lease-state: available x-ms-lease-status: unlocked x-ms-meta-encryptiondata: '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": - "4oN9Gsq8JYDcaTju8uF9QyZFtJ2e5SNchz5mtxcA6VBankYaKmMiQIzsigt6+3IF", "Algorithm": + "ObVT9UgKZP7Ypura4vrIybwJNmnVP+NsgOkQO8/a9a6sL0jEHBbaFfnVhUFP2+lj", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "2.0", "EncryptionAlgorithm": "AES_GCM_256"}, "EncryptedRegionInfo": {"DataLength": 4194304, "NonceLength": 12}, "KeyWrappingMetadata": - {"EncryptionLibrary": "Python 12.13.0b1"}, "EncryptionMode": "FullBlob"}' + {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' x-ms-server-encrypted: 'true' x-ms-version: '2021-08-06' status: code: 200 message: OK - url: https://jalauzoncanary.blob.core.windows.net/utcontainer8fcf16fe/encryptionv2_blob8fcf16fe + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainer8fcf16fe/encryptionv2_blob8fcf16fe - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:46:08 GMT + - Wed, 27 Jul 2022 20:17:39 GMT x-ms-meta-encryptiondata: - - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "baI3WBfS5gNB89Ix1jbCF2P1v0mkboxUlDSHLda1IoTvqBZW8ed8mQ==", + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "cXhZ37iAGsWeErt9OdKfeVp8WnoUqsLIkxucZ+T57TwiGpzW9vivNA==", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "2.0", "EncryptionAlgorithm": "AES_GCM_256"}, "EncryptedRegionInfo": {"DataLength": 4194304, "NonceLength": - 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.13.0b1"}, "EncryptionMode": + 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' x-ms-version: - '2021-08-06' @@ -136,25 +135,25 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 14 Jun 2022 23:46:08 GMT - etag: '"0x8DA4E600E2F5A3A"' - last-modified: Tue, 14 Jun 2022 23:46:08 GMT + date: Wed, 27 Jul 2022 20:17:42 GMT + etag: '"0x8DA700D0FE7AF0C"' + last-modified: Wed, 27 Jul 2022 20:17:43 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-request-server-encrypted: 'true' x-ms-version: '2021-08-06' status: code: 200 message: OK - url: https://jalauzoncanary.blob.core.windows.net/utcontainer8fcf16fe/encryptionv2_blob8fcf16fe?comp=metadata + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainer8fcf16fe/encryptionv2_blob8fcf16fe?comp=metadata - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:46:08 GMT + - Wed, 27 Jul 2022 20:17:39 GMT x-ms-version: - '2021-08-06' method: HEAD @@ -165,39 +164,38 @@ interactions: headers: accept-ranges: bytes content-length: '50' - content-md5: 7LPl9MYKTdW/Zdxrks1ffg== + content-md5: T63Q6aYOClZmuWRvo2djlQ== content-type: application/octet-stream - date: Tue, 14 Jun 2022 23:46:08 GMT - etag: '"0x8DA4E600E2F5A3A"' - last-modified: Tue, 14 Jun 2022 23:46:08 GMT + date: Wed, 27 Jul 2022 20:17:42 GMT + etag: '"0x8DA700D0FE7AF0C"' + last-modified: Wed, 27 Jul 2022 20:17:43 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: Origin x-ms-access-tier: Hot x-ms-access-tier-inferred: 'true' x-ms-blob-type: BlockBlob - x-ms-creation-time: Tue, 14 Jun 2022 23:46:08 GMT + x-ms-creation-time: Wed, 27 Jul 2022 20:17:42 GMT x-ms-lease-state: available x-ms-lease-status: unlocked x-ms-meta-encryptiondata: '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": - "baI3WBfS5gNB89Ix1jbCF2P1v0mkboxUlDSHLda1IoTvqBZW8ed8mQ==", "Algorithm": "A256KW"}, + "cXhZ37iAGsWeErt9OdKfeVp8WnoUqsLIkxucZ+T57TwiGpzW9vivNA==", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "2.0", "EncryptionAlgorithm": "AES_GCM_256"}, "EncryptedRegionInfo": {"DataLength": 4194304, "NonceLength": 12}, "KeyWrappingMetadata": - {"EncryptionLibrary": "Python 12.13.0b1"}, "EncryptionMode": "FullBlob"}' + {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' x-ms-server-encrypted: 'true' x-ms-version: '2021-08-06' status: code: 200 message: OK - url: https://jalauzoncanary.blob.core.windows.net/utcontainer8fcf16fe/encryptionv2_blob8fcf16fe + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainer8fcf16fe/encryptionv2_blob8fcf16fe - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:46:08 GMT + - Wed, 27 Jul 2022 20:17:39 GMT x-ms-range: - bytes=0-33554655 x-ms-version: @@ -207,31 +205,30 @@ interactions: response: body: string: !!binary | - AAAAAAAAAAAAAAAAoHVaE2Ztos+TLlCWtfqLrz/f12aDR/91Kh+rQa81nZNgV2kg/OM= + AAAAAAAAAAAAAAAAscKD1CkffB7ZhkqLqnw+sl9bhavADJ54hwzkmE152yc+qSwYj8U= headers: accept-ranges: bytes content-length: '50' content-range: bytes 0-49/50 content-type: application/octet-stream - date: Tue, 14 Jun 2022 23:46:08 GMT - etag: '"0x8DA4E600E2F5A3A"' - last-modified: Tue, 14 Jun 2022 23:46:08 GMT + date: Wed, 27 Jul 2022 20:17:42 GMT + etag: '"0x8DA700D0FE7AF0C"' + last-modified: Wed, 27 Jul 2022 20:17:43 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: Origin - x-ms-blob-content-md5: 7LPl9MYKTdW/Zdxrks1ffg== + x-ms-blob-content-md5: T63Q6aYOClZmuWRvo2djlQ== x-ms-blob-type: BlockBlob - x-ms-creation-time: Tue, 14 Jun 2022 23:46:08 GMT + x-ms-creation-time: Wed, 27 Jul 2022 20:17:42 GMT x-ms-lease-state: available x-ms-lease-status: unlocked x-ms-meta-encryptiondata: '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": - "baI3WBfS5gNB89Ix1jbCF2P1v0mkboxUlDSHLda1IoTvqBZW8ed8mQ==", "Algorithm": "A256KW"}, + "cXhZ37iAGsWeErt9OdKfeVp8WnoUqsLIkxucZ+T57TwiGpzW9vivNA==", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "2.0", "EncryptionAlgorithm": "AES_GCM_256"}, "EncryptedRegionInfo": {"DataLength": 4194304, "NonceLength": 12}, "KeyWrappingMetadata": - {"EncryptionLibrary": "Python 12.13.0b1"}, "EncryptionMode": "FullBlob"}' + {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' x-ms-server-encrypted: 'true' x-ms-version: '2021-08-06' status: code: 206 message: Partial Content - url: https://jalauzoncanary.blob.core.windows.net/utcontainer8fcf16fe/encryptionv2_blob8fcf16fe + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainer8fcf16fe/encryptionv2_blob8fcf16fe version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_v2_async.test_encryption_v2_v1_downgrade.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_v2_async.test_encryption_v2_v1_downgrade.yaml index a1eba5641f99..a16c2e3aba14 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_v2_async.test_encryption_v2_v1_downgrade.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_encryption_v2_async.test_encryption_v2_v1_downgrade.yaml @@ -5,9 +5,9 @@ interactions: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:46:09 GMT + - Wed, 27 Jul 2022 20:17:59 GMT x-ms-version: - '2021-08-06' method: PUT @@ -17,18 +17,18 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 14 Jun 2022 23:46:08 GMT - etag: '"0x8DA4E600E7CFEAB"' - last-modified: Tue, 14 Jun 2022 23:46:09 GMT + date: Wed, 27 Jul 2022 20:18:02 GMT + etag: '"0x8DA700D1B95A02A"' + last-modified: Wed, 27 Jul 2022 20:18:02 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: '2021-08-06' status: code: 201 message: Created - url: https://jalauzoncanary.blob.core.windows.net/utcontainer44d18ac?restype=container + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainer44d18ac?restype=container - request: body: !!binary | - AAAAAAAAAAAAAAAAK4U773h1ze8JgR0UWNMBD+rM2An7ri9gDQg5n8feHmxd9wNiFgA= + AAAAAAAAAAAAAAAApHcfT/eOzSPxVrx3MZQZckKDPtB9XchR9PIJMj94KIbfQ9143aI= headers: Accept: - application/xml @@ -37,16 +37,16 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-blob-type: - BlockBlob x-ms-date: - - Tue, 14 Jun 2022 23:46:09 GMT + - Wed, 27 Jul 2022 20:17:59 GMT x-ms-meta-encryptiondata: - - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "OPtkacDFh0R6jBv7GNIBCBda1mhNGEC8s07iahYa2aWR3oaWaE9qvkqwezTvAnQj", + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "oHTB2nGzM+33xi/oPISyG5ggFkqQJIOSJBLs08mzJHOqrkIIlhNTWmjIVlOBIL0P", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "2.0", "EncryptionAlgorithm": "AES_GCM_256"}, "EncryptedRegionInfo": {"DataLength": 4194304, "NonceLength": - 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.13.0b1"}, "EncryptionMode": + 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' x-ms-version: - '2021-08-06' @@ -57,27 +57,27 @@ interactions: string: '' headers: content-length: '0' - content-md5: ihzpbJ6za8fSZOZ4EqFarA== - date: Tue, 14 Jun 2022 23:46:08 GMT - etag: '"0x8DA4E600E86E342"' - last-modified: Tue, 14 Jun 2022 23:46:09 GMT + content-md5: 4BufGQmzYZemJymsGTxbCA== + date: Wed, 27 Jul 2022 20:18:02 GMT + etag: '"0x8DA700D1B9A0730"' + last-modified: Wed, 27 Jul 2022 20:18:02 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-content-crc64: m/5PA9txPAY= + x-ms-content-crc64: it5axY42yqM= x-ms-request-server-encrypted: 'true' x-ms-version: '2021-08-06' status: code: 201 message: Created - url: https://jalauzoncanary.blob.core.windows.net/utcontainer44d18ac/encryptionv2_blob44d18ac + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainer44d18ac/encryptionv2_blob44d18ac - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:46:09 GMT + - Wed, 27 Jul 2022 20:17:59 GMT x-ms-version: - '2021-08-06' method: HEAD @@ -88,45 +88,44 @@ interactions: headers: accept-ranges: bytes content-length: '50' - content-md5: ihzpbJ6za8fSZOZ4EqFarA== + content-md5: 4BufGQmzYZemJymsGTxbCA== content-type: application/octet-stream - date: Tue, 14 Jun 2022 23:46:09 GMT - etag: '"0x8DA4E600E86E342"' - last-modified: Tue, 14 Jun 2022 23:46:09 GMT + date: Wed, 27 Jul 2022 20:18:02 GMT + etag: '"0x8DA700D1B9A0730"' + last-modified: Wed, 27 Jul 2022 20:18:02 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: Origin x-ms-access-tier: Hot x-ms-access-tier-inferred: 'true' x-ms-blob-type: BlockBlob - x-ms-creation-time: Tue, 14 Jun 2022 23:46:09 GMT + x-ms-creation-time: Wed, 27 Jul 2022 20:18:02 GMT x-ms-lease-state: available x-ms-lease-status: unlocked x-ms-meta-encryptiondata: '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": - "OPtkacDFh0R6jBv7GNIBCBda1mhNGEC8s07iahYa2aWR3oaWaE9qvkqwezTvAnQj", "Algorithm": + "oHTB2nGzM+33xi/oPISyG5ggFkqQJIOSJBLs08mzJHOqrkIIlhNTWmjIVlOBIL0P", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "2.0", "EncryptionAlgorithm": "AES_GCM_256"}, "EncryptedRegionInfo": {"DataLength": 4194304, "NonceLength": 12}, "KeyWrappingMetadata": - {"EncryptionLibrary": "Python 12.13.0b1"}, "EncryptionMode": "FullBlob"}' + {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob"}' x-ms-server-encrypted: 'true' x-ms-version: '2021-08-06' status: code: 200 message: OK - url: https://jalauzoncanary.blob.core.windows.net/utcontainer44d18ac/encryptionv2_blob44d18ac + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainer44d18ac/encryptionv2_blob44d18ac - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:46:09 GMT + - Wed, 27 Jul 2022 20:17:59 GMT x-ms-meta-encryptiondata: - - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "OPtkacDFh0R6jBv7GNIBCBda1mhNGEC8s07iahYa2aWR3oaWaE9qvkqwezTvAnQj", + - '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": "oHTB2nGzM+33xi/oPISyG5ggFkqQJIOSJBLs08mzJHOqrkIIlhNTWmjIVlOBIL0P", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "1.0", "EncryptionAlgorithm": "AES_CBC_256"}, "EncryptedRegionInfo": {"DataLength": 4194304, "NonceLength": - 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.13.0b1"}, "EncryptionMode": - "FullBlob", "ContentEncryptionIV": "SGGIgBkoIQAkRNhHp8uoVw=="}' + 12}, "KeyWrappingMetadata": {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": + "FullBlob", "ContentEncryptionIV": "iGYCjchNL3yJAvW2gp8ubQ=="}' x-ms-version: - '2021-08-06' method: PUT @@ -136,25 +135,25 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 14 Jun 2022 23:46:09 GMT - etag: '"0x8DA4E600E997E27"' - last-modified: Tue, 14 Jun 2022 23:46:09 GMT + date: Wed, 27 Jul 2022 20:18:02 GMT + etag: '"0x8DA700D1B9EC171"' + last-modified: Wed, 27 Jul 2022 20:18:02 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-request-server-encrypted: 'true' x-ms-version: '2021-08-06' status: code: 200 message: OK - url: https://jalauzoncanary.blob.core.windows.net/utcontainer44d18ac/encryptionv2_blob44d18ac?comp=metadata + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainer44d18ac/encryptionv2_blob44d18ac?comp=metadata - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:46:09 GMT + - Wed, 27 Jul 2022 20:17:59 GMT x-ms-version: - '2021-08-06' method: HEAD @@ -165,40 +164,39 @@ interactions: headers: accept-ranges: bytes content-length: '50' - content-md5: ihzpbJ6za8fSZOZ4EqFarA== + content-md5: 4BufGQmzYZemJymsGTxbCA== content-type: application/octet-stream - date: Tue, 14 Jun 2022 23:46:09 GMT - etag: '"0x8DA4E600E997E27"' - last-modified: Tue, 14 Jun 2022 23:46:09 GMT + date: Wed, 27 Jul 2022 20:18:02 GMT + etag: '"0x8DA700D1B9EC171"' + last-modified: Wed, 27 Jul 2022 20:18:02 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: Origin x-ms-access-tier: Hot x-ms-access-tier-inferred: 'true' x-ms-blob-type: BlockBlob - x-ms-creation-time: Tue, 14 Jun 2022 23:46:09 GMT + x-ms-creation-time: Wed, 27 Jul 2022 20:18:02 GMT x-ms-lease-state: available x-ms-lease-status: unlocked x-ms-meta-encryptiondata: '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": - "OPtkacDFh0R6jBv7GNIBCBda1mhNGEC8s07iahYa2aWR3oaWaE9qvkqwezTvAnQj", "Algorithm": + "oHTB2nGzM+33xi/oPISyG5ggFkqQJIOSJBLs08mzJHOqrkIIlhNTWmjIVlOBIL0P", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "1.0", "EncryptionAlgorithm": "AES_CBC_256"}, "EncryptedRegionInfo": {"DataLength": 4194304, "NonceLength": 12}, "KeyWrappingMetadata": - {"EncryptionLibrary": "Python 12.13.0b1"}, "EncryptionMode": "FullBlob", "ContentEncryptionIV": - "SGGIgBkoIQAkRNhHp8uoVw=="}' + {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob", "ContentEncryptionIV": + "iGYCjchNL3yJAvW2gp8ubQ=="}' x-ms-server-encrypted: 'true' x-ms-version: '2021-08-06' status: code: 200 message: OK - url: https://jalauzoncanary.blob.core.windows.net/utcontainer44d18ac/encryptionv2_blob44d18ac + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainer44d18ac/encryptionv2_blob44d18ac - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.13.0b1 Python/3.10.4 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-blob/12.14.0b1 Python/3.7.13 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid) x-ms-date: - - Tue, 14 Jun 2022 23:46:09 GMT + - Wed, 27 Jul 2022 20:17:59 GMT x-ms-range: - bytes=0-33554431 x-ms-version: @@ -208,32 +206,31 @@ interactions: response: body: string: !!binary | - AAAAAAAAAAAAAAAAK4U773h1ze8JgR0UWNMBD+rM2An7ri9gDQg5n8feHmxd9wNiFgA= + AAAAAAAAAAAAAAAApHcfT/eOzSPxVrx3MZQZckKDPtB9XchR9PIJMj94KIbfQ9143aI= headers: accept-ranges: bytes content-length: '50' content-range: bytes 0-49/50 content-type: application/octet-stream - date: Tue, 14 Jun 2022 23:46:09 GMT - etag: '"0x8DA4E600E997E27"' - last-modified: Tue, 14 Jun 2022 23:46:09 GMT + date: Wed, 27 Jul 2022 20:18:02 GMT + etag: '"0x8DA700D1B9EC171"' + last-modified: Wed, 27 Jul 2022 20:18:02 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: Origin - x-ms-blob-content-md5: ihzpbJ6za8fSZOZ4EqFarA== + x-ms-blob-content-md5: 4BufGQmzYZemJymsGTxbCA== x-ms-blob-type: BlockBlob - x-ms-creation-time: Tue, 14 Jun 2022 23:46:09 GMT + x-ms-creation-time: Wed, 27 Jul 2022 20:18:02 GMT x-ms-lease-state: available x-ms-lease-status: unlocked x-ms-meta-encryptiondata: '{"WrappedContentKey": {"KeyId": "key1", "EncryptedKey": - "OPtkacDFh0R6jBv7GNIBCBda1mhNGEC8s07iahYa2aWR3oaWaE9qvkqwezTvAnQj", "Algorithm": + "oHTB2nGzM+33xi/oPISyG5ggFkqQJIOSJBLs08mzJHOqrkIIlhNTWmjIVlOBIL0P", "Algorithm": "A256KW"}, "EncryptionAgent": {"Protocol": "1.0", "EncryptionAlgorithm": "AES_CBC_256"}, "EncryptedRegionInfo": {"DataLength": 4194304, "NonceLength": 12}, "KeyWrappingMetadata": - {"EncryptionLibrary": "Python 12.13.0b1"}, "EncryptionMode": "FullBlob", "ContentEncryptionIV": - "SGGIgBkoIQAkRNhHp8uoVw=="}' + {"EncryptionLibrary": "Python 12.14.0b1"}, "EncryptionMode": "FullBlob", "ContentEncryptionIV": + "iGYCjchNL3yJAvW2gp8ubQ=="}' x-ms-server-encrypted: 'true' x-ms-version: '2021-08-06' status: code: 206 message: Partial Content - url: https://jalauzoncanary.blob.core.windows.net/utcontainer44d18ac/encryptionv2_blob44d18ac + url: https://tsjinxuansdktestaccount.blob.core.windows.net/utcontainer44d18ac/encryptionv2_blob44d18ac version: 1 From 6bb4574c480f969e4b7647c678c8a2055b672fde Mon Sep 17 00:00:00 2001 From: Steven Jin Date: Wed, 27 Jul 2022 13:44:40 -0700 Subject: [PATCH 16/18] stricter retry tests --- .../azure-storage-blob/tests/test_retry.py | 36 ++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob/tests/test_retry.py b/sdk/storage/azure-storage-blob/tests/test_retry.py index 2d9fceeb837f..267dc0cb31ae 100644 --- a/sdk/storage/azure-storage-blob/tests/test_retry.py +++ b/sdk/storage/azure-storage-blob/tests/test_retry.py @@ -4,6 +4,7 @@ # license information. # -------------------------------------------------------------------------- from unittest import mock +from functools import wraps import pytest from azure.core.exceptions import ( @@ -438,6 +439,37 @@ def test_invalid_account_key(self, storage_account_name, storage_account_key): # No retry should be performed since the signing error is fatal self.assertEqual(retry_counter.count, 0) + @staticmethod + def count_wrapper(counter, func): + """Wrapper to count how many times a function is called. + :param List[int] counter: + A singleton list. Will usually be `[0]`. + :param callable func: + The function to wrap. + :return Callable: + The wrapped function. + + Example: + ```python + class MyClass: + def hello(self): + pass + + obj = MyClass() + counter = [0] + obj.hello() + obj.hello = count_wrapper(counter, obj.hello) + obj.hello() + obj.hello() + print(counter[0]) # 2 + ``` + """ + @wraps(func) + def inner(*args, **kwargs): + counter[0] += 1 + return func(*args, **kwargs) + return inner + @BlobPreparer() def test_streaming_retry(self, storage_account_name, storage_account_key): """Test that retry mechanisms are working when streaming data.""" @@ -458,7 +490,9 @@ def test_streaming_retry(self, storage_account_name, storage_account_key): iter_content_mock.return_value = iterator_mock with mock.patch.object(Response, "iter_content", iter_content_mock), pytest.raises(HttpResponseError): blob = container.get_blob_client(blob=blob_name) + count = [0] + blob._pipeline._transport.send = self.count_wrapper(count, blob._pipeline._transport.send) blob.download_blob() - assert iterator_mock.__next__.call_count == 3 + assert iterator_mock.__next__.call_count == count[0] == 3 # ------------------------------------------------------------------------------ From 35514f0d6adb7fd1a58ce164ab76c3e3b5200a20 Mon Sep 17 00:00:00 2001 From: Steven Jin Date: Wed, 27 Jul 2022 14:44:22 -0700 Subject: [PATCH 17/18] unused import --- sdk/storage/azure-storage-blob/azure/storage/blob/_download.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_download.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_download.py index 26f75f67b1b9..f6737c7359ae 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_download.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_download.py @@ -11,7 +11,7 @@ from io import BytesIO from typing import Generic, Iterator, TypeVar -from azure.core.exceptions import DecodeError, HttpResponseError, ServiceResponseError, IncompleteReadError +from azure.core.exceptions import DecodeError, HttpResponseError, IncompleteReadError from azure.core.tracing.common import with_current_context from ._shared.request_handlers import validate_and_format_range_headers From 5c0be43a569603865a9dae7ba48ee7c351b73ce6 Mon Sep 17 00:00:00 2001 From: Steven Jin Date: Thu, 28 Jul 2022 14:30:59 -0700 Subject: [PATCH 18/18] changelog --- sdk/storage/azure-storage-blob/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob/CHANGELOG.md b/sdk/storage/azure-storage-blob/CHANGELOG.md index 01db06299db5..12bb213a0a59 100644 --- a/sdk/storage/azure-storage-blob/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob/CHANGELOG.md @@ -5,7 +5,7 @@ ### Features Added ### Bugs Fixed -- Removed forced `requests` import for sync calls. (25017) +- Updated exception catching of `StorageStreamDownloader`'s retry mechanism. - Adjusted type hints for `upload_blob` and `StorageStreamDownloader.readall`. ## 12.13.0 (2022-07-07)