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 143d510f9e..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,9 +7,8 @@ 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. /// - /// BatchOperationResult with stream resource. /// 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.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj b/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj index db503924f9..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 @@ -16,6 +16,8 @@ https://aka.ms/netcoregaeula 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.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..fea4f12ff1 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionSettingForProperty.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionSettingForProperty.cs @@ -97,7 +97,8 @@ 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. + /// KEK expired exception. + /// Cancellation token. /// ProtectedDataEncryptionKey object. private async Task ForceRefreshGatewayCacheAndBuildProtectedDataEncryptionKeyAsync( string existingCekEtag, 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/Microsoft.Azure.Cosmos.Encryption.csproj b/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj index 19270da788..3421b335aa 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,8 @@ https://github.com/Azure/azure-cosmos-dotnet-v3 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.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 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 @@ - + + + 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..e6c1a2b8af 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