From 2c23602aae759d22b347169f2c066c57445b8469 Mon Sep 17 00:00:00 2001 From: Heath Stewart Date: Wed, 2 Mar 2022 12:26:08 -0800 Subject: [PATCH 1/4] Normalize LinkBase for Azure.Core shared files --- ...re.Security.KeyVault.Administration.csproj | 2 +- ...zure.Security.KeyVault.Certificates.csproj | 28 +++++++++---------- .../src/Azure.Security.KeyVault.Keys.csproj | 22 +++++++-------- .../Azure.Security.KeyVault.Secrets.csproj | 25 ++++++++--------- .../Azure.Security.KeyVault.Shared.projitems | 8 +++--- 5 files changed, 41 insertions(+), 44 deletions(-) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Azure.Security.KeyVault.Administration.csproj b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Azure.Security.KeyVault.Administration.csproj index af72540f21ac..76bd797ba83c 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Azure.Security.KeyVault.Administration.csproj +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Azure.Security.KeyVault.Administration.csproj @@ -25,7 +25,7 @@ - + diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/Azure.Security.KeyVault.Certificates.csproj b/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/Azure.Security.KeyVault.Certificates.csproj index 0ddb92e50b91..cde1e3780c53 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/Azure.Security.KeyVault.Certificates.csproj +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/Azure.Security.KeyVault.Certificates.csproj @@ -26,20 +26,20 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/Azure.Security.KeyVault.Keys.csproj b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/Azure.Security.KeyVault.Keys.csproj index 5df131775a88..8ac88b6ba36e 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/Azure.Security.KeyVault.Keys.csproj +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/Azure.Security.KeyVault.Keys.csproj @@ -28,17 +28,17 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/Azure.Security.KeyVault.Secrets.csproj b/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/Azure.Security.KeyVault.Secrets.csproj index e17e5b70ec7b..9ebc665992a2 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/Azure.Security.KeyVault.Secrets.csproj +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/Azure.Security.KeyVault.Secrets.csproj @@ -16,10 +16,6 @@ - - - - @@ -28,16 +24,17 @@ - - - - - - - - - - + + + + + + + + + + + diff --git a/sdk/keyvault/Azure.Security.KeyVault.Shared/src/Azure.Security.KeyVault.Shared.projitems b/sdk/keyvault/Azure.Security.KeyVault.Shared/src/Azure.Security.KeyVault.Shared.projitems index a77390abc6b3..a8d70e383e75 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Shared/src/Azure.Security.KeyVault.Shared.projitems +++ b/sdk/keyvault/Azure.Security.KeyVault.Shared/src/Azure.Security.KeyVault.Shared.projitems @@ -18,8 +18,8 @@ - - - + + + - \ No newline at end of file + From 4769025419d133d243274f200d680f4c0292ab28 Mon Sep 17 00:00:00 2001 From: Heath Stewart Date: Wed, 2 Mar 2022 13:11:25 -0800 Subject: [PATCH 2/4] Revert changes for Azure/azure-sdk-tools#2434 --- .../tests/KeysTestBase.cs | 120 +++++++----------- 1 file changed, 49 insertions(+), 71 deletions(-) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/KeysTestBase.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/KeysTestBase.cs index b2277a30e72b..270aea9acf90 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/KeysTestBase.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/KeysTestBase.cs @@ -25,7 +25,6 @@ public abstract class KeysTestBase : RecordedTestBase : KeyVaultTestEnvironment.DefaultPollingInterval; public KeyClient Client { get; private set; } - private KeyClient _noninstrumentedClient; public virtual Uri Uri => new Uri(TestEnvironment.KeyVaultUrl); @@ -66,10 +65,9 @@ internal static void IgnoreIfNotSupported(RequestFailedException ex) } } - internal KeyClient GetClient(bool instrument) + internal KeyClient GetClient() { - // TODO: Remove support for non-instrumented client when https://github.com/Azure/azure-sdk-tools/issues/2434 is resolved. - KeyClientOptions options = new(_serviceVersion) + KeyClientOptions options = InstrumentClientOptions(new KeyClientOptions(_serviceVersion) { Diagnostics = { @@ -77,28 +75,15 @@ internal KeyClient GetClient(bool instrument) { "x-ms-request-id", }, - // TODO: Remove once https://github.com/Azure/azure-sdk-for-net/issues/18800 is resolved. - IsLoggingContentEnabled = Mode != RecordedTestMode.Playback, }, - }; + }); - if (instrument) - { - options = InstrumentClientOptions(options); - } - - KeyClient client = new(Uri, TestEnvironment.Credential, options); - if (instrument) - { - // Until https://github.com/Azure/azure-sdk-for-net/issues/8575 is fixed, - // we need to delay creation of keys due to aggressive service limits on key creation: - // https://docs.microsoft.com/azure/key-vault/key-vault-service-limits - IInterceptor[] interceptors = new[] { new DelayCreateKeyInterceptor(Mode) }; + // Until https://github.com/Azure/azure-sdk-for-net/issues/8575 is fixed, + // we need to delay creation of keys due to aggressive service limits on key creation: + // https://docs.microsoft.com/azure/key-vault/key-vault-service-limits + IInterceptor[] interceptors = new[] { new DelayCreateKeyInterceptor(Mode) }; - return InstrumentClient(client, interceptors); - } - - return client; + return InstrumentClient(new KeyClient(Uri, TestEnvironment.Credential, options), interceptors); } public override async Task StartTestRecordingAsync() @@ -107,9 +92,7 @@ public override async Task StartTestRecordingAsync() _listener = new KeyVaultTestEventListener(); - // TODO: Remove support for non-instrumented client when https://github.com/Azure/azure-sdk-tools/issues/2434 is resolved. - Client = GetClient(true); - _noninstrumentedClient = GetClient(false); + Client = GetClient(); } public override async Task StopTestRecordingAsync() @@ -152,11 +135,10 @@ protected async Task DeleteKey(string name) try { - // TODO: Remove support for non-instrumented client when https://github.com/Azure/azure-sdk-tools/issues/2434 is resolved. - //using (Recording.DisableRecording()) - //{ - await _noninstrumentedClient.StartDeleteKeyAsync(name).ConfigureAwait(false); - //} + using (Recording.DisableRecording()) + { + await Client.StartDeleteKeyAsync(name).ConfigureAwait(false); + } } catch (RequestFailedException ex) when (ex.Status == 404) { @@ -180,11 +162,10 @@ protected async Task PurgeKey(string name) try { - // TODO: Remove support for non-instrumented client when https://github.com/Azure/azure-sdk-tools/issues/2434 is resolved. - //using (Recording.DisableRecording()) - //{ - await _noninstrumentedClient.PurgeDeletedKeyAsync(name).ConfigureAwait(false); - //} + using (Recording.DisableRecording()) + { + await Client.PurgeDeletedKeyAsync(name).ConfigureAwait(false); + } } catch (RequestFailedException ex) when (ex.Status == 404) { @@ -296,20 +277,19 @@ protected Task WaitForDeletedKey(string name) return Task.CompletedTask; } - // TODO: Remove support for non-instrumented client when https://github.com/Azure/azure-sdk-tools/issues/2434 is resolved. - //using (Recording.DisableRecording()) - //{ - return TestRetryHelper.RetryAsync(async () => { - try - { - return await _noninstrumentedClient.GetDeletedKeyAsync(name).ConfigureAwait(false); - } - catch (RequestFailedException ex) when (ex.Status == 404) - { - throw new InconclusiveException($"Timed out while waiting for key '{name}' to be deleted"); - } - }, delay: PollingInterval); - //} + using (Recording.DisableRecording()) + { + return TestRetryHelper.RetryAsync(async () => { + try + { + return await Client.GetDeletedKeyAsync(name).ConfigureAwait(false); + } + catch (RequestFailedException ex) when (ex.Status == 404) + { + throw new InconclusiveException($"Timed out while waiting for key '{name}' to be deleted"); + } + }, delay: PollingInterval); + } } protected Task WaitForPurgedKey(string name, TimeSpan? delay = null) @@ -319,22 +299,21 @@ protected Task WaitForPurgedKey(string name, TimeSpan? delay = null) return Task.CompletedTask; } - // TODO: Remove support for non-instrumented client when https://github.com/Azure/azure-sdk-tools/issues/2434 is resolved. - //using (Recording.DisableRecording()) - //{ - delay ??= PollingInterval; - return TestRetryHelper.RetryAsync(async () => { - try - { - await _noninstrumentedClient.GetDeletedKeyAsync(name).ConfigureAwait(false); - throw new InvalidOperationException($"Key {name} still exists"); - } - catch (RequestFailedException ex) when (ex.Status == 404) - { - return (Response)null; - } - }, delay: delay.Value); - //} + using (Recording.DisableRecording()) + { + delay ??= PollingInterval; + return TestRetryHelper.RetryAsync(async () => { + try + { + await Client.GetDeletedKeyAsync(name).ConfigureAwait(false); + throw new InvalidOperationException($"Key {name} still exists"); + } + catch (RequestFailedException ex) when (ex.Status == 404) + { + return (Response)null; + } + }, delay: delay.Value); + } } protected Task WaitForKey(string name) @@ -344,11 +323,10 @@ protected Task WaitForKey(string name) return Task.CompletedTask; } - // TODO: Remove support for non-instrumented client when https://github.com/Azure/azure-sdk-tools/issues/2434 is resolved. - //using (Recording.DisableRecording()) - //{ - return TestRetryHelper.RetryAsync(async () => await _noninstrumentedClient.GetKeyAsync(name), delay: PollingInterval); - //} + using (Recording.DisableRecording()) + { + return TestRetryHelper.RetryAsync(async () => await Client.GetKeyAsync(name), delay: PollingInterval); + } } } } From 9286da60dc2e250a7d9976ae540c5ff05388b647 Mon Sep 17 00:00:00 2001 From: Heath Stewart Date: Wed, 2 Mar 2022 14:28:33 -0800 Subject: [PATCH 3/4] Compare recorded bodies Seems in the course of creating predictable results, I inadvertently fixed Azure/azure-sdk-for-net#11634. --- .../tests/CertificateClientLiveTests.cs | 2 - .../tests/CryptographyClientLiveTests.cs | 5 +- .../tests/KeyClientLiveTests.cs | 3 - .../tests/KeyResolverLiveTests.cs | 2 - .../tests/KeyUtilities.cs | 130 +++++++++--------- 5 files changed, 66 insertions(+), 76 deletions(-) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/CertificateClientLiveTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/CertificateClientLiveTests.cs index 840d26392b8b..d54ddf5361de 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/CertificateClientLiveTests.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/CertificateClientLiveTests.cs @@ -41,8 +41,6 @@ public partial class CertificateClientLiveTests : CertificatesTestBase public CertificateClientLiveTests(bool isAsync, CertificateClientOptions.ServiceVersion serviceVersion) : base(isAsync, serviceVersion, null /* RecordedTestMode.Record /* to re-record */) { - // TODO: https://github.com/Azure/azure-sdk-for-net/issues/11634 - CompareBodies = false; } [SetUp] diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/CryptographyClientLiveTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/CryptographyClientLiveTests.cs index e85e9d44530b..cca872aba094 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/CryptographyClientLiveTests.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/CryptographyClientLiveTests.cs @@ -25,9 +25,6 @@ protected CryptographyClientLiveTests(bool isAsync, KeyClientOptions.ServiceVers : base(isAsync, serviceVersion, mode) { _serviceVersion = serviceVersion; - - // TODO: https://github.com/Azure/azure-sdk-for-net/issues/11634 - CompareBodies = false; } [Test] @@ -169,7 +166,7 @@ public async Task SignVerifyDataStreamRoundTrip([EnumValues]SignatureAlgorithm a Assert.AreEqual(key.Id, verifyDataResult.KeyId); Assert.True(verifyResult.IsValid); - Assert.True(verifyResult.IsValid); + Assert.True(verifyDataResult.IsValid); } // We do not test using ES256K below since macOS doesn't support it; various ideas to work around that adversely affect runtime code too much. diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/KeyClientLiveTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/KeyClientLiveTests.cs index bdb3e7cd680f..ccdadd49b192 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/KeyClientLiveTests.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/KeyClientLiveTests.cs @@ -29,9 +29,6 @@ protected KeyClientLiveTests(bool isAsync, KeyClientOptions.ServiceVersion servi : base(isAsync, serviceVersion, mode) { _serviceVersion = serviceVersion; - - // TODO: https://github.com/Azure/azure-sdk-for-net/issues/11634 - CompareBodies = false; } [Test] diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/KeyResolverLiveTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/KeyResolverLiveTests.cs index c40ae7842cd4..ddc5ed0baf21 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/KeyResolverLiveTests.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/KeyResolverLiveTests.cs @@ -20,8 +20,6 @@ public KeyResolverLiveTests(bool isAsync, KeyClientOptions.ServiceVersion servic : base(isAsync, serviceVersion, null /* RecordedTestMode.Record /* to re-record */) { _serviceVersion = serviceVersion; - // TODO: https://github.com/Azure/azure-sdk-for-net/issues/11634 - CompareBodies = false; } public KeyResolver Resolver { get { return GetResolver(); } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/KeyUtilities.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/KeyUtilities.cs index 07e165b9fe97..8ab640948d93 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/KeyUtilities.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/KeyUtilities.cs @@ -90,85 +90,85 @@ public static JsonWebKey CreateRsaKey(bool includePrivateParameters = false, IEn RSAParameters rsaParameters = new RSAParameters { D = new byte[] { 0x8a, 0x5a, 0x7f, 0x16, 0x29, 0x95, 0x8b, 0x84, 0xeb, 0x8c, 0xba, 0x93, 0xad, 0xbf, 0x40, 0xa2, - 0xcc, 0xb9, 0xe9, 0xf8, 0xaa, 0x42, 0x78, 0x24, 0x5d, 0xdf, 0x99, 0xa1, 0x51, 0xd5, 0x1b, 0xaa,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x6d, 0x12, 0xa4, 0x65, 0x5b, 0xa0, 0xa9, 0xcb, 0x8d, 0x2b, + 0xeb, 0x1b, 0x81, 0x84, 0x26, 0xf7, 0x00, 0x49, 0x25, 0x4a, 0xc9, 0xda, 0x43, 0x60, 0x15, 0x47, + 0x65, 0x94, 0xe3, 0xb9, 0x0b, 0x00, 0xcb, 0x07, 0x3f, 0x5d, 0xdf, 0x19, 0x4b, 0x0f, 0x84, 0x17, }, Exponent = new byte[] { 0x01, 0x00, 0x01, }, InverseQ = new byte[] { 0xc2, 0xb4, 0x1c, 0x29, 0x19, 0x9e, 0x24, 0xe3, 0x38, 0xe0, 0x9b, 0x25, 0x12, 0x25, 0x5b, 0x5f, - 0xdb, 0x45, 0x72, 0xe8, 0xbe, 0x25, 0x4e, 0xc7, 0x0d, 0x15, 0x05, 0x18, 0xa8, 0x47, 0xf7, 0x87, - 0xa4, 0xa5, 0x02, 0xa5, 0xa0, 0x00, 0xd9, 0x98, 0xf2, 0xf4, 0x33, 0x64, 0x80, 0x30, 0xb9, 0x6c, - 0xcc, 0x83, 0xc0, 0x7a, 0xf3, 0x32, 0xfd, 0x60, 0x91, 0x02, 0x61, 0x9e, 0x79, 0x68, 0xcd, 0x84, - 0x6c, 0x39, 0x1e, 0x47, 0xb1, 0x13, 0xf9, 0xea, 0x2b, 0xc9, 0x65, 0xd5, 0x1d, 0x8a, 0x47, 0xf4, - 0xa3, 0xf2, 0x01, 0x50, 0x0a, 0xad, 0x72, 0xcd, 0xe3, 0x19, 0x67, 0x3e, 0x15, 0x8d, 0x40, 0x7c, - 0x8f, 0x30, 0xa0, 0xc9, 0x3b, 0xf9, 0x96, 0xba, 0x58, 0xae, 0xd6, 0xc8, 0x26, 0xa6, 0xa2, 0xa8, - 0x0f, 0x96, 0x2b, 0x28, 0xf8, 0x39, 0x11, 0xa1, 0xf0, 0x6a, 0xc5, 0xdd, 0x99, 0x5b, 0x18, 0x1a, }, + 0xdb, 0x45, 0x72, 0xe8, 0xbe, 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90, 0x47, 0xb3, 0x15, - 0xe7, 0xa5, 0x26, 0x48, 0x9d, 0xb5, 0x38, 0xa0, 0x44, 0x58, 0x63, 0xb2, 0xdd, 0x94, 0xaf, 0x2e, - 0x42, 0x08, 0x25, 0x19, 0x4a, 0x7b, 0xe5, 0x72, 0xbe, 0xd5, 0xa3, 0x92, 0x0b, 0xba, 0xf7, 0x5f, - 0x0b, 0x18, 0xa6, 0x62, 0x19, 0x6d, 0x53, 0xc1, 0x8a, 0x86, 0x19, 0x43, 0x53, 0xa4, 0x3a, 0x53, - 0x94, 0xd9, 0x99, 0x8b, 0x3a, 0xe4, 0x1e, 0xc5, 0x86, 0x15, 0x89, 0x53, 0xb5, 0x3d, 0x8b, 0x23, }, + 0xc3, 0x3d, 0xd9, 0xfc, 0x02, 0xf7, 0x16, 0x2d, 0x47, 0x88, 0xfc, 0xf4, 0x13, 0xa3, 0xbf, 0x25, + 0x80, 0x3c, 0x1b, 0x1d, 0x12, 0x43, 0x5c, 0xce, 0x22, 0xa4, 0x01, 0x7e, 0x04, 0x7a, 0xf3, 0x11, + 0x66, 0x36, 0x49, 0x3c, 0x3b, 0x6f, 0x49, 0x69, 0x74, 0xd5, 0x35, 0x23, 0x90, 0x47, 0xb3, 0x15, + 0xe7, 0xa5, 0x26, 0x48, 0x9d, 0xb5, 0x38, 0xa0, 0x44, 0x58, 0x63, 0xb2, 0xdd, 0x94, 0xaf, 0x2e, + 0x42, 0x08, 0x25, 0x19, 0x4a, 0x7b, 0xe5, 0x72, 0xbe, 0xd5, 0xa3, 0x92, 0x0b, 0xba, 0xf7, 0x5f, + 0x0b, 0x18, 0xa6, 0x62, 0x19, 0x6d, 0x53, 0xc1, 0x8a, 0x86, 0x19, 0x43, 0x53, 0xa4, 0x3a, 0x53, + 0x94, 0xd9, 0x99, 0x8b, 0x3a, 0xe4, 0x1e, 0xc5, 0x86, 0x15, 0x89, 0x53, 0xb5, 0x3d, 0x8b, 0x23, }, }; rsa.ImportParameters(rsaParameters); From a18e710f233206eef3192c1ce40b59f06e51d11e Mon Sep 17 00:00:00 2001 From: Heath Stewart Date: Wed, 2 Mar 2022 14:39:19 -0800 Subject: [PATCH 4/4] Don't enumerate JsonPathSanitizers twice Fixes #27310 --- sdk/core/Azure.Core.TestFramework/src/TestRecording.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs b/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs index 5846b9981aaf..7c01d632904a 100644 --- a/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs +++ b/sdk/core/Azure.Core.TestFramework/src/TestRecording.cs @@ -118,11 +118,6 @@ await _proxy.Client.AddHeaderSanitizerAsync( RecordingId); } - foreach (string jsonPath in _recordedTestBase.JsonPathSanitizers) - { - await _proxy.Client.AddBodyKeySanitizerAsync(new BodyKeySanitizer(Sanitized) { JsonPath = jsonPath }, RecordingId); - } - foreach (UriRegexSanitizer sanitizer in _recordedTestBase.UriRegexSanitizers) { await _proxy.Client.AddUriSanitizerAsync(sanitizer, RecordingId);