[MONGOCRYPT-435] createIndexes and create break with bypassQueryAnalysis: true Created: 02/Jun/22  Updated: 28/Oct/23  Resolved: 02/Jun/22

Status: Closed
Project: Libmongocrypt
Component/s: None
Affects Version/s: 1.5.0-rc0
Fix Version/s: 1.5.0-rc1, 1.5.0

Type: Bug Priority: Major - P3
Reporter: Anna Henningsen Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by MONGOSH-1245 Re-enable KeyVault._init() after libm... Closed
Related
is related to MONGOCRYPT-429 Do not bypass create, collMod, or cre... Closed
Binding Changes: Not Needed

 Description   

Reproducible through e.g.

import { MongoClient } from 'mongodb';
 
const client = await MongoClient.connect('mongodb://localhost/', {
  autoEncryption: {
    bypassQueryAnalysis: true,
    kmsProviders: { local: { key: 'A'.repeat(128) } }
  }
});
 
client.db('test').collection('test').createIndex({ a: 1 });

in the Node.js driver, but almost certainly breaking regardless of driver. The commands which result in a version check against mongocryptd are being run when bypassQueryAnalysis: true is set, but in that case no csfle library or mongocryptd is available and the drivers do not expect to enter a MONGOCRYPT_CTX_NEED_MONGO_MARKINGS state.



 Comments   
Comment by Githook User [ 02/Jun/22 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: MONGOCRYPT-435 do not run ismaster check if bypassing query analysis (#354)
Branch: master
https://github.com/mongodb/libmongocrypt/commit/208cab43838245a7dd4a76d3451f9e031fe8a055

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