From cabd9c30dc78e3664525ad49a9f6109c34e952f4 Mon Sep 17 00:00:00 2001 From: Sean McCullough <44180881+seanmcc-msft@users.noreply.github.com> Date: Tue, 6 Oct 2020 12:27:01 -0500 Subject: [PATCH] Fixed bug where BlobContainer.SetAccessPolicy() and DataLakeFileClient.SetAccessPolicy() were not putting permissions in the correct order (#15727) --- sdk/storage/Azure.Storage.Blobs/CHANGELOG.md | 2 +- .../src/BlobContainerClient.cs | 18 +- .../src/Sas/BlobSasBuilder.cs | 17 +- .../tests/ContainerClientTests.cs | 41 ++++ ...essPolicyAsync_InvalidPermissionOrder.json | 180 ++++++++++++++++++ ...licyAsync_InvalidPermissionOrderAsync.json | 180 ++++++++++++++++++ .../src/Shared/Constants.cs | 15 ++ .../Azure.Storage.Files.DataLake/CHANGELOG.md | 2 +- .../tests/FileSystemClientTests.cs | 41 ++++ ...essPolicyAsync_InvalidPermissionOrder.json | 180 ++++++++++++++++++ ...licyAsync_InvalidPermissionOrderAsync.json | 180 ++++++++++++++++++ 11 files changed, 837 insertions(+), 19 deletions(-) create mode 100644 sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/ContainerClientTests/SetAccessPolicyAsync_InvalidPermissionOrder.json create mode 100644 sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/ContainerClientTests/SetAccessPolicyAsync_InvalidPermissionOrderAsync.json create mode 100644 sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/FileSystemClientTests/SetAccessPolicyAsync_InvalidPermissionOrder.json create mode 100644 sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/FileSystemClientTests/SetAccessPolicyAsync_InvalidPermissionOrderAsync.json diff --git a/sdk/storage/Azure.Storage.Blobs/CHANGELOG.md b/sdk/storage/Azure.Storage.Blobs/CHANGELOG.md index 5d5579ab414ce..3f389ed1e8859 100644 --- a/sdk/storage/Azure.Storage.Blobs/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.Blobs/CHANGELOG.md @@ -1,7 +1,7 @@ # Release History ## 12.7.0-preview.2 (Unreleased) - +- Fixed bug where BobContainerClient.SetAccessPolicy() would throw an exception if signed identifier permissions were not in the correct order. ## 12.7.0-preview.1 (2020-09-30) - Added support for service version 2020-02-10. diff --git a/sdk/storage/Azure.Storage.Blobs/src/BlobContainerClient.cs b/sdk/storage/Azure.Storage.Blobs/src/BlobContainerClient.cs index 497d6d7d576f6..2288b9bf9dab4 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/BlobContainerClient.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/BlobContainerClient.cs @@ -12,6 +12,7 @@ using Azure.Storage.Blobs.Models; using Azure.Storage.Blobs.Specialized; using Azure.Storage.Cryptography; +using Azure.Storage.Sas; using Metadata = System.Collections.Generic.IDictionary; namespace Azure.Storage.Blobs @@ -2139,12 +2140,27 @@ private async Task> SetAccessPolicyInternal( throw BlobErrors.BlobConditionsMustBeDefault(nameof(RequestConditions.IfMatch), nameof(RequestConditions.IfNoneMatch)); } + List sanitizedPermissions = null; + if (permissions != null) + { + sanitizedPermissions = new List(); + + foreach (BlobSignedIdentifier signedIdentifier in permissions) + { + signedIdentifier.AccessPolicy.Permissions = SasExtensions.ValidateAndSanitizeRawPermissions( + signedIdentifier.AccessPolicy.Permissions, + Constants.Sas.ValidPermissionsInOrder); + + sanitizedPermissions.Add(signedIdentifier); + } + } + return await BlobRestClient.Container.SetAccessPolicyAsync( ClientDiagnostics, Pipeline, Uri, version: Version.ToVersionString(), - permissions: permissions, + permissions: sanitizedPermissions, leaseId: conditions?.LeaseId, access: accessType, ifModifiedSince: conditions?.IfModifiedSince, diff --git a/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobSasBuilder.cs b/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobSasBuilder.cs index 72910798aca14..d52b8ad1aaf2a 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobSasBuilder.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/Sas/BlobSasBuilder.cs @@ -222,7 +222,7 @@ public void SetPermissions( { rawPermissions = SasExtensions.ValidateAndSanitizeRawPermissions( permissions: rawPermissions, - validPermissionsInOrder: s_validPermissionsInOrder); + validPermissionsInOrder: Constants.Sas.ValidPermissionsInOrder); } SetPermissions(rawPermissions); @@ -237,21 +237,6 @@ public void SetPermissions(string rawPermissions) Permissions = rawPermissions; } - private static readonly List s_validPermissionsInOrder = new List - { - Constants.Sas.Permissions.Read, - Constants.Sas.Permissions.Add, - Constants.Sas.Permissions.Create, - Constants.Sas.Permissions.Write, - Constants.Sas.Permissions.Delete, - Constants.Sas.Permissions.DeleteBlobVersion, - Constants.Sas.Permissions.List, - Constants.Sas.Permissions.Tag, - Constants.Sas.Permissions.Update, - Constants.Sas.Permissions.Process, - Constants.Sas.Permissions.FilterByTags, - }; - /// /// Use an account's to sign this /// shared access signature values to produce the proper SAS query diff --git a/sdk/storage/Azure.Storage.Blobs/tests/ContainerClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/ContainerClientTests.cs index e3935b11ffa3b..a87a0579c2a9b 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/ContainerClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/ContainerClientTests.cs @@ -1210,6 +1210,47 @@ await TestHelper.AssertExpectedExceptionAsync( } } + [Test] + public async Task SetAccessPolicyAsync_InvalidPermissionOrder() + { + await using DisposingContainer test = await GetTestContainerAsync(); + + // Arrange + PublicAccessType publicAccessType = PublicAccessType.BlobContainer; + BlobSignedIdentifier[] signedIdentifiers = new[] + { + new BlobSignedIdentifier + { + Id = GetNewString(), + AccessPolicy = new BlobAccessPolicy() + { + PolicyStartsOn = Recording.UtcNow.AddHours(-1), + PolicyExpiresOn = Recording.UtcNow.AddHours(1), + Permissions = "wrld" + } + } + }; + + // Act + await test.Container.SetAccessPolicyAsync( + accessType: publicAccessType, + permissions: signedIdentifiers + ); + + // Assert + Response propertiesResponse = await test.Container.GetPropertiesAsync(); + Assert.AreEqual(publicAccessType, propertiesResponse.Value.PublicAccess); + + Response response = await test.Container.GetAccessPolicyAsync(); + Assert.AreEqual(1, response.Value.SignedIdentifiers.Count()); + + BlobSignedIdentifier acl = response.Value.SignedIdentifiers.First(); + Assert.AreEqual(signedIdentifiers[0].Id, acl.Id); + Assert.AreEqual(signedIdentifiers[0].AccessPolicy.PolicyStartsOn, acl.AccessPolicy.PolicyStartsOn); + Assert.AreEqual(signedIdentifiers[0].AccessPolicy.PolicyExpiresOn, acl.AccessPolicy.PolicyExpiresOn); + Assert.AreEqual(signedIdentifiers[0].AccessPolicy.Permissions, acl.AccessPolicy.Permissions); + } + [Test] public async Task AcquireLeaseAsync() { diff --git a/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/ContainerClientTests/SetAccessPolicyAsync_InvalidPermissionOrder.json b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/ContainerClientTests/SetAccessPolicyAsync_InvalidPermissionOrder.json new file mode 100644 index 0000000000000..625c0170129ea --- /dev/null +++ b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/ContainerClientTests/SetAccessPolicyAsync_InvalidPermissionOrder.json @@ -0,0 +1,180 @@ +{ + "Entries": [ + { + "RequestUri": "https://seanmcccanary3.blob.core.windows.net/test-container-913621bf-305e-32dd-2df0-a7bbbd990116?restype=container", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-4f0a5dd36077a34999a435767a375c49-cffd312b42deec47-00", + "User-Agent": [ + "azsdk-net-Storage.Blobs/12.7.0-alpha.20201006.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-blob-public-access": "container", + "x-ms-client-request-id": "1cbd7ab2-100c-f41f-59b5-1c421ce2e1c5", + "x-ms-date": "Tue, 06 Oct 2020 16:50:38 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Tue, 06 Oct 2020 16:50:39 GMT", + "ETag": "\u00220x8D86A17F50AE333\u0022", + "Last-Modified": "Tue, 06 Oct 2020 16:50:40 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "1cbd7ab2-100c-f41f-59b5-1c421ce2e1c5", + "x-ms-request-id": "04d7eae2-c01e-002b-0200-9c5a0e000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seanmcccanary3.blob.core.windows.net/test-container-913621bf-305e-32dd-2df0-a7bbbd990116?restype=container\u0026comp=acl", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "Content-Length": "251", + "Content-Type": "application/xml", + "traceparent": "00-78ac2d6215446647a5c0403b6df8152f-b9d3d55d00296240-00", + "User-Agent": [ + "azsdk-net-Storage.Blobs/12.7.0-alpha.20201006.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-blob-public-access": "container", + "x-ms-client-request-id": "d398350b-1399-1d1e-5e4c-1342ada7eafb", + "x-ms-date": "Tue, 06 Oct 2020 16:50:38 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": "\u003CSignedIdentifiers\u003E\u003CSignedIdentifier\u003E\u003CId\u003Eaeseiwujhbyvviruytud\u003C/Id\u003E\u003CAccessPolicy\u003E\u003CStart\u003E2020-10-06T15:50:38.8893642Z\u003C/Start\u003E\u003CExpiry\u003E2020-10-06T17:50:38.8893642Z\u003C/Expiry\u003E\u003CPermission\u003Erwdl\u003C/Permission\u003E\u003C/AccessPolicy\u003E\u003C/SignedIdentifier\u003E\u003C/SignedIdentifiers\u003E", + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Tue, 06 Oct 2020 16:50:39 GMT", + "ETag": "\u00220x8D86A17F51582FC\u0022", + "Last-Modified": "Tue, 06 Oct 2020 16:50:40 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "d398350b-1399-1d1e-5e4c-1342ada7eafb", + "x-ms-request-id": "04d7eaf5-c01e-002b-1000-9c5a0e000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seanmcccanary3.blob.core.windows.net/test-container-913621bf-305e-32dd-2df0-a7bbbd990116?restype=container", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-eef56fb777165c4db825e2bfd63c8686-eaea7c7238a7c943-00", + "User-Agent": [ + "azsdk-net-Storage.Blobs/12.7.0-alpha.20201006.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "2269ab2d-3588-c8a9-c6ed-ad458746d251", + "x-ms-date": "Tue, 06 Oct 2020 16:50:38 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Tue, 06 Oct 2020 16:50:39 GMT", + "ETag": "\u00220x8D86A17F51582FC\u0022", + "Last-Modified": "Tue, 06 Oct 2020 16:50:40 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-blob-public-access": "container", + "x-ms-client-request-id": "2269ab2d-3588-c8a9-c6ed-ad458746d251", + "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-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "04d7eb02-c01e-002b-1900-9c5a0e000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seanmcccanary3.blob.core.windows.net/test-container-913621bf-305e-32dd-2df0-a7bbbd990116?restype=container\u0026comp=acl", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-5e3989458a4547489cd40a1330d7a49b-b78f49702117f241-00", + "User-Agent": [ + "azsdk-net-Storage.Blobs/12.7.0-alpha.20201006.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "0114bd23-c83e-a473-f520-31d6f28acb0f", + "x-ms-date": "Tue, 06 Oct 2020 16:50:39 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/xml", + "Date": "Tue, 06 Oct 2020 16:50:39 GMT", + "ETag": "\u00220x8D86A17F51582FC\u0022", + "Last-Modified": "Tue, 06 Oct 2020 16:50:40 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "x-ms-blob-public-access": "container", + "x-ms-client-request-id": "0114bd23-c83e-a473-f520-31d6f28acb0f", + "x-ms-request-id": "04d7eb11-c01e-002b-2600-9c5a0e000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CSignedIdentifiers\u003E\u003CSignedIdentifier\u003E\u003CId\u003Eaeseiwujhbyvviruytud\u003C/Id\u003E\u003CAccessPolicy\u003E\u003CStart\u003E2020-10-06T15:50:38.8893642Z\u003C/Start\u003E\u003CExpiry\u003E2020-10-06T17:50:38.8893642Z\u003C/Expiry\u003E\u003CPermission\u003Erwdl\u003C/Permission\u003E\u003C/AccessPolicy\u003E\u003C/SignedIdentifier\u003E\u003C/SignedIdentifiers\u003E" + }, + { + "RequestUri": "https://seanmcccanary3.blob.core.windows.net/test-container-913621bf-305e-32dd-2df0-a7bbbd990116?restype=container", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-20d3dae5e21bd84d97c44c8065582781-945311eab52b394d-00", + "User-Agent": [ + "azsdk-net-Storage.Blobs/12.7.0-alpha.20201006.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "c9210494-d031-2e13-bb7f-1580c1c278db", + "x-ms-date": "Tue, 06 Oct 2020 16:50:39 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Tue, 06 Oct 2020 16:50:39 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "c9210494-d031-2e13-bb7f-1580c1c278db", + "x-ms-request-id": "04d7eb1b-c01e-002b-2d00-9c5a0e000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "DateTimeOffsetNow": "2020-10-06T11:50:38.8893642-05:00", + "RandomSeed": "838746338", + "Storage_TestConfigDefault": "ProductionTenant\nseanmcccanary3\nU2FuaXRpemVk\nhttps://seanmcccanary3.blob.core.windows.net\nhttps://seanmcccanary3.file.core.windows.net\nhttps://seanmcccanary3.queue.core.windows.net\nhttps://seanmcccanary3.table.core.windows.net\n\n\n\n\nhttps://seanmcccanary3-secondary.blob.core.windows.net\nhttps://seanmcccanary3-secondary.file.core.windows.net\nhttps://seanmcccanary3-secondary.queue.core.windows.net\nhttps://seanmcccanary3-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://seanmcccanary3.blob.core.windows.net/;QueueEndpoint=https://seanmcccanary3.queue.core.windows.net/;FileEndpoint=https://seanmcccanary3.file.core.windows.net/;BlobSecondaryEndpoint=https://seanmcccanary3-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://seanmcccanary3-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://seanmcccanary3-secondary.file.core.windows.net/;AccountName=seanmcccanary3;AccountKey=Kg==;\nseanscope1" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/ContainerClientTests/SetAccessPolicyAsync_InvalidPermissionOrderAsync.json b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/ContainerClientTests/SetAccessPolicyAsync_InvalidPermissionOrderAsync.json new file mode 100644 index 0000000000000..637fe5bcb6f9b --- /dev/null +++ b/sdk/storage/Azure.Storage.Blobs/tests/SessionRecords/ContainerClientTests/SetAccessPolicyAsync_InvalidPermissionOrderAsync.json @@ -0,0 +1,180 @@ +{ + "Entries": [ + { + "RequestUri": "https://seanmcccanary3.blob.core.windows.net/test-container-eaff68e7-5226-b6ea-af9e-44d8f259b936?restype=container", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-c0e03bb95f5a3140a83d5888afae6606-aea250df8ffc1641-00", + "User-Agent": [ + "azsdk-net-Storage.Blobs/12.7.0-alpha.20201006.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-blob-public-access": "container", + "x-ms-client-request-id": "1cbd9d3f-2e30-bcd1-954b-f08ee25e13d9", + "x-ms-date": "Tue, 06 Oct 2020 16:50:39 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Tue, 06 Oct 2020 16:50:40 GMT", + "ETag": "\u00220x8D86A17F5543464\u0022", + "Last-Modified": "Tue, 06 Oct 2020 16:50:40 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "1cbd9d3f-2e30-bcd1-954b-f08ee25e13d9", + "x-ms-request-id": "6b37072e-c01e-0076-5d00-9c508a000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seanmcccanary3.blob.core.windows.net/test-container-eaff68e7-5226-b6ea-af9e-44d8f259b936?restype=container\u0026comp=acl", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "Content-Length": "251", + "Content-Type": "application/xml", + "traceparent": "00-9abe748605475641bd5a09ff15c39d2c-d63f7d87fa3da94d-00", + "User-Agent": [ + "azsdk-net-Storage.Blobs/12.7.0-alpha.20201006.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-blob-public-access": "container", + "x-ms-client-request-id": "ce8d40ad-f7cc-60b5-813c-acc647d19fa2", + "x-ms-date": "Tue, 06 Oct 2020 16:50:39 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": "\u003CSignedIdentifiers\u003E\u003CSignedIdentifier\u003E\u003CId\u003Eyrtkfxujtnlhetopwsww\u003C/Id\u003E\u003CAccessPolicy\u003E\u003CStart\u003E2020-10-06T15:50:39.3658223Z\u003C/Start\u003E\u003CExpiry\u003E2020-10-06T17:50:39.3658223Z\u003C/Expiry\u003E\u003CPermission\u003Erwdl\u003C/Permission\u003E\u003C/AccessPolicy\u003E\u003C/SignedIdentifier\u003E\u003C/SignedIdentifiers\u003E", + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Tue, 06 Oct 2020 16:50:40 GMT", + "ETag": "\u00220x8D86A17F55CAB46\u0022", + "Last-Modified": "Tue, 06 Oct 2020 16:50:40 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "ce8d40ad-f7cc-60b5-813c-acc647d19fa2", + "x-ms-request-id": "6b370737-c01e-0076-6300-9c508a000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seanmcccanary3.blob.core.windows.net/test-container-eaff68e7-5226-b6ea-af9e-44d8f259b936?restype=container", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-7974b10a8b6a2047a03227737ceca3c1-75e1d6698f5f8c42-00", + "User-Agent": [ + "azsdk-net-Storage.Blobs/12.7.0-alpha.20201006.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "ae717a05-cab2-a588-e7a5-6f97adfcfb5e", + "x-ms-date": "Tue, 06 Oct 2020 16:50:39 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Tue, 06 Oct 2020 16:50:40 GMT", + "ETag": "\u00220x8D86A17F55CAB46\u0022", + "Last-Modified": "Tue, 06 Oct 2020 16:50:40 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-blob-public-access": "container", + "x-ms-client-request-id": "ae717a05-cab2-a588-e7a5-6f97adfcfb5e", + "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-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "6b37074b-c01e-0076-7300-9c508a000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seanmcccanary3.blob.core.windows.net/test-container-eaff68e7-5226-b6ea-af9e-44d8f259b936?restype=container\u0026comp=acl", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-955a89c3cc3bba47a4ff0ebb054dd51e-16cef19c8a605540-00", + "User-Agent": [ + "azsdk-net-Storage.Blobs/12.7.0-alpha.20201006.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "ccc00424-f160-fbef-3698-cd7c84036fb2", + "x-ms-date": "Tue, 06 Oct 2020 16:50:39 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/xml", + "Date": "Tue, 06 Oct 2020 16:50:40 GMT", + "ETag": "\u00220x8D86A17F55CAB46\u0022", + "Last-Modified": "Tue, 06 Oct 2020 16:50:40 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "x-ms-blob-public-access": "container", + "x-ms-client-request-id": "ccc00424-f160-fbef-3698-cd7c84036fb2", + "x-ms-request-id": "6b37074f-c01e-0076-7700-9c508a000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CSignedIdentifiers\u003E\u003CSignedIdentifier\u003E\u003CId\u003Eyrtkfxujtnlhetopwsww\u003C/Id\u003E\u003CAccessPolicy\u003E\u003CStart\u003E2020-10-06T15:50:39.3658223Z\u003C/Start\u003E\u003CExpiry\u003E2020-10-06T17:50:39.3658223Z\u003C/Expiry\u003E\u003CPermission\u003Erwdl\u003C/Permission\u003E\u003C/AccessPolicy\u003E\u003C/SignedIdentifier\u003E\u003C/SignedIdentifiers\u003E" + }, + { + "RequestUri": "https://seanmcccanary3.blob.core.windows.net/test-container-eaff68e7-5226-b6ea-af9e-44d8f259b936?restype=container", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-42508528a01de7418880df939df4eb20-942265a00abd3e48-00", + "User-Agent": [ + "azsdk-net-Storage.Blobs/12.7.0-alpha.20201006.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "a873bcc9-2e3b-e2fe-ba1c-879246ea35a2", + "x-ms-date": "Tue, 06 Oct 2020 16:50:39 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Tue, 06 Oct 2020 16:50:40 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "a873bcc9-2e3b-e2fe-ba1c-879246ea35a2", + "x-ms-request-id": "6b370750-c01e-0076-7800-9c508a000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "DateTimeOffsetNow": "2020-10-06T11:50:39.3658223-05:00", + "RandomSeed": "655413397", + "Storage_TestConfigDefault": "ProductionTenant\nseanmcccanary3\nU2FuaXRpemVk\nhttps://seanmcccanary3.blob.core.windows.net\nhttps://seanmcccanary3.file.core.windows.net\nhttps://seanmcccanary3.queue.core.windows.net\nhttps://seanmcccanary3.table.core.windows.net\n\n\n\n\nhttps://seanmcccanary3-secondary.blob.core.windows.net\nhttps://seanmcccanary3-secondary.file.core.windows.net\nhttps://seanmcccanary3-secondary.queue.core.windows.net\nhttps://seanmcccanary3-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://seanmcccanary3.blob.core.windows.net/;QueueEndpoint=https://seanmcccanary3.queue.core.windows.net/;FileEndpoint=https://seanmcccanary3.file.core.windows.net/;BlobSecondaryEndpoint=https://seanmcccanary3-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://seanmcccanary3-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://seanmcccanary3-secondary.file.core.windows.net/;AccountName=seanmcccanary3;AccountKey=Kg==;\nseanscope1" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Common/src/Shared/Constants.cs b/sdk/storage/Azure.Storage.Common/src/Shared/Constants.cs index 8d9693cce4296..1f571c5994f1d 100644 --- a/sdk/storage/Azure.Storage.Common/src/Shared/Constants.cs +++ b/sdk/storage/Azure.Storage.Common/src/Shared/Constants.cs @@ -508,6 +508,21 @@ internal static class AccountResources public const char Container = 'c'; public const char Object = 'o'; } + + public static readonly List ValidPermissionsInOrder = new List + { + Sas.Permissions.Read, + Sas.Permissions.Add, + Sas.Permissions.Create, + Sas.Permissions.Write, + Sas.Permissions.Delete, + Sas.Permissions.DeleteBlobVersion, + Sas.Permissions.List, + Sas.Permissions.Tag, + Sas.Permissions.Update, + Sas.Permissions.Process, + Sas.Permissions.FilterByTags, + }; } internal static class ClientSideEncryption diff --git a/sdk/storage/Azure.Storage.Files.DataLake/CHANGELOG.md b/sdk/storage/Azure.Storage.Files.DataLake/CHANGELOG.md index 9ba9051d9f774..ae50ff1e1107a 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.Files.DataLake/CHANGELOG.md @@ -1,7 +1,7 @@ # Release History ## 12.5.0-preview.2 (Unreleased) - +- Fixed bug where DataLakeFileSystem.SetAccessPolicy() would throw an exception if signed identifier permissions were not in the correct order. ## 12.5.0-preview.1 (2020-09-30) - Added support for service version 2020-02-10. diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/FileSystemClientTests.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/FileSystemClientTests.cs index a7f1b627741e1..c60a937800be5 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/FileSystemClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/FileSystemClientTests.cs @@ -1807,6 +1807,47 @@ await TestHelper.AssertExpectedExceptionAsync( } } + [Test] + public async Task SetAccessPolicyAsync_InvalidPermissionOrder() + { + await using DisposingFileSystem test = await GetNewFileSystem(); + + // Arrange + PublicAccessType publicAccessType = PublicAccessType.FileSystem; + DataLakeSignedIdentifier[] signedIdentifiers = new[] + { + new DataLakeSignedIdentifier + { + Id = GetNewString(), + AccessPolicy = new DataLakeAccessPolicy() + { + PolicyStartsOn = Recording.UtcNow.AddHours(-1), + PolicyExpiresOn = Recording.UtcNow.AddHours(1), + Permissions = "wrld" + } + } + }; + + // Act + await test.FileSystem.SetAccessPolicyAsync( + accessType: publicAccessType, + permissions: signedIdentifiers + ); + + // Assert + Response propertiesResponse = await test.FileSystem.GetPropertiesAsync(); + Assert.AreEqual(publicAccessType, propertiesResponse.Value.PublicAccess); + + Response response = await test.FileSystem.GetAccessPolicyAsync(); + Assert.AreEqual(1, response.Value.SignedIdentifiers.Count()); + + DataLakeSignedIdentifier acl = response.Value.SignedIdentifiers.First(); + Assert.AreEqual(signedIdentifiers[0].Id, acl.Id); + Assert.AreEqual(signedIdentifiers[0].AccessPolicy.PolicyStartsOn, acl.AccessPolicy.PolicyStartsOn); + Assert.AreEqual(signedIdentifiers[0].AccessPolicy.PolicyExpiresOn, acl.AccessPolicy.PolicyExpiresOn); + Assert.AreEqual("rwdl", acl.AccessPolicy.Permissions); + } + [Test] public void DataLakeAccessPolicyNullStartsOnExpiresOnTest() { diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/FileSystemClientTests/SetAccessPolicyAsync_InvalidPermissionOrder.json b/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/FileSystemClientTests/SetAccessPolicyAsync_InvalidPermissionOrder.json new file mode 100644 index 0000000000000..b9c1307db39f0 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/FileSystemClientTests/SetAccessPolicyAsync_InvalidPermissionOrder.json @@ -0,0 +1,180 @@ +{ + "Entries": [ + { + "RequestUri": "https://seannsecanary.blob.core.windows.net/test-filesystem-2f7fee54-9bbc-fe16-a97e-6cac9664290c?restype=container", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-95926f274a41694fa1bd5e43f9981b28-1be84b6e88bbf14e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201006.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-blob-public-access": "container", + "x-ms-client-request-id": "509c980d-4b9a-9c31-50e6-4708caf19d3b", + "x-ms-date": "Tue, 06 Oct 2020 16:53:45 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Tue, 06 Oct 2020 16:53:47 GMT", + "ETag": "\u00220x8D86A1864B8D5D1\u0022", + "Last-Modified": "Tue, 06 Oct 2020 16:53:47 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "509c980d-4b9a-9c31-50e6-4708caf19d3b", + "x-ms-request-id": "7eb05a88-501e-000b-3301-9cb6cb000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.blob.core.windows.net/test-filesystem-2f7fee54-9bbc-fe16-a97e-6cac9664290c?restype=container\u0026comp=acl", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "Content-Length": "251", + "Content-Type": "application/xml", + "traceparent": "00-1125af364eaa104794df42bfa9947153-0545459bb49e404e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201006.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-blob-public-access": "container", + "x-ms-client-request-id": "ca53aa24-357d-6dbe-ac8c-30a5cd93a73b", + "x-ms-date": "Tue, 06 Oct 2020 16:53:46 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": "\u003CSignedIdentifiers\u003E\u003CSignedIdentifier\u003E\u003CId\u003Ehdwrjhiuqthviklwrvtx\u003C/Id\u003E\u003CAccessPolicy\u003E\u003CStart\u003E2020-10-06T15:53:46.2756768Z\u003C/Start\u003E\u003CExpiry\u003E2020-10-06T17:53:46.2756768Z\u003C/Expiry\u003E\u003CPermission\u003Erwdl\u003C/Permission\u003E\u003C/AccessPolicy\u003E\u003C/SignedIdentifier\u003E\u003C/SignedIdentifiers\u003E", + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Tue, 06 Oct 2020 16:53:47 GMT", + "ETag": "\u00220x8D86A1864C85262\u0022", + "Last-Modified": "Tue, 06 Oct 2020 16:53:47 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "ca53aa24-357d-6dbe-ac8c-30a5cd93a73b", + "x-ms-request-id": "7eb05a97-501e-000b-3e01-9cb6cb000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.blob.core.windows.net/test-filesystem-2f7fee54-9bbc-fe16-a97e-6cac9664290c?restype=container", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-5df44214614c524095456cfc9f688d5e-221c7c78e45ffb41-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201006.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "b68f8c1a-d43b-9280-1903-f59099220011", + "x-ms-date": "Tue, 06 Oct 2020 16:53:46 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Tue, 06 Oct 2020 16:53:47 GMT", + "ETag": "\u00220x8D86A1864C85262\u0022", + "Last-Modified": "Tue, 06 Oct 2020 16:53:47 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-blob-public-access": "container", + "x-ms-client-request-id": "b68f8c1a-d43b-9280-1903-f59099220011", + "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-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "7eb05aa4-501e-000b-4701-9cb6cb000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.blob.core.windows.net/test-filesystem-2f7fee54-9bbc-fe16-a97e-6cac9664290c?restype=container\u0026comp=acl", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-dfedd4ab3222ea49926123d690770a43-e569ab9bf6324d47-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201006.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "418aba61-f104-7c00-1fe0-eae43ac62658", + "x-ms-date": "Tue, 06 Oct 2020 16:53:46 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/xml", + "Date": "Tue, 06 Oct 2020 16:53:47 GMT", + "ETag": "\u00220x8D86A1864C85262\u0022", + "Last-Modified": "Tue, 06 Oct 2020 16:53:47 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "x-ms-blob-public-access": "container", + "x-ms-client-request-id": "418aba61-f104-7c00-1fe0-eae43ac62658", + "x-ms-request-id": "7eb05aad-501e-000b-5001-9cb6cb000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CSignedIdentifiers\u003E\u003CSignedIdentifier\u003E\u003CId\u003Ehdwrjhiuqthviklwrvtx\u003C/Id\u003E\u003CAccessPolicy\u003E\u003CStart\u003E2020-10-06T15:53:46.2756768Z\u003C/Start\u003E\u003CExpiry\u003E2020-10-06T17:53:46.2756768Z\u003C/Expiry\u003E\u003CPermission\u003Erwdl\u003C/Permission\u003E\u003C/AccessPolicy\u003E\u003C/SignedIdentifier\u003E\u003C/SignedIdentifiers\u003E" + }, + { + "RequestUri": "https://seannsecanary.blob.core.windows.net/test-filesystem-2f7fee54-9bbc-fe16-a97e-6cac9664290c?restype=container", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-ac9ce0922aad684e92e4292e2c1c8e36-213077bfdefa494e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201006.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "df2e493a-be97-bb0d-4dd0-b9a0a1bfba8c", + "x-ms-date": "Tue, 06 Oct 2020 16:53:46 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Tue, 06 Oct 2020 16:53:47 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "df2e493a-be97-bb0d-4dd0-b9a0a1bfba8c", + "x-ms-request-id": "7eb05abd-501e-000b-6001-9cb6cb000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "DateTimeOffsetNow": "2020-10-06T11:53:46.2756768-05:00", + "RandomSeed": "1728247453", + "Storage_TestConfigHierarchicalNamespace": "NamespaceTenant\nseannsecanary\nU2FuaXRpemVk\nhttps://seannsecanary.blob.core.windows.net\nhttps://seannsecanary.file.core.windows.net\nhttps://seannsecanary.queue.core.windows.net\nhttps://seannsecanary.table.core.windows.net\n\n\n\n\nhttps://seannsecanary-secondary.blob.core.windows.net\nhttps://seannsecanary-secondary.file.core.windows.net\nhttps://seannsecanary-secondary.queue.core.windows.net\nhttps://seannsecanary-secondary.table.core.windows.net\n68390a19-a643-458b-b726-408abf67b4fc\nSanitized\n72f988bf-86f1-41af-91ab-2d7cd011db47\nhttps://login.microsoftonline.com/\nCloud\nBlobEndpoint=https://seannsecanary.blob.core.windows.net/;QueueEndpoint=https://seannsecanary.queue.core.windows.net/;FileEndpoint=https://seannsecanary.file.core.windows.net/;BlobSecondaryEndpoint=https://seannsecanary-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://seannsecanary-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://seannsecanary-secondary.file.core.windows.net/;AccountName=seannsecanary;AccountKey=Sanitized\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/FileSystemClientTests/SetAccessPolicyAsync_InvalidPermissionOrderAsync.json b/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/FileSystemClientTests/SetAccessPolicyAsync_InvalidPermissionOrderAsync.json new file mode 100644 index 0000000000000..25d08e90c887d --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/SessionRecords/FileSystemClientTests/SetAccessPolicyAsync_InvalidPermissionOrderAsync.json @@ -0,0 +1,180 @@ +{ + "Entries": [ + { + "RequestUri": "https://seannsecanary.blob.core.windows.net/test-filesystem-35f3f18b-2e09-d6f7-0285-f8ebcdbf2f2f?restype=container", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-ef518e096245ae43825fbd0e016c74e0-a3d9d4fce9ddc24c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201006.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-blob-public-access": "container", + "x-ms-client-request-id": "0962bc6b-eac7-7938-3e4a-74b70e122fd0", + "x-ms-date": "Tue, 06 Oct 2020 16:53:46 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Tue, 06 Oct 2020 16:53:47 GMT", + "ETag": "\u00220x8D86A1865261AFC\u0022", + "Last-Modified": "Tue, 06 Oct 2020 16:53:48 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "0962bc6b-eac7-7938-3e4a-74b70e122fd0", + "x-ms-request-id": "bcdd395d-401e-004a-6601-9cee2f000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.blob.core.windows.net/test-filesystem-35f3f18b-2e09-d6f7-0285-f8ebcdbf2f2f?restype=container\u0026comp=acl", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "Content-Length": "251", + "Content-Type": "application/xml", + "traceparent": "00-4a71190b8a588e4aa2ee15a11fbf3cd8-9afacf735c60c04f-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201006.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-blob-public-access": "container", + "x-ms-client-request-id": "7fbaba98-b058-6e62-5fb9-1fb18c04de2a", + "x-ms-date": "Tue, 06 Oct 2020 16:53:47 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": "\u003CSignedIdentifiers\u003E\u003CSignedIdentifier\u003E\u003CId\u003Edehoyxqvcfkxfvbjqtjd\u003C/Id\u003E\u003CAccessPolicy\u003E\u003CStart\u003E2020-10-06T15:53:47.1069549Z\u003C/Start\u003E\u003CExpiry\u003E2020-10-06T17:53:47.1069549Z\u003C/Expiry\u003E\u003CPermission\u003Erwdl\u003C/Permission\u003E\u003C/AccessPolicy\u003E\u003C/SignedIdentifier\u003E\u003C/SignedIdentifiers\u003E", + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Tue, 06 Oct 2020 16:53:47 GMT", + "ETag": "\u00220x8D86A1865464BB4\u0022", + "Last-Modified": "Tue, 06 Oct 2020 16:53:48 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "7fbaba98-b058-6e62-5fb9-1fb18c04de2a", + "x-ms-request-id": "bcdd396d-401e-004a-7001-9cee2f000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.blob.core.windows.net/test-filesystem-35f3f18b-2e09-d6f7-0285-f8ebcdbf2f2f?restype=container", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-2a3483aaa601a347b009556ac97a2869-766f0936e4ff2c44-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201006.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "1dd8526d-ff2a-acb7-c4f9-6785e6eee961", + "x-ms-date": "Tue, 06 Oct 2020 16:53:47 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Tue, 06 Oct 2020 16:53:47 GMT", + "ETag": "\u00220x8D86A1865464BB4\u0022", + "Last-Modified": "Tue, 06 Oct 2020 16:53:48 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-blob-public-access": "container", + "x-ms-client-request-id": "1dd8526d-ff2a-acb7-c4f9-6785e6eee961", + "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-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "bcdd3970-401e-004a-7301-9cee2f000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://seannsecanary.blob.core.windows.net/test-filesystem-35f3f18b-2e09-d6f7-0285-f8ebcdbf2f2f?restype=container\u0026comp=acl", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-49a83d169ae9664dba63f8526f218746-e65cb9563cd8e546-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201006.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "3943c995-c02b-93ff-67c7-614ccb2c6d5d", + "x-ms-date": "Tue, 06 Oct 2020 16:53:47 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/xml", + "Date": "Tue, 06 Oct 2020 16:53:47 GMT", + "ETag": "\u00220x8D86A1865464BB4\u0022", + "Last-Modified": "Tue, 06 Oct 2020 16:53:48 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "Transfer-Encoding": "chunked", + "x-ms-blob-public-access": "container", + "x-ms-client-request-id": "3943c995-c02b-93ff-67c7-614ccb2c6d5d", + "x-ms-request-id": "bcdd3972-401e-004a-7501-9cee2f000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CSignedIdentifiers\u003E\u003CSignedIdentifier\u003E\u003CId\u003Edehoyxqvcfkxfvbjqtjd\u003C/Id\u003E\u003CAccessPolicy\u003E\u003CStart\u003E2020-10-06T15:53:47.1069549Z\u003C/Start\u003E\u003CExpiry\u003E2020-10-06T17:53:47.1069549Z\u003C/Expiry\u003E\u003CPermission\u003Erwdl\u003C/Permission\u003E\u003C/AccessPolicy\u003E\u003C/SignedIdentifier\u003E\u003C/SignedIdentifiers\u003E" + }, + { + "RequestUri": "https://seannsecanary.blob.core.windows.net/test-filesystem-35f3f18b-2e09-d6f7-0285-f8ebcdbf2f2f?restype=container", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-39ebe9cb8331f543a1c0fa447ace7054-25165e5fff85964c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.DataLake/12.5.0-alpha.20201006.1", + "(.NET Core 4.6.29220.03; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "1cf0fc58-afab-f435-6270-d3c897d998dc", + "x-ms-date": "Tue, 06 Oct 2020 16:53:47 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2020-02-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Content-Length": "0", + "Date": "Tue, 06 Oct 2020 16:53:47 GMT", + "Server": [ + "Windows-Azure-Blob/1.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-client-request-id": "1cf0fc58-afab-f435-6270-d3c897d998dc", + "x-ms-request-id": "bcdd3979-401e-004a-7901-9cee2f000000", + "x-ms-version": "2020-02-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "DateTimeOffsetNow": "2020-10-06T11:53:47.1069549-05:00", + "RandomSeed": "207016707", + "Storage_TestConfigHierarchicalNamespace": "NamespaceTenant\nseannsecanary\nU2FuaXRpemVk\nhttps://seannsecanary.blob.core.windows.net\nhttps://seannsecanary.file.core.windows.net\nhttps://seannsecanary.queue.core.windows.net\nhttps://seannsecanary.table.core.windows.net\n\n\n\n\nhttps://seannsecanary-secondary.blob.core.windows.net\nhttps://seannsecanary-secondary.file.core.windows.net\nhttps://seannsecanary-secondary.queue.core.windows.net\nhttps://seannsecanary-secondary.table.core.windows.net\n68390a19-a643-458b-b726-408abf67b4fc\nSanitized\n72f988bf-86f1-41af-91ab-2d7cd011db47\nhttps://login.microsoftonline.com/\nCloud\nBlobEndpoint=https://seannsecanary.blob.core.windows.net/;QueueEndpoint=https://seannsecanary.queue.core.windows.net/;FileEndpoint=https://seannsecanary.file.core.windows.net/;BlobSecondaryEndpoint=https://seannsecanary-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://seannsecanary-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://seannsecanary-secondary.file.core.windows.net/;AccountName=seannsecanary;AccountKey=Sanitized\n" + } +} \ No newline at end of file