I have a working application Spring Boot + Mongo DB. Spring boot 3.1 Java 17 Mongo 7 I have one collection which generates dynamically and all are working fine.
Now, I’m trying to integrate the CSFLE with my existing app. When I did CSFLE POC, it worked well and got the decrypted data and stored the date in encrypted, etc.
After integrating the CSFLE I’m getting the below error.
"Automatic client-side field level encryption supports the $lookup and $graphLookup only if the from collection matches the collection on which the aggregation runs (i.e. self-lookup operations). $lookup and $graphLookup stages that reference a different from collection return an error. " Also this as well when I tried to comment on the generation of the schema using “DB.runCommand(new Document(“collMod”, collStr).append(“validator”, jsonSchemaWrapper(schema)));” as per tutorials suggests.
After comments, I’m getting below error and couldn’t to fix below error
Pipeline over an encrypted collection cannot reference additional collections
Even though there is no encryption field in this collection, still shows the above error. I mean the actual encryption data is present in the different collections.
I have tried the below link for the debugging and reference but no luck. Any suggestion or fix on this issue or any better approach for CSFLE integration on existing applications?
src code ref: GitHub - mongodb-developer/mongodb-java-spring-boot-csfle: This repository contains a Java Spring Boot template to start a MongoDB project with CSFLE. How to Implement Client-Side Field Level Encryption (CSFLE) in Java with Spring Data MongoDB | MongoDB