Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client Encryption : Fixes query support on encrypted parameters and fixes samples #2445

Merged
merged 58 commits into from
May 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
9f14c48
Remove caching of AeadAes256CbcHmac256EncryptionAlgorithm object
kr-santosh Mar 11, 2021
f5c8441
Merge branch 'master' into users/sakulk/removealgocaching
kr-santosh Mar 11, 2021
7fa67b6
Update DotNetPreviewSDKAPI.json
kr-santosh Mar 11, 2021
9755436
Merge branch 'master' into users/sakulk/removealgocaching
kr-santosh Mar 22, 2021
bc81034
Merge branch 'master' into users/sakulk/removealgocaching
kr-santosh Mar 25, 2021
5fea326
Merge branch 'master' into users/sakulk/removealgocaching
kr-santosh Mar 29, 2021
e695aa8
Updates to latest Cryptography package.Test updates.
kr-santosh Mar 29, 2021
86ed4b5
Minor Refactoring.
kr-santosh Mar 29, 2021
5a02a6c
Fixes as per review comments.
kr-santosh Mar 29, 2021
c038300
Changes as per review comments.
kr-santosh Apr 9, 2021
f780a77
Merge branch 'master' into users/sakulk/removealgocaching
kr-santosh Apr 9, 2021
02a394c
Update MdeCustomEncryptionTests.cs
kr-santosh Apr 9, 2021
10f97eb
Updated contracts.
kr-santosh Apr 9, 2021
9310436
Update MdeEncryptionTests.cs
kr-santosh Apr 9, 2021
0ebd6f4
Merge branch 'master' into users/sakulk/removealgocaching
kr-santosh Apr 14, 2021
67a13bb
Fixes Encryption Cosmos Client Encryption Policy and Keys cache.
kr-santosh Apr 20, 2021
0985bae
Update EncryptionContainer.cs
kr-santosh Apr 20, 2021
fe75344
Update EncryptionContainer.cs
kr-santosh Apr 20, 2021
a5360b7
Merge branch 'master' of https://github.com/Azure/azure-cosmos-dotnet-v3
kr-santosh Apr 20, 2021
03c3fdb
Merge branch 'master' into users/sakulk/fixclientcache
kr-santosh Apr 20, 2021
1841a51
Update EncryptionCosmosClient.cs
kr-santosh Apr 20, 2021
8456a91
Fixes.
kr-santosh Apr 27, 2021
cf2392d
Merge branch 'master' of https://github.com/Azure/azure-cosmos-dotnet-v3
kr-santosh Apr 27, 2021
51fbdb0
Merge branch 'master' into users/sakulk/fixclientcache
kr-santosh Apr 27, 2021
2f08396
Fixes.
kr-santosh Apr 27, 2021
e3c2e2d
Fixes as per review comments and Refactoring.
kr-santosh Apr 28, 2021
69b361a
Refactoring
kr-santosh Apr 28, 2021
1862729
Update EncryptionContainer.cs
kr-santosh Apr 28, 2021
fa8897a
Merge branch 'master' into users/sakulk/fixclientcache
kr-santosh Apr 28, 2021
5a5dfec
Update EncryptionSettingForProperty.cs
kr-santosh Apr 28, 2021
b8900d8
Merge branch 'master' of https://github.com/Azure/azure-cosmos-dotnet-v3
kr-santosh Apr 29, 2021
77930c5
Merge branch 'master' into users/sakulk/fixclientcache
kr-santosh Apr 29, 2021
1a0b2d6
Fixes as per review comments.
kr-santosh Apr 30, 2021
13b356d
Merge branch 'master' of https://github.com/Azure/azure-cosmos-dotnet-v3
kr-santosh Apr 30, 2021
05591d2
Merge branch 'master' into users/sakulk/fixclientcache
kr-santosh Apr 30, 2021
d55161e
Update EncryptionContainer.cs
kr-santosh Apr 30, 2021
a0e3037
Fixes as per review comments.
kr-santosh Apr 30, 2021
01ea0be
Update EncryptionContainer.cs
kr-santosh Apr 30, 2021
32261f7
Fixes as per review comments.
kr-santosh Apr 30, 2021
dcb30f5
Fixes as per review comments.
kr-santosh May 1, 2021
c004ffc
Allows object values for Queries on Encrypted Parameter
kr-santosh May 4, 2021
cbd1c69
Merge branch 'master' of https://github.com/Azure/azure-cosmos-dotnet-v3
kr-santosh May 4, 2021
53f4441
Merge branch 'master' into users/sakulk/fixQueryObjAndRWWoAccess
kr-santosh May 4, 2021
5cc28a7
Fixes and Updated Sample Code.
kr-santosh May 6, 2021
5c711c6
Merge branch 'master' of https://github.com/Azure/azure-cosmos-dotnet-v3
kr-santosh May 7, 2021
10d930f
Merge branch 'master' into users/sakulk/fixQueryObjAndRWWoAccess
kr-santosh May 7, 2021
d97d15a
Reverts.
kr-santosh May 7, 2021
1d0ffd4
Reverts
kr-santosh May 7, 2021
9b20293
Fixes as per review comments.
kr-santosh May 7, 2021
fd221c4
Update Program.cs
kr-santosh May 7, 2021
8a2cf90
Update Encryption.csproj
kr-santosh May 7, 2021
aa03e98
Merge branch 'master' of https://github.com/Azure/azure-cosmos-dotnet-v3
kr-santosh May 11, 2021
969f299
Merge branch 'master' into users/sakulk/fixQueryObjAndRWWoAccess
kr-santosh May 11, 2021
aa83cdd
Fixes as per review comments.
kr-santosh May 12, 2021
6116dc1
Fixed issue with Multi DataType array.
kr-santosh May 13, 2021
6ab6384
Merge branch 'master' of https://github.com/Azure/azure-cosmos-dotnet-v3
kr-santosh May 13, 2021
ec82b07
Merge branch 'master' into users/sakulk/fixQueryObjAndRWWoAccess
kr-santosh May 13, 2021
e8f6738
Refactoring.
kr-santosh May 13, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ public static async Task<ClientEncryptionKeyResponse> CreateClientEncryptionKeyA

EncryptionKeyStoreProvider encryptionKeyStoreProvider = encryptionCosmosClient.EncryptionKeyStoreProvider;

if (!string.Equals(encryptionKeyWrapMetadata.Type, encryptionKeyStoreProvider.ProviderName))
{
throw new ArgumentException("The EncryptionKeyWrapMetadata Type value does not match with the ProviderName of EncryptionKeyStoreProvider configured on the Client. Please refer to https://aka.ms/CosmosClientEncryption for more details. ");
}

KeyEncryptionKey keyEncryptionKey = KeyEncryptionKey.GetOrCreate(
encryptionKeyWrapMetadata.Name,
encryptionKeyWrapMetadata.Value,
Expand Down Expand Up @@ -156,6 +161,11 @@ public static async Task<ClientEncryptionKeyResponse> RewrapClientEncryptionKeyA

EncryptionKeyStoreProvider encryptionKeyStoreProvider = encryptionCosmosClient.EncryptionKeyStoreProvider;

if (!string.Equals(newEncryptionKeyWrapMetadata.Type, encryptionKeyStoreProvider.ProviderName))
{
throw new ArgumentException("The EncryptionKeyWrapMetadata Type value does not match with the ProviderName of EncryptionKeyStoreProvider configured on the Client. Please refer to https://aka.ms/CosmosClientEncryption for more details. ");
}

ClientEncryptionKeyProperties clientEncryptionKeyProperties = await clientEncryptionKey.ReadAsync(cancellationToken: cancellationToken);

RequestOptions requestOptions = new RequestOptions
Expand Down
Loading