From 19f02f36fe6dbd82f2584018d76e7b9ce66af863 Mon Sep 17 00:00:00 2001 From: Kiran Kumar Kolli Date: Sun, 6 Oct 2024 13:57:18 -0700 Subject: [PATCH 1/8] Fixing earnings --- ...soft.Azure.Cosmos.Encryption.Custom.csproj | 2 ++ .../src/EncryptionContainer.cs | 1 + .../src/EncryptionContainerExtensions.cs | 1 + .../src/EncryptionCosmosClient.cs | 12 +++++------ .../src/EncryptionCosmosClientExtensions.cs | 1 + .../src/EncryptionDatabaseExtensions.cs | 1 + .../src/EncryptionKeyStoreProviderImpl.cs | 20 +++++++++---------- .../src/EncryptionQueryDefinition.cs | 4 ++-- .../NullableSByteSerializer.cs | 1 - .../NullableUInt16Serializer.cs | 1 - .../NullableUInt32Serializer.cs | 1 - .../NullableUInt64Serializer.cs | 1 - .../StandardSerializers/SByteSerializer.cs | 1 - .../StandardSerializers/UInt16Serializer.cs | 1 - .../StandardSerializers/UInt32Serializer.cs | 1 - .../StandardSerializers/UInt64Serializer.cs | 1 - .../Microsoft.Azure.Cosmos.Encryption.csproj | 2 ++ .../src/QueryDefinitionExtensions.cs | 1 + 18 files changed, 27 insertions(+), 26 deletions(-) diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj b/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj index 64cbde6902..70b87351e2 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj @@ -6,6 +6,7 @@ $(LangVersion) $([System.DateTime]::Now.ToString(yyyyMMdd)) $(CustomEncryptionVersion) + true Microsoft Corporation Microsoft This is an internal library that provides an implementation for client-side encryption for Azure Cosmos DB for NoSQL for multi-tenant use case. For more information, refer to https://aka.ms/CosmosCustomClientEncryption @@ -38,6 +39,7 @@ + diff --git a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionContainer.cs b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionContainer.cs index ab83f9e04d..f8bf0ffe44 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionContainer.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionContainer.cs @@ -771,6 +771,7 @@ public override Task IsFeedRangePartOfAsync( throw new NotImplementedException(); } #endif + /// /// This function handles the scenario where a container is deleted(say from different Client) and recreated with same Id but with different client encryption policy. /// The idea is to have the container Rid cached and sent out as part of RequestOptions with Container Rid set in "x-ms-cosmos-intended-collection-rid" header. diff --git a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionContainerExtensions.cs b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionContainerExtensions.cs index 8da2764605..d5f028f13b 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionContainerExtensions.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionContainerExtensions.cs @@ -13,6 +13,7 @@ namespace Microsoft.Azure.Cosmos.Encryption /// /// Extension methods for to support client-side encryption. /// + [CLSCompliant(false)] public static class EncryptionContainerExtensions { /// diff --git a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionCosmosClient.cs b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionCosmosClient.cs index 841400fd6b..24eb872393 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionCosmosClient.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionCosmosClient.cs @@ -196,12 +196,6 @@ public override Task ReadAccountAsync() return this.cosmosClient.ReadAccountAsync(); } - /// - protected override void Dispose(bool disposing) - { - this.cosmosClient.Dispose(); - } - public async Task GetClientEncryptionKeyPropertiesAsync( string clientEncryptionKeyId, EncryptionContainer encryptionContainer, @@ -252,6 +246,12 @@ public async Task GetClientEncryptionKeyPropertie forceRefresh: shouldForceRefresh); } + /// + protected override void Dispose(bool disposing) + { + this.cosmosClient.Dispose(); + } + private async Task FetchClientEncryptionKeyPropertiesAsync( EncryptionContainer encryptionContainer, string clientEncryptionKeyId, diff --git a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionCosmosClientExtensions.cs b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionCosmosClientExtensions.cs index 2c68f52191..1976dbe079 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionCosmosClientExtensions.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionCosmosClientExtensions.cs @@ -10,6 +10,7 @@ namespace Microsoft.Azure.Cosmos.Encryption /// /// Extension methods for to support client-side encryption. /// + [CLSCompliant(false)] public static class EncryptionCosmosClientExtensions { /// diff --git a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionDatabaseExtensions.cs b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionDatabaseExtensions.cs index f867921946..bd5c4521c6 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionDatabaseExtensions.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionDatabaseExtensions.cs @@ -12,6 +12,7 @@ namespace Microsoft.Azure.Cosmos.Encryption /// /// Extension methods for to support client-side encryption. /// + [CLSCompliant(false)] public static class EncryptionDatabaseExtensions { /// diff --git a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionKeyStoreProviderImpl.cs b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionKeyStoreProviderImpl.cs index 4826f46a27..086e9855d8 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionKeyStoreProviderImpl.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionKeyStoreProviderImpl.cs @@ -58,16 +58,6 @@ public override byte[] WrapKey(string encryptionKeyId, KeyEncryptionKeyAlgorithm .WrapKey(EncryptionKeyStoreProviderImpl.GetNameForKeyEncryptionKeyAlgorithm(algorithm), key); } - private static string GetNameForKeyEncryptionKeyAlgorithm(KeyEncryptionKeyAlgorithm algorithm) - { - if (algorithm == KeyEncryptionKeyAlgorithm.RSA_OAEP) - { - return EncryptionKeyStoreProviderImpl.RsaOaepWrapAlgorithm; - } - - throw new InvalidOperationException(string.Format("Unexpected algorithm {0}", algorithm)); - } - /// /// The public facing Cosmos Encryption library interface does not expose this method, hence not supported. /// @@ -83,5 +73,15 @@ public override bool Verify(string encryptionKeyId, bool allowEnclaveComputation { throw new NotSupportedException("The Verify operation is not supported."); } + + private static string GetNameForKeyEncryptionKeyAlgorithm(KeyEncryptionKeyAlgorithm algorithm) + { + if (algorithm == KeyEncryptionKeyAlgorithm.RSA_OAEP) + { + return EncryptionKeyStoreProviderImpl.RsaOaepWrapAlgorithm; + } + + throw new InvalidOperationException(string.Format("Unexpected algorithm {0}", algorithm)); + } } } diff --git a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionQueryDefinition.cs b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionQueryDefinition.cs index 069abfb8ed..525b5dc93c 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionQueryDefinition.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionQueryDefinition.cs @@ -8,8 +8,6 @@ namespace Microsoft.Azure.Cosmos.Encryption internal sealed class EncryptionQueryDefinition : QueryDefinition { - internal Container Container { get; } - internal EncryptionQueryDefinition( string queryText, Container container) @@ -17,5 +15,7 @@ internal EncryptionQueryDefinition( { this.Container = container ?? throw new ArgumentNullException(nameof(container)); } + + internal Container Container { get; } } } diff --git a/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/NullableSByteSerializer.cs b/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/NullableSByteSerializer.cs index 058f585b50..9c1052deef 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/NullableSByteSerializer.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/NullableSByteSerializer.cs @@ -12,7 +12,6 @@ namespace Microsoft.Data.Encryption.Cryptography.Serializers /// /// Contains the methods for serializing and deserializing ? type data objects. /// - [CLSCompliant(false)] internal class NullableSByteSerializer : Serializer { private static readonly SByteSerializer serializer = new SByteSerializer(); diff --git a/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/NullableUInt16Serializer.cs b/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/NullableUInt16Serializer.cs index 28b74244b4..4bf49b4f3f 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/NullableUInt16Serializer.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/NullableUInt16Serializer.cs @@ -12,7 +12,6 @@ namespace Microsoft.Data.Encryption.Cryptography.Serializers /// /// Contains the methods for serializing and deserializing ? type data objects. /// - [CLSCompliant(false)] internal class NullableUInt16Serializer : Serializer { private static readonly UInt16Serializer serializer = new UInt16Serializer(); diff --git a/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/NullableUInt32Serializer.cs b/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/NullableUInt32Serializer.cs index 074db63944..1716c73a81 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/NullableUInt32Serializer.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/NullableUInt32Serializer.cs @@ -12,7 +12,6 @@ namespace Microsoft.Data.Encryption.Cryptography.Serializers /// /// Contains the methods for serializing and deserializing ? type data objects. /// - [CLSCompliant(false)] internal class NullableUInt32Serializer : Serializer { private static readonly UInt32Serializer serializer = new UInt32Serializer(); diff --git a/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/NullableUInt64Serializer.cs b/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/NullableUInt64Serializer.cs index ebd5fe709c..ef5f9422d7 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/NullableUInt64Serializer.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/NullableUInt64Serializer.cs @@ -12,7 +12,6 @@ namespace Microsoft.Data.Encryption.Cryptography.Serializers /// /// Contains the methods for serializing and deserializing ? type data objects. /// - [CLSCompliant(false)] internal class NullableUInt64Serializer : Serializer { private static readonly UInt64Serializer serializer = new UInt64Serializer(); diff --git a/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/SByteSerializer.cs b/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/SByteSerializer.cs index 14fe6dbf7a..7ec581e495 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/SByteSerializer.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/SByteSerializer.cs @@ -12,7 +12,6 @@ namespace Microsoft.Data.Encryption.Cryptography.Serializers /// /// Contains the methods for serializing and deserializing type data objects. /// - [CLSCompliant(false)] internal class SByteSerializer : Serializer { /// diff --git a/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/UInt16Serializer.cs b/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/UInt16Serializer.cs index d211a5b00b..46c0cfaf59 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/UInt16Serializer.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/UInt16Serializer.cs @@ -14,7 +14,6 @@ namespace Microsoft.Data.Encryption.Cryptography.Serializers /// /// Contains the methods for serializing and deserializing type data objects. /// - [CLSCompliant(false)] internal class UInt16Serializer : Serializer { /// diff --git a/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/UInt32Serializer.cs b/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/UInt32Serializer.cs index 850b1a8941..ac8a053745 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/UInt32Serializer.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/UInt32Serializer.cs @@ -14,7 +14,6 @@ namespace Microsoft.Data.Encryption.Cryptography.Serializers /// /// Contains the methods for serializing and deserializing type data objects. /// - [CLSCompliant(false)] internal class UInt32Serializer : Serializer { /// diff --git a/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/UInt64Serializer.cs b/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/UInt64Serializer.cs index 0e236be4f4..fe729ddbe0 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/UInt64Serializer.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/MdeSrc/Cryptography/Serializers/StandardSerializers/UInt64Serializer.cs @@ -14,7 +14,6 @@ namespace Microsoft.Data.Encryption.Cryptography.Serializers /// /// Contains the methods for serializing and deserializing type data objects. /// - [CLSCompliant(false)] internal class UInt64Serializer : Serializer { /// diff --git a/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj b/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj index c58aca9785..d9232d4cf5 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj +++ b/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj @@ -4,6 +4,7 @@ Microsoft.Azure.Cosmos.Encryption Microsoft.Azure.Cosmos.Encryption $(LangVersion) + true $(EncryptionOfficialVersion) $(EncryptionPreviewVersion) $(EncryptionPreviewSuffixVersion) @@ -41,6 +42,7 @@ + diff --git a/Microsoft.Azure.Cosmos.Encryption/src/QueryDefinitionExtensions.cs b/Microsoft.Azure.Cosmos.Encryption/src/QueryDefinitionExtensions.cs index 7df68dbd4c..22a56bc369 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/QueryDefinitionExtensions.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/QueryDefinitionExtensions.cs @@ -13,6 +13,7 @@ namespace Microsoft.Azure.Cosmos.Encryption /// /// Extension methods for to support client-side encryption. /// + [CLSCompliant(false)] public static class QueryDefinitionExtensions { /// From ecfe2bce76fa27e6fc611021032328bda0e4457f Mon Sep 17 00:00:00 2001 From: Kiran Kumar Kolli Date: Sun, 6 Oct 2024 14:12:36 -0700 Subject: [PATCH 2/8] Some more changes --- .../src/EncryptionContainer.cs | 1 + Microsoft.Azure.Cosmos.Encryption/src/EncryptionContainer.cs | 3 ++- .../src/EncryptionCosmosDiagnostics.cs | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/src/EncryptionContainer.cs b/Microsoft.Azure.Cosmos.Encryption.Custom/src/EncryptionContainer.cs index 8745518d4c..a5ad419a52 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/src/EncryptionContainer.cs +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/src/EncryptionContainer.cs @@ -1041,6 +1041,7 @@ public override Task IsFeedRangePartOfAsync( cancellationToken); } #endif + private async Task ReadManyItemsHelperAsync( IReadOnlyList<(string id, PartitionKey partitionKey)> items, ReadManyRequestOptions readManyRequestOptions = null, diff --git a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionContainer.cs b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionContainer.cs index f8bf0ffe44..b064da247c 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionContainer.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionContainer.cs @@ -982,10 +982,11 @@ internal async Task CheckIfIdIsEncryptedAndGetEncryptedIdAsync( { throw new NotSupportedException($"The number of partition keys passed in the query exceeds the number of keys initialized on the container. Container Id : {this.Id}"); } + bool isPkEncrypted = false; // partitionKeyBuilder expects the paths and values to be in same order. - for(counter = 0; counter < jArray.Count(); counter++) + for (counter = 0; counter < jArray.Count(); counter++) { string path = encryptionSettings.PartitionKeyPaths[counter]; diff --git a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionCosmosDiagnostics.cs b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionCosmosDiagnostics.cs index e97da57fbb..bc0f536c6d 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionCosmosDiagnostics.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionCosmosDiagnostics.cs @@ -92,6 +92,7 @@ public override string ToString() { return this.coreDiagnostics.GetStartTimeUtc(); } + public override int GetFailedRequestCount() { return this.coreDiagnostics.GetFailedRequestCount(); From 363dd89f2098dca729c56796f8c220d6256ff614 Mon Sep 17 00:00:00 2001 From: Kiran Kumar Kolli Date: Mon, 7 Oct 2024 08:16:53 -0700 Subject: [PATCH 3/8] Undoing changed to csproj --- .../src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj | 2 -- .../src/Microsoft.Azure.Cosmos.Encryption.csproj | 2 -- 2 files changed, 4 deletions(-) diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj b/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj index 70b87351e2..64cbde6902 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj @@ -6,7 +6,6 @@ $(LangVersion) $([System.DateTime]::Now.ToString(yyyyMMdd)) $(CustomEncryptionVersion) - true Microsoft Corporation Microsoft This is an internal library that provides an implementation for client-side encryption for Azure Cosmos DB for NoSQL for multi-tenant use case. For more information, refer to https://aka.ms/CosmosCustomClientEncryption @@ -39,7 +38,6 @@ - diff --git a/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj b/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj index d9232d4cf5..c58aca9785 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj +++ b/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj @@ -4,7 +4,6 @@ Microsoft.Azure.Cosmos.Encryption Microsoft.Azure.Cosmos.Encryption $(LangVersion) - true $(EncryptionOfficialVersion) $(EncryptionPreviewVersion) $(EncryptionPreviewSuffixVersion) @@ -42,7 +41,6 @@ - From 1f05a12f075ab50c8f8f9d05e14606258571e127 Mon Sep 17 00:00:00 2001 From: Kiran Kumar Kolli Date: Mon, 7 Oct 2024 08:19:43 -0700 Subject: [PATCH 4/8] Fixing vulnurabilites in System.Text.RegularExpressions --- .../src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj | 1 + .../src/Microsoft.Azure.Cosmos.Encryption.csproj | 1 + 2 files changed, 2 insertions(+) diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj b/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj index 64cbde6902..b054da681e 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj @@ -38,6 +38,7 @@ + diff --git a/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj b/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj index c58aca9785..19270da788 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj +++ b/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj @@ -41,6 +41,7 @@ + From 67e20985a436a95deb5a0c0f3253346bcdc02553 Mon Sep 17 00:00:00 2001 From: Kiran Kumar Kolli Date: Tue, 8 Oct 2024 19:01:37 -0700 Subject: [PATCH 5/8] [INTERNAL] CI: Fixes documentation warnings --- ...tionTransactionalBatchOperationResult{T}.cs | 1 - ...osoft.Azure.Cosmos.Encryption.Custom.csproj | 1 + .../src/Mirrored/AssemblyKeys.cs | 2 +- .../src/CosmosJsonDotNetSerializer.cs | 18 +++++++++--------- .../src/EncryptionContainerResponse.cs | 4 ++-- .../src/EncryptionSettingForProperty.cs | 2 +- .../Microsoft.Azure.Cosmos.Encryption.csproj | 1 + .../src/Mirrored/AsyncCache.cs | 4 ++-- .../Tools/Benchmark/CosmosBenchmark.csproj | 4 +++- 9 files changed, 20 insertions(+), 17 deletions(-) diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/src/Common/EncryptionTransactionalBatchOperationResult{T}.cs b/Microsoft.Azure.Cosmos.Encryption.Custom/src/Common/EncryptionTransactionalBatchOperationResult{T}.cs index 143d510f9e..8b1fa205a3 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/src/Common/EncryptionTransactionalBatchOperationResult{T}.cs +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/src/Common/EncryptionTransactionalBatchOperationResult{T}.cs @@ -9,7 +9,6 @@ internal sealed class EncryptionTransactionalBatchOperationResult : Transacti /// /// Initializes a new instance of the class. /// - /// BatchOperationResult with stream resource. /// Deserialized resource. internal EncryptionTransactionalBatchOperationResult(T resource) { diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj b/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj index db503924f9..7d69a4e892 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj @@ -16,6 +16,7 @@ https://aka.ms/netcoregaeula https://github.com/Azure/azure-cosmos-dotnet-v3 http://go.microsoft.com/fwlink/?LinkID=288890 + true microsoft;azure;cosmos;cosmosdb;documentdb;docdb;nosql;azureofficial;dotnetcore;netcore;netstandard;client;encryption;byok diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/src/Mirrored/AssemblyKeys.cs b/Microsoft.Azure.Cosmos.Encryption.Custom/src/Mirrored/AssemblyKeys.cs index 08a8e12743..4a609c1966 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/src/Mirrored/AssemblyKeys.cs +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/src/Mirrored/AssemblyKeys.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.Cosmos.Encryption.Custom { internal static class AssemblyKeys { - /// TestPublicKey is an unsupported strong key for testing and internal use only + /// TestPublicKey is an unsupported strong key for testing and internal use only. internal const string TestPublicKey = ", PublicKey=0024000004800000940000000602000000240000525341310004000001000100197c25d0a04f73cb271e8181dba1c0c713df8deebb25864541a66670500f34896d280484b45fe1ff6c29f2ee7aa175d8bcbd0c83cc23901a894a86996030f6292ce6eda6e6f3e6c74b3c5a3ded4903c951e6747e6102969503360f7781bf8bf015058eb89b7621798ccc85aaca036ff1bc1556bb7f62de15908484886aa8bbae"; } } \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Encryption/src/CosmosJsonDotNetSerializer.cs b/Microsoft.Azure.Cosmos.Encryption/src/CosmosJsonDotNetSerializer.cs index 0d20972ce4..4488136702 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/CosmosJsonDotNetSerializer.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/CosmosJsonDotNetSerializer.cs @@ -21,11 +21,11 @@ internal sealed class CosmosJsonDotNetSerializer private readonly JsonSerializerSettings serializerSettings; /// - /// Create a serializer that uses the JSON.net serializer + /// Initializes a new instance of the class. /// /// /// This is internal to reduce exposure of JSON.net types so - /// it is easier to convert to System.Text.Json + /// it is easier to convert to System.Text.Json. /// internal CosmosJsonDotNetSerializer(JsonSerializerSettings jsonSerializerSettings = null) { @@ -35,9 +35,9 @@ internal CosmosJsonDotNetSerializer(JsonSerializerSettings jsonSerializerSetting /// /// Convert a Stream to the passed in type. /// - /// The type of object that should be deserialized - /// An open stream that is readable that contains JSON - /// The object representing the deserialized stream + /// The type of object that should be deserialized. + /// An open stream that is readable that contains JSON. + /// The object representing the deserialized stream. public T FromStream(Stream stream) { if (stream == null) @@ -61,9 +61,9 @@ public T FromStream(Stream stream) /// /// Converts an object to a open readable stream. /// - /// The type of object being serialized - /// The object to be serialized - /// An open readable stream containing the JSON of the serialized object + /// The type of object being serialized. + /// The object to be serialized. + /// An open readable stream containing the JSON of the serialized object. public MemoryStream ToStream(T input) { MemoryStream streamPayload = new MemoryStream(); @@ -83,7 +83,7 @@ public MemoryStream ToStream(T input) /// /// JsonSerializer has hit a race conditions with custom settings that cause null reference exception. - /// To avoid the race condition a new JsonSerializer is created for each call + /// To avoid the race condition a new JsonSerializer is created for each call. /// private JsonSerializer GetSerializer() { diff --git a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionContainerResponse.cs b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionContainerResponse.cs index 87c29ac00e..ccef5e95e1 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionContainerResponse.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionContainerResponse.cs @@ -38,9 +38,9 @@ public EncryptionContainerResponse( public override HttpStatusCode StatusCode => this.containerResponse.StatusCode; /// - /// Get implicitly from + /// Get implicitly from . /// - /// ContainerResponse + /// ContainerResponse. public static implicit operator Container(EncryptionContainerResponse response) { return response.Container; diff --git a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionSettingForProperty.cs b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionSettingForProperty.cs index ae901ba5b0..9cecc0d453 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionSettingForProperty.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionSettingForProperty.cs @@ -97,7 +97,7 @@ public async Task BuildEncryptionAlgori /// Helper function which force refreshes the gateway cache to fetch the latest client encryption key to build ProtectedDataEncryptionKey object for the encryption setting. /// /// Client encryption key etag to be passed, which is used as If-None-Match Etag for the request. - /// cacellation token. + /// Cancellation token. /// ProtectedDataEncryptionKey object. private async Task ForceRefreshGatewayCacheAndBuildProtectedDataEncryptionKeyAsync( string existingCekEtag, diff --git a/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj b/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj index 19270da788..8b27f2f272 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj +++ b/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj @@ -21,6 +21,7 @@ https://github.com/Azure/azure-cosmos-dotnet-v3 http://go.microsoft.com/fwlink/?LinkID=288890 false + true microsoft;azure;cosmos;cosmosdb;documentdb;docdb;nosql;azureofficial;dotnetcore;netcore;netstandard;client;encryption;byok diff --git a/Microsoft.Azure.Cosmos.Encryption/src/Mirrored/AsyncCache.cs b/Microsoft.Azure.Cosmos.Encryption/src/Mirrored/AsyncCache.cs index 87dd67b3c5..4a237bf5b5 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/Mirrored/AsyncCache.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/Mirrored/AsyncCache.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.Cosmos.Encryption /// /// Cache which supports asynchronous value initialization. - /// It ensures that for given key only single inintialization funtion is running at any point in time. + /// It ensures that for given key only single initialization function is running at any point in time. /// /// Type of keys. /// Type of values. @@ -168,7 +168,7 @@ public bool TryRemoveIfCompleted(TKey key) /// /// Remove value from cache and return it if present. /// - /// Key + /// Key. /// Value if present, default value if not present. public async Task RemoveAsync(TKey key) { diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.csproj b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.csproj index 073e8daa7a..81b336f543 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.csproj +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.csproj @@ -20,8 +20,10 @@ - + + + From cde9c6abb07b62fcc530651f1c71c790317aeb9e Mon Sep 17 00:00:00 2001 From: Kiran Kumar Kolli Date: Tue, 8 Oct 2024 19:36:44 -0700 Subject: [PATCH 6/8] Some more changes --- .../src/AeadAes256CbcHmac256Algorithm.cs | 1 - .../src/Common/CosmosDiagnosticsContext.cs | 2 +- .../EncryptionTransactionalBatchOperationResult{T}.cs | 2 +- .../src/DataEncryptionKeyContainer.cs | 6 ++++-- .../src/EncryptableItem.cs | 2 +- .../src/MdeServices/MdeEncryptionAlgorithm.cs | 7 +------ .../src/MemoryTextReader.cs | 2 +- .../src/EncryptionSettingForProperty.cs | 1 + .../src/EncryptionTransactionalBatchOperationResult{T}.cs | 3 +-- .../src/Mirrored/AssemblyKeys.cs | 2 +- 10 files changed, 12 insertions(+), 16 deletions(-) diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/src/AeadAes256CbcHmac256Algorithm.cs b/Microsoft.Azure.Cosmos.Encryption.Custom/src/AeadAes256CbcHmac256Algorithm.cs index fab34ec143..6ea90a33bf 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/src/AeadAes256CbcHmac256Algorithm.cs +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/src/AeadAes256CbcHmac256Algorithm.cs @@ -156,7 +156,6 @@ public override byte[] EncryptData(byte[] plainText) /// cell_tag = HMAC_SHA-2-256(mac_key, versionbyte + cell_iv + cell_ciphertext + versionbyte_length) /// cell_blob = versionbyte + cell_tag + cell_iv + cell_ciphertext /// - /// Plaintext data to be encrypted /// Returns the ciphertext corresponding to the plaintext. public override int EncryptData(byte[] plainText, int plainTextOffset, int plainTextLength, byte[] output, int outputOffset) { diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/src/Common/CosmosDiagnosticsContext.cs b/Microsoft.Azure.Cosmos.Encryption.Custom/src/Common/CosmosDiagnosticsContext.cs index 1d18c167af..308cf17f8b 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/src/Common/CosmosDiagnosticsContext.cs +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/src/Common/CosmosDiagnosticsContext.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.Cosmos.Encryption.Custom using System; /// - /// This is an empty implementation of CosmosDiagnosticsContext which has been plumbed through the DataEncryptionKeyProvider & EncryptionContainer. + /// This is an empty implementation of CosmosDiagnosticsContext which has been plumbed through the DataEncryptionKeyProvider and EncryptionContainer. /// This may help adding diagnostics more easily in future. /// internal class CosmosDiagnosticsContext diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/src/Common/EncryptionTransactionalBatchOperationResult{T}.cs b/Microsoft.Azure.Cosmos.Encryption.Custom/src/Common/EncryptionTransactionalBatchOperationResult{T}.cs index 8b1fa205a3..d37dd4a9cc 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/src/Common/EncryptionTransactionalBatchOperationResult{T}.cs +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/src/Common/EncryptionTransactionalBatchOperationResult{T}.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.Cosmos.Encryption.Custom internal sealed class EncryptionTransactionalBatchOperationResult : TransactionalBatchOperationResult { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// Deserialized resource. internal EncryptionTransactionalBatchOperationResult(T resource) diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/src/DataEncryptionKeyContainer.cs b/Microsoft.Azure.Cosmos.Encryption.Custom/src/DataEncryptionKeyContainer.cs index 9ca7ec574a..377b6afac7 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/src/DataEncryptionKeyContainer.cs +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/src/DataEncryptionKeyContainer.cs @@ -4,8 +4,10 @@ namespace Microsoft.Azure.Cosmos.Encryption.Custom { + using System; using System.Threading; using System.Threading.Tasks; + using Microsoft.Azure.Cosmos.Fluent; /// /// Container for data encryption keys. Provides methods to create, re-wrap, read and enumerate data encryption keys. @@ -132,7 +134,7 @@ public abstract Task> RewrapDataEncryp /// /// /// - /// is recommended for single data encryption key look-up. + /// is recommended for single data encryption key look-up. /// public abstract FeedIterator GetDataEncryptionKeyQueryIterator( string queryText = null, @@ -167,7 +169,7 @@ public abstract FeedIterator GetDataEncryptionKeyQueryIterator( /// /// /// - /// is recommended for single data encryption key look-up. + /// is recommended for single data encryption key look-up. /// public abstract FeedIterator GetDataEncryptionKeyQueryIterator( QueryDefinition queryDefinition, diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/src/EncryptableItem.cs b/Microsoft.Azure.Cosmos.Encryption.Custom/src/EncryptableItem.cs index 72bf3cfa41..5e6e173cf7 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/src/EncryptableItem.cs +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/src/EncryptableItem.cs @@ -8,7 +8,7 @@ namespace Microsoft.Azure.Cosmos.Encryption.Custom using Newtonsoft.Json.Linq; /// - /// Input type should implement this abstract class for lazy decryption & to retrieve the details in the write path. + /// Input type should implement this abstract class for lazy decryption and to retrieve the details in the write path. /// public abstract class EncryptableItem { diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/src/MdeServices/MdeEncryptionAlgorithm.cs b/Microsoft.Azure.Cosmos.Encryption.Custom/src/MdeServices/MdeEncryptionAlgorithm.cs index 963ab8705a..8bb3a09ed3 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/src/MdeServices/MdeEncryptionAlgorithm.cs +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/src/MdeServices/MdeEncryptionAlgorithm.cs @@ -8,7 +8,7 @@ namespace Microsoft.Azure.Cosmos.Encryption.Custom using Microsoft.Data.Encryption.Cryptography; /// - /// Encryption Algorithm provided by MDE Encryption Package + /// Encryption Algorithm provided by MDE Encryption Package. /// internal sealed class MdeEncryptionAlgorithm : DataEncryptionKey { @@ -27,9 +27,6 @@ internal sealed class MdeEncryptionAlgorithm : DataEncryptionKey /// here . /// More specifically this implements AEAD_AES_256_CBC_HMAC_SHA256 algorithm. /// - /// Data Encryption Key properties - /// Encryption type - /// EncryptionKeyStoreProvider for wrapping and unwrapping public MdeEncryptionAlgorithm( DataEncryptionKeyProperties dekProperties, Data.Encryption.Cryptography.EncryptionType encryptionType, @@ -92,8 +89,6 @@ public MdeEncryptionAlgorithm( /// here . /// More specifically this implements AEAD_AES_256_CBC_HMAC_SHA256 algorithm. /// - /// Data Encryption Key - /// Encryption type public MdeEncryptionAlgorithm( byte[] rawkey, Data.Encryption.Cryptography.DataEncryptionKey dataEncryptionKey, diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/src/MemoryTextReader.cs b/Microsoft.Azure.Cosmos.Encryption.Custom/src/MemoryTextReader.cs index 9326fbbf0e..1a3aa6d0da 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/src/MemoryTextReader.cs +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/src/MemoryTextReader.cs @@ -9,7 +9,7 @@ namespace Microsoft.Azure.Cosmos.Encryption.Custom using System.IO; /// - /// Adjusted implementation of .Net StringReader reading from a Memory instead of a string. + /// Adjusted implementation of .Net StringReader reading from a Memory{char} instead of a string. /// internal class MemoryTextReader : TextReader { diff --git a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionSettingForProperty.cs b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionSettingForProperty.cs index 9cecc0d453..fea4f12ff1 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionSettingForProperty.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionSettingForProperty.cs @@ -97,6 +97,7 @@ public async Task BuildEncryptionAlgori /// Helper function which force refreshes the gateway cache to fetch the latest client encryption key to build ProtectedDataEncryptionKey object for the encryption setting. /// /// Client encryption key etag to be passed, which is used as If-None-Match Etag for the request. + /// KEK expired exception. /// Cancellation token. /// ProtectedDataEncryptionKey object. private async Task ForceRefreshGatewayCacheAndBuildProtectedDataEncryptionKeyAsync( diff --git a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionTransactionalBatchOperationResult{T}.cs b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionTransactionalBatchOperationResult{T}.cs index 96b2f45081..3af09407a3 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionTransactionalBatchOperationResult{T}.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionTransactionalBatchOperationResult{T}.cs @@ -7,9 +7,8 @@ namespace Microsoft.Azure.Cosmos.Encryption internal sealed class EncryptionTransactionalBatchOperationResult : TransactionalBatchOperationResult { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// BatchOperationResult with stream resource. /// Deserialized resource. internal EncryptionTransactionalBatchOperationResult(T resource) { diff --git a/Microsoft.Azure.Cosmos.Encryption/src/Mirrored/AssemblyKeys.cs b/Microsoft.Azure.Cosmos.Encryption/src/Mirrored/AssemblyKeys.cs index 08a8e12743..4a609c1966 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/Mirrored/AssemblyKeys.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/Mirrored/AssemblyKeys.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.Cosmos.Encryption.Custom { internal static class AssemblyKeys { - /// TestPublicKey is an unsupported strong key for testing and internal use only + /// TestPublicKey is an unsupported strong key for testing and internal use only. internal const string TestPublicKey = ", PublicKey=0024000004800000940000000602000000240000525341310004000001000100197c25d0a04f73cb271e8181dba1c0c713df8deebb25864541a66670500f34896d280484b45fe1ff6c29f2ee7aa175d8bcbd0c83cc23901a894a86996030f6292ce6eda6e6f3e6c74b3c5a3ded4903c951e6747e6102969503360f7781bf8bf015058eb89b7621798ccc85aaca036ff1bc1556bb7f62de15908484886aa8bbae"; } } \ No newline at end of file From eefdce2c814d120c17415dcf584b1c67cd893e0d Mon Sep 17 00:00:00 2001 From: Kiran Kumar Kolli Date: Tue, 8 Oct 2024 19:52:05 -0700 Subject: [PATCH 7/8] Updating csproj to treat warnings as errors --- .../src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj | 1 + .../src/Microsoft.Azure.Cosmos.Encryption.csproj | 1 + .../Tools/CTL/Scenarios/ReadWriteQueryScenario.cs | 5 ----- .../FaultInjection/src/FaultInjection.csproj | 1 + 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj b/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj index 7d69a4e892..f0c8b1e4a2 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj @@ -17,6 +17,7 @@ https://github.com/Azure/azure-cosmos-dotnet-v3 http://go.microsoft.com/fwlink/?LinkID=288890 true + true microsoft;azure;cosmos;cosmosdb;documentdb;docdb;nosql;azureofficial;dotnetcore;netcore;netstandard;client;encryption;byok diff --git a/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj b/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj index 8b27f2f272..3421b335aa 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj +++ b/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj @@ -22,6 +22,7 @@ http://go.microsoft.com/fwlink/?LinkID=288890 false true + true microsoft;azure;cosmos;cosmosdb;documentdb;docdb;nosql;azureofficial;dotnetcore;netcore;netstandard;client;encryption;byok diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/CTL/Scenarios/ReadWriteQueryScenario.cs b/Microsoft.Azure.Cosmos.Samples/Tools/CTL/Scenarios/ReadWriteQueryScenario.cs index db85445bef..ead98cccfb 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/CTL/Scenarios/ReadWriteQueryScenario.cs +++ b/Microsoft.Azure.Cosmos.Samples/Tools/CTL/Scenarios/ReadWriteQueryScenario.cs @@ -278,11 +278,6 @@ private static bool ShouldContinue( TimeSpan maxDurationTime = config.RunningTimeDurationAsTimespan; long maxNumberOfOperations = config.Operations; - if (maxDurationTime == null) - { - return iterationCount < maxNumberOfOperations; - } - if (maxDurationTime.TotalMilliseconds < stopwatch.ElapsedMilliseconds) { return false; diff --git a/Microsoft.Azure.Cosmos/FaultInjection/src/FaultInjection.csproj b/Microsoft.Azure.Cosmos/FaultInjection/src/FaultInjection.csproj index 14e187d6bb..c282c09a98 100644 --- a/Microsoft.Azure.Cosmos/FaultInjection/src/FaultInjection.csproj +++ b/Microsoft.Azure.Cosmos/FaultInjection/src/FaultInjection.csproj @@ -14,6 +14,7 @@ Microsoft.Azure.Cosmos.FaultInjection enable enable + true True From 1880bf7736b55a5b59e06ea1ee008f7cdf8c4079 Mon Sep 17 00:00:00 2001 From: Kiran Kumar Kolli Date: Tue, 8 Oct 2024 19:56:51 -0700 Subject: [PATCH 8/8] replacing spaces with tables to be consistent --- Microsoft.Azure.Cosmos/FaultInjection/src/FaultInjection.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Microsoft.Azure.Cosmos/FaultInjection/src/FaultInjection.csproj b/Microsoft.Azure.Cosmos/FaultInjection/src/FaultInjection.csproj index c282c09a98..e6c1a2b8af 100644 --- a/Microsoft.Azure.Cosmos/FaultInjection/src/FaultInjection.csproj +++ b/Microsoft.Azure.Cosmos/FaultInjection/src/FaultInjection.csproj @@ -14,7 +14,7 @@ Microsoft.Azure.Cosmos.FaultInjection enable enable - true + true True