Skip to content

Fix decryption when client is using AutoEncryptionSettings#4439

Closed
christophstrobl wants to merge 4 commits intomainfrom
issue/4432
Closed

Fix decryption when client is using AutoEncryptionSettings#4439
christophstrobl wants to merge 4 commits intomainfrom
issue/4432

Conversation

@christophstrobl
Copy link
Copy Markdown
Member

This PR makes sure to convert already decrypted entries returned by the driver in case the client is configured with encryption settings.

Additionally it resolves an issue with java.time type conversion.

Resolves: #4432

…toEncryption()

This commit makes sure to convert already decrypted entries returned by the driver in case the client is configured with encryption settings.
This commit makes sure to convert java.time types into their BsonValue representation before encrypting.
Instead of reimplementing conversion we now try to delegate to the native MongoDB codec infrastructure using a custom writer that will only capture values without actually pushing values to an output stream.
mp911de pushed a commit that referenced this pull request Jul 10, 2023
…toEncryption().

This commit makes sure to convert already decrypted entries returned by the driver in case the client is configured with encryption settings.

Closes #4432
Original pull request: #4439
mp911de pushed a commit that referenced this pull request Jul 10, 2023
This commit makes sure to convert java.time types into their BsonValue representation before encrypting.

See #4432
Original pull request: #4439
mp911de pushed a commit that referenced this pull request Jul 10, 2023
Instead of reimplementing conversion we now try to delegate to the native MongoDB codec infrastructure using a custom writer that will only capture values without actually pushing values to an output stream.

See #4432
Original pull request: #4439
mp911de added a commit that referenced this pull request Jul 10, 2023
Reformat code, replace known unsupported constructor with UnsupportedOperationException.

See #4432
Original pull request: #4439
mp911de pushed a commit that referenced this pull request Jul 10, 2023
…toEncryption().

This commit makes sure to convert already decrypted entries returned by the driver in case the client is configured with encryption settings.

Closes #4432
Original pull request: #4439
mp911de pushed a commit that referenced this pull request Jul 10, 2023
This commit makes sure to convert java.time types into their BsonValue representation before encrypting.

See #4432
Original pull request: #4439
mp911de added a commit that referenced this pull request Jul 10, 2023
Reformat code, replace known unsupported constructor with UnsupportedOperationException.

See #4432
Original pull request: #4439
@mp911de mp911de added the type: bug A general bug label Jul 10, 2023
@mp911de mp911de added this to the 4.1.2 (2023.0.2) milestone Jul 10, 2023
@mp911de mp911de closed this Jul 10, 2023
@mp911de mp911de deleted the issue/4432 branch July 10, 2023 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug A general bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ClassCastException when reading (decrypting) using @ExplicitEncrypted on custom type instead of simple type

3 participants