[JAVA-4647] CSFLE Key rotation from on premises not working. Created: 14/Jun/22  Updated: 21/Jun/22  Resolved: 21/Jun/22

Status: Closed
Project: Java Driver
Component/s: None
Affects Version/s: 4.6.0
Fix Version/s: None

Type: Task Priority: Unknown
Reporter: Dario Maddaluno Assignee: Jeffrey Yemin
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File csfle.java    
Issue Links:
Duplicate

 Description   

I am testing the code for the AWS key rotation for CSFLE and getting the credential from On-Premises. 

Based on this document I am following these steps:

  • Getting the credentials 
  • Adding the credentials to kmsProviderPropertySuppliers
  • Building the autoEncryptionSettings with the kmsProviderPropertySuppliers
  • Add the autoEncryptionSettings  to the mongoClientSettings
  • Create a mongoClient using mongoClientSettings
  • Run the query
  • GETTING NEW credentials 
  • Adding the credentials to kmsProviderPropertySuppliers
  • Building the autoEncryptionSettings with the kmsProviderPropertySuppliers
  • Add the autoEncryptionSettings  to the mongoClientSettings
  • Run the query using the NEW credentials

 My understanding is that I should not create a new client when a new set of AccessKey and SecurityKey is generated. But without creating a new client the new keys are not picked up.

Find attached my code. 

 


Generated at Thu Feb 08 09:02:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.