|
Working with matt.broadstone on some test failures, and happened to run across something while stepping through the type=int spec test. I see the following commands being sent to be marked by mongocryptd:
{"insert": "default", "ordered": true, "documents": [{"_id": 1, "encrypted_int": 123}], "jsonSchema": {"properties": {"encrypted_int": {"encrypt": {"keyId": [{"$binary": "AAAAAAAAAAAAAAAAAAAAAA==", "$type": "04"}], "bsonType": "int", "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"}}}, "bsonType": "object"}, "isRemoteSchema": false}
|
|
{"find": "datakeys", "filter": {"$or": [{"_id": {"$in": [{"$binary": "AAAAAAAAAAAAAAAAAAAAAA==", "$type": "04"}]}}, {"keyAltNames": {"$in": []}}]}, "jsonSchema": {}, "isRemoteSchema": true}
|
|
{"find": "default", "filter": {"_id": 1}, "jsonSchema": {"properties": {"encrypted_int": {"encrypt": {"keyId": [{"$binary": "AAAAAAAAAAAAAAAAAAAAAA==", "$type": "04"}], "bsonType": "int", "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"}}}, "bsonType": "object"}, "isRemoteSchema": false}
|
The first and third are expected, but the second surprised me. This is the key vault query, and there is no local or remote schema for the key vault collection, so I would not expect the state machine to enter the NEED_MONGO_MARKINGS state at all.
|