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 System.Text custom serializer issue with DataEncryptionKeyContainer operations. #3386

Merged
merged 12 commits into from
Aug 19, 2022

Conversation

kr-santosh
Copy link
Contributor

@kr-santosh kr-santosh commented Aug 16, 2022

Description

DataEncryptionProperties which is the core class for encryption keys in custom model is based on NewtonSoft JSON serialization and uses NewtonSoft property attribute to serialize certain members in the class which is not compatible with System.Text JSON serialization. Hence when a client is configured with custom serializer using System.Text and the same client is used for creating keys using DataEncryptiuonKeyContainer operations like CreateDataEncryptionKeyAsync it fails.

So, the idea is to use stream APIs to create client encryption key items using internal Cosmos JSON serializer to store and retrieve the data encryption keys.

Type of change

  • [] Bug fix (non-breaking change which fixes an issue)

@kr-santosh kr-santosh marked this pull request as ready for review August 16, 2022 06:10
@kr-santosh kr-santosh changed the title Client Encryption: Fixes custom serializer issue with DataEncryptionKeyContainer operations. Client Encryption: Fixes Sysytem.Text custom serializer issue with DataEncryptionKeyContainer operations. Aug 16, 2022
@kr-santosh kr-santosh changed the title Client Encryption: Fixes Sysytem.Text custom serializer issue with DataEncryptionKeyContainer operations. Client Encryption: Fixes System.Text custom serializer issue with DataEncryptionKeyContainer operations. Aug 18, 2022
Copy link
Contributor

@abhijitpai abhijitpai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕐

ealsur
ealsur previously approved these changes Aug 18, 2022
abhijitpai
abhijitpai previously approved these changes Aug 18, 2022
Copy link
Contributor

@abhijitpai abhijitpai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@ealsur
Copy link
Member

ealsur commented Aug 19, 2022

/azp run

@ealsur ealsur enabled auto-merge (squash) August 19, 2022 14:39
@ealsur ealsur merged commit 0dcd4a8 into master Aug 19, 2022
@ealsur ealsur deleted the users/sakulk/fixDekSystemText branch August 19, 2022 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants