diff --git a/sdk/storage/azure-storage-blob/CHANGELOG.md b/sdk/storage/azure-storage-blob/CHANGELOG.md index b546067cd9b1..12bb213a0a59 100644 --- a/sdk/storage/azure-storage-blob/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob/CHANGELOG.md @@ -5,6 +5,7 @@ ### Features Added ### Bugs Fixed +- Updated exception catching of `StorageStreamDownloader`'s retry mechanism. - Adjusted type hints for `upload_blob` and `StorageStreamDownloader.readall`. ## 12.13.0 (2022-07-07) 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 896bf598c4a2..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,8 +11,7 @@ from io import BytesIO from typing import Generic, Iterator, TypeVar -import requests -from azure.core.exceptions import HttpResponseError, ServiceResponseError +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 @@ -213,10 +212,10 @@ 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 (requests.exceptions.ChunkedEncodingError, requests.exceptions.ConnectionError) as error: + 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 @@ -474,10 +473,10 @@ def _initial_request(self): self._encryption_options ) retry_active = False - except (requests.exceptions.ChunkedEncodingError, requests.exceptions.ConnectionError) as error: + 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/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 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..476a38cec3aa --- /dev/null +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_retry.test_streaming_retry.yaml @@ -0,0 +1,644 @@ +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: + - Wed, 27 Jul 2022 20:01:25 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: + - Wed, 27 Jul 2022 20:01:27 GMT + etag: + - '"0x8DA700ACAF9DF12"' + last-modified: + - Wed, 27 Jul 2022 20:01:28 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: + - Wed, 27 Jul 2022 20:01:25 GMT + x-ms-version: + - '2021-08-06' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainercf7c0d02?restype=container + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Wed, 27 Jul 2022 20:01:27 GMT + etag: + - '"0x8DA700ACAF9DF12"' + last-modified: + - Wed, 27 Jul 2022 20:01:28 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: + - Wed, 27 Jul 2022 20:01:25 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: + - Wed, 27 Jul 2022 20:01:27 GMT + etag: + - '"0x8DA700ACB03C6C7"' + last-modified: + - Wed, 27 Jul 2022 20:01:28 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: + - Wed, 27 Jul 2022 20:01:25 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 + content-length: + - '5' + content-range: + - bytes 0-4/5 + content-type: + - application/octet-stream + date: + - Wed, 27 Jul 2022 20:01:27 GMT + etag: + - '"0x8DA700ACB03C6C7"' + last-modified: + - Wed, 27 Jul 2022 20:01:28 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: + - Wed, 27 Jul 2022 20:01:28 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:01:26 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 + content-length: + - '5' + content-range: + - bytes 0-4/5 + content-type: + - application/octet-stream + date: + - Wed, 27 Jul 2022 20:01:29 GMT + etag: + - '"0x8DA700ACB03C6C7"' + last-modified: + - Wed, 27 Jul 2022 20:01:28 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: + - Wed, 27 Jul 2022 20:01:28 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:01:27 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 + content-length: + - '5' + content-range: + - bytes 0-4/5 + content-type: + - application/octet-stream + date: + - Wed, 27 Jul 2022 20:01:30 GMT + etag: + - '"0x8DA700ACB03C6C7"' + last-modified: + - Wed, 27 Jul 2022 20:01:28 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: + - Wed, 27 Jul 2022 20:01:28 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:01:27 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 + content-length: + - '5' + content-range: + - bytes 0-4/5 + content-type: + - application/octet-stream + date: + - Wed, 27 Jul 2022 20:01:29 GMT + etag: + - '"0x8DA700ACB03C6C7"' + last-modified: + - Wed, 27 Jul 2022 20:01:28 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: + - Wed, 27 Jul 2022 20:01:28 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:01:28 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 + content-length: + - '5' + content-range: + - bytes 0-4/5 + content-type: + - application/octet-stream + date: + - Wed, 27 Jul 2022 20:01:31 GMT + etag: + - '"0x8DA700ACB03C6C7"' + last-modified: + - Wed, 27 Jul 2022 20:01:28 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: + - Wed, 27 Jul 2022 20:01:28 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:01:29 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 + content-length: + - '5' + content-range: + - bytes 0-4/5 + content-type: + - application/octet-stream + date: + - Wed, 27 Jul 2022 20:01:32 GMT + etag: + - '"0x8DA700ACB03C6C7"' + last-modified: + - Wed, 27 Jul 2022 20:01:28 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: + - Wed, 27 Jul 2022 20:01:28 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:01:29 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 + content-length: + - '5' + content-range: + - bytes 0-4/5 + content-type: + - application/octet-stream + date: + - Wed, 27 Jul 2022 20:01:32 GMT + etag: + - '"0x8DA700ACB03C6C7"' + last-modified: + - Wed, 27 Jul 2022 20:01:28 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: + - Wed, 27 Jul 2022 20:01:28 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:01: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 + content-length: + - '5' + content-range: + - bytes 0-4/5 + content-type: + - application/octet-stream + date: + - Wed, 27 Jul 2022 20:01:33 GMT + etag: + - '"0x8DA700ACB03C6C7"' + last-modified: + - Wed, 27 Jul 2022 20:01:28 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: + - Wed, 27 Jul 2022 20:01:28 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:01: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 + content-length: + - '5' + content-range: + - bytes 0-4/5 + content-type: + - application/octet-stream + date: + - Wed, 27 Jul 2022 20:01:34 GMT + etag: + - '"0x8DA700ACB03C6C7"' + last-modified: + - Wed, 27 Jul 2022 20:01:28 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: + - Wed, 27 Jul 2022 20:01:28 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 diff --git a/sdk/storage/azure-storage-blob/tests/test_retry.py b/sdk/storage/azure-storage-blob/tests/test_retry.py index 6a15b04dd038..267dc0cb31ae 100644 --- a/sdk/storage/azure-storage-blob/tests/test_retry.py +++ b/sdk/storage/azure-storage-blob/tests/test_retry.py @@ -3,14 +3,16 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -import unittest +from unittest import mock +from functools import wraps import pytest from azure.core.exceptions import ( HttpResponseError, ResourceExistsError, AzureError, - ClientAuthenticationError + ClientAuthenticationError, + ServiceResponseError ) from azure.core.pipeline.transport import( RequestsTransport @@ -24,6 +26,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 +439,60 @@ 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.""" + # 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) + 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(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 == count[0] == 3 + + # ------------------------------------------------------------------------------