-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Client Side Encryption
-
None
-
None
-
None
-
None
-
None
-
None
-
None
I'm using client-side field-level encryption. I realized when the driver wants to fetch the key from db, it uses com.mongodb.client.internal.KeyRetriever class internally:
public List<BsonDocument> find(final BsonDocument keyFilter) {
return client.getDatabase(namespace.getDatabaseName()).getCollection(namespace.getCollectionName(), BsonDocument.class)
.withReadConcern(ReadConcern.MAJORITY)
.find(keyFilter).into(new ArrayList<BsonDocument>());
}
I can see readConcern has set to majority. This one leads to a problem since I use a PSA architecture and I disabled the majority read concern as it's suggested in the MongoDB documentation
this method should respect the client setting that I've provided while creating the client:
ClientEncryptionSettings clientEncryptionSettings = ClientEncryptionSettings.builder()
.keyVaultMongoClientSettings(MongoClientSettings.builder()
.applyConnectionString(new ConnectionString(mongodbUri))
.readConcern(ReadConcern.AVAILABLE)
.build())
but it doesn't
- is related to
-
DRIVERS-1960 Make read concern and write concern for key vault configurable
-
- Backlog
-