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: Adds fix to retain the original key vault error/exception and upgrades core SDK package dependency. #3200

Merged
merged 22 commits into from
Jun 1, 2022
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
e7e12d2
multi task each encryption/decryption.
kr-santosh May 16, 2022
2899c0c
Merge branch 'master' into users/sakulk/thrdCryptoOp
kr-santosh May 16, 2022
fe90148
Update EncryptionProcessor.cs
kr-santosh May 17, 2022
f431a67
Merge branch 'master' into users/sakulk/thrdCryptoOp
kr-santosh May 17, 2022
7def355
Update EncryptionProcessor.cs
kr-santosh May 17, 2022
1a505a3
Merge branch 'users/sakulk/thrdCryptoOp' of https://github.com/Azure/…
kr-santosh May 17, 2022
74ea1a5
Update EncryptionProcessor.cs
kr-santosh May 17, 2022
ff8c1d0
Update EncryptionProcessor.cs
kr-santosh May 17, 2022
15b92b3
Update EncryptionProcessor.cs
kr-santosh May 17, 2022
8e6b23d
Update EncryptionProcessor.cs
kr-santosh May 17, 2022
8a7299e
Update to latest package.
kr-santosh May 20, 2022
cfebc6f
Update EncryptionProcessor.cs
kr-santosh May 20, 2022
ae9aec1
Merge branch 'master' into users/sakulk/thrdCryptoOp
kr-santosh May 20, 2022
c10a77f
Update changelog.md
kr-santosh May 23, 2022
d18932e
Update EncryptionSettingForProperty.cs
kr-santosh May 23, 2022
c48f2b8
Update Microsoft.Azure.Cosmos.Encryption.csproj
kr-santosh May 26, 2022
804f062
Update Directory.Build.props
kr-santosh May 30, 2022
bab216b
Merge branch 'master' into users/sakulk/thrdCryptoOp
kr-santosh May 30, 2022
c0eb0ae
Merge branch 'master' into users/sakulk/thrdCryptoOp
j82w Jun 1, 2022
ad33a42
Update changelog.md
kr-santosh Jun 1, 2022
20e66fb
Merge branch 'users/sakulk/thrdCryptoOp' of https://github.com/Azure/…
kr-santosh Jun 1, 2022
f559d1b
Update changelog.md
kr-santosh Jun 1, 2022
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
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<ClientPreviewVersion>3.27.1</ClientPreviewVersion>
<ClientPreviewSuffixVersion>preview</ClientPreviewSuffixVersion>
<DirectVersion>3.28.1</DirectVersion>
<EncryptionOfficialVersion>1.0.0</EncryptionOfficialVersion>
<EncryptionPreviewVersion>1.0.0</EncryptionPreviewVersion>
<EncryptionPreviewSuffixVersion>preview20</EncryptionPreviewSuffixVersion>
<EncryptionOfficialVersion>1.0.1</EncryptionOfficialVersion>
kr-santosh marked this conversation as resolved.
Show resolved Hide resolved
<EncryptionPreviewVersion>1.0.1</EncryptionPreviewVersion>
<EncryptionPreviewSuffixVersion>preview</EncryptionPreviewSuffixVersion>
<CustomEncryptionVersion>1.0.0-preview03</CustomEncryptionVersion>
<HybridRowVersion>1.1.0-preview3</HybridRowVersion>
<LangVersion>10.0</LangVersion>
Expand Down
11 changes: 11 additions & 0 deletions Microsoft.Azure.Cosmos.Encryption/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


### <a name="1.0.1"/> [1.0.1](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Encryption/1.0.1) - 2022-05-23
kr-santosh marked this conversation as resolved.
Show resolved Hide resolved

#### Added
- [#3200](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3200) Adds fix to retain the original key vault error/exception and upgrades core SDK package dependency.

### <a name="1.0.0-previewV21"/> [1.0.0-previewV21](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Encryption/1.0.0-previewV21) - 2022-05-23
kr-santosh marked this conversation as resolved.
Show resolved Hide resolved

#### Added
- [#3200](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3200) Adds fix to retain the original key vault error/exception and upgrades core SDK preview package dependency.

### <a name="1.0.0"/> [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Encryption/1.0.0) - 2022-03-22

#### Added
- [#3070](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3070) Adds support for preview and non-preview version of Cosmos SDK in Encryption package.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public async Task<AeadAes256CbcHmac256EncryptionAlgorithm> BuildEncryptionAlgori
// bail out if this fails.
protectedDataEncryptionKey = await this.ForceRefreshGatewayCacheAndBuildProtectedDataEncryptionKeyAsync(
existingCekEtag: clientEncryptionKeyProperties.ETag,
refreshRetriedOnException: exOnRetry,
cancellationToken: cancellationToken);
}
}
Expand All @@ -100,6 +101,7 @@ public async Task<AeadAes256CbcHmac256EncryptionAlgorithm> BuildEncryptionAlgori
/// <returns>ProtectedDataEncryptionKey object. </returns>
private async Task<ProtectedDataEncryptionKey> ForceRefreshGatewayCacheAndBuildProtectedDataEncryptionKeyAsync(
string existingCekEtag,
Exception refreshRetriedOnException,
CancellationToken cancellationToken)
{
ClientEncryptionKeyProperties clientEncryptionKeyProperties;
Expand All @@ -123,7 +125,7 @@ private async Task<ProtectedDataEncryptionKey> ForceRefreshGatewayCacheAndBuildP
// looks like the key was never rewrapped with a valid Key Encryption Key.
throw new EncryptionCosmosException(
$"The Client Encryption Key with key id:{this.ClientEncryptionKeyId} on database:{this.encryptionContainer.Database.Id} and container:{this.encryptionContainer.Id} , needs to be rewrapped with a valid Key Encryption Key using RewrapClientEncryptionKeyAsync. " +
$" The Key Encryption Key used to wrap the Client Encryption Key has been revoked: {ex.Message}." +
$" The Key Encryption Key used to wrap the Client Encryption Key has been revoked: {refreshRetriedOnException.Message}. {ex.Message}." +
$" Please refer to https://aka.ms/CosmosClientEncryption for more details. ",
HttpStatusCode.BadRequest,
int.Parse(Constants.IncorrectContainerRidSubStatus),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
</ItemGroup>

<ItemGroup Condition=" '$(SdkProjectRef)' != 'True' AND '$(IsPreview)' != 'True' ">
<PackageReference Include="Microsoft.Azure.Cosmos" Version="[3.26.0,3.27)" />
<PackageReference Include="Microsoft.Azure.Cosmos" Version="[3.26.2,3.28)" />
kr-santosh marked this conversation as resolved.
Show resolved Hide resolved
j82w marked this conversation as resolved.
Show resolved Hide resolved
</ItemGroup>

<ItemGroup Condition=" '$(SdkProjectRef)' != 'True' AND '$(IsPreview)' == 'True' ">
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.26.0-preview" />
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.27.1-preview" />
</ItemGroup>

<ItemGroup Condition=" '$(SdkProjectRef)' == 'True' ">
Expand Down
Loading