I implemented mongo field level encryption in spring boot in one of my project. My data encryption keys were kind of rotating with each deployment. Now lately i noticed that for the same field value (say m) for which i was manually checking whether that is present in my db or not, I see multiple entries got created.
To my understanding, i feel that this is due to the rotating key strategy that i used here and using single data-encryption key might solve the issue.
But is there any better approach to this. I want to use rotating key for security purpose.
Reference Material: https://www.mongodb.com/docs/manual/core/security-client-side-encryption/
Any help is much appreciated. Thanks