Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MONGOCRYPT-572 remove QE-V1 code and tests #934

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"db.test": {
"escCollection": "esc",
"eccCollection": "ecc",
"ecocCollection": "ecoc",
"fields": [
{
Expand Down
2 changes: 0 additions & 2 deletions bindings/python/test/data/encrypted-field-config-map.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"test.test": {
"escCollection": "fle2.basic.esc",
"eccCollection": "fle2.basic.ecc",
"ecocCollection": "fle2.basic.ecoc",
"fields": [
{
Expand All @@ -24,7 +23,6 @@
},
"test.test2": {
"escCollection": "fle2.basic.esc",
"eccCollection": "fle2.basic.ecc",
"ecocCollection": "fle2.basic.ecoc",
"fields": [
{
Expand Down
250 changes: 6 additions & 244 deletions src/mongocrypt-ctx-encrypt.c

Large diffs are not rendered by default.

575 changes: 19 additions & 556 deletions src/mongocrypt-marking.c

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions src/mongocrypt-opts-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,6 @@ typedef struct {
bool use_need_mongo_collinfo_with_db_state;
bool bypass_query_analysis;

// When creating new encrypted payloads,
// use V2 variants of the FLE2 datatypes.
bool use_fle2_v2;

// Use the Queryable Encryption Range V2 protocol.
bool use_range_v2;
} _mongocrypt_opts_t;
Expand Down
11 changes: 0 additions & 11 deletions src/mongocrypt-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,4 @@ bool _mongocrypt_needs_credentials_for_provider(mongocrypt_t *crypt,
_mongocrypt_kms_provider_t provider,
const char *name);

/**
* Enable/disable the use of FLE2v2 payload types for write.
*
* @param[in] crypt The @ref mongocrypt_t object.
* @param[in] enable Whether to enable use of FLE2v2 payloads.
*
* @returns A boolean indicating success. If false, an error status is set.
* Retrieve it with @ref mongocrypt_status
*/
bool mongocrypt_setopt_fle2v2(mongocrypt_t *crypt, bool enable);

#endif /* MONGOCRYPT_PRIVATE_H */
9 changes: 0 additions & 9 deletions src/mongocrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ mongocrypt_t *mongocrypt_new(void) {
crypt->status = mongocrypt_status_new();
_mongocrypt_opts_init(&crypt->opts);
_mongocrypt_log_init(&crypt->log);
// Default to using FLEv2 (aka QEv2)
crypt->opts.use_fle2_v2 = true;
crypt->ctx_counter = 1;
crypt->cache_oauth = mc_mapof_kmsid_to_token_new();
crypt->csfle = (_mongo_crypt_v1_vtable){.okay = false};
Expand Down Expand Up @@ -148,13 +146,6 @@ mongocrypt_t *mongocrypt_new(void) {
} \
}

bool mongocrypt_setopt_fle2v2(mongocrypt_t *crypt, bool enable) {
ASSERT_MONGOCRYPT_PARAM_UNINIT(crypt);

crypt->opts.use_fle2_v2 = enable;
return true;
}

bool mongocrypt_setopt_use_range_v2(mongocrypt_t *crypt) {
ASSERT_MONGOCRYPT_PARAM_UNINIT(crypt);

Expand Down
20 changes: 0 additions & 20 deletions test/data/bulkWrite/jsonSchema/cmd.json

This file was deleted.

19 changes: 0 additions & 19 deletions test/data/collection-info-no-schema.json

This file was deleted.

1 change: 0 additions & 1 deletion test/data/compact/anchor-pad/collinfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"options": {
"encryptedFields": {
"escCollection": "esc",
"eccCollection": "ecc",
"ecocCollection": "ecoc",
"fields": [
{
Expand Down
41 changes: 20 additions & 21 deletions test/data/compact/anchor-pad/encrypted-payload-range-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"schema": {
"db.test": {
"escCollection": "esc",
"eccCollection": "ecc",
"ecocCollection": "ecoc",
"fields": [
{
Expand Down Expand Up @@ -82,24 +81,24 @@
"subType": "00"
}
}
},
"nested.notindexed": {
"$binary": {
"base64": "27J6DZqcjkRzZ3lWEsxH7CsQHr4CZirrGmuPS8ZkRO0=",
"subType": "00"
}
},
"nested.encrypted": {
"$binary": {
"base64": "SWO8WEoZ2r2Kx/muQKb7+COizy85nIIUFiHh4K9kcvA=",
"subType": "00"
}
},
"encrypted": {
"$binary": {
"base64": "noN+05JsuO1oDg59yypIGj45i+eFH6HOTXOPpeZ//Mk=",
"subType": "00"
}
}
},
"nested.notindexed": {
"$binary": {
"base64": "27J6DZqcjkRzZ3lWEsxH7CsQHr4CZirrGmuPS8ZkRO0=",
"subType": "00"
}
},
"nested.encrypted": {
"$binary": {
"base64": "SWO8WEoZ2r2Kx/muQKb7+COizy85nIIUFiHh4K9kcvA=",
"subType": "00"
}
},
"encrypted": {
"$binary": {
"base64": "noN+05JsuO1oDg59yypIGj45i+eFH6HOTXOPpeZ//Mk=",
"subType": "00"
}
}
}
}
}
3 changes: 1 addition & 2 deletions test/data/compact/missing-key-id/collinfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"options": {
"encryptedFields": {
"escCollection": "fle2.basic.esc",
"eccCollection": "fle2.basic.ecc",
"ecocCollection": "fle2.basic.ecoc",
"fields": [
{
Expand All @@ -16,6 +15,6 @@
}
}
]
}
}
}
}
1 change: 0 additions & 1 deletion test/data/compact/no-fields/collinfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"options": {
"encryptedFields": {
"escCollection": "esc",
"eccCollection": "ecc",
"ecocCollection": "ecoc",
"fields": []
}
Expand Down
1 change: 0 additions & 1 deletion test/data/compact/no-range/collinfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"options": {
"encryptedFields": {
"escCollection": "esc",
"eccCollection": "ecc",
"ecocCollection": "ecoc",
"fields": [
{
Expand Down
47 changes: 0 additions & 47 deletions test/data/compact/no-range/encrypted-field-config-map.json

This file was deleted.

1 change: 0 additions & 1 deletion test/data/compact/success/collinfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"options": {
"encryptedFields": {
"escCollection": "esc",
"eccCollection": "ecc",
"ecocCollection": "ecoc",
"fields": [
{
Expand Down
1 change: 0 additions & 1 deletion test/data/compact/success/encrypted-field-config-map.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"db.test": {
"escCollection": "esc",
"eccCollection": "ecc",
"ecocCollection": "ecoc",
"fields": [
{
Expand Down
41 changes: 20 additions & 21 deletions test/data/compact/success/encrypted-payload-range-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"schema": {
"db.test": {
"escCollection": "esc",
"eccCollection": "ecc",
"ecocCollection": "ecoc",
"fields": [
{
Expand Down Expand Up @@ -81,24 +80,24 @@
"subType": "00"
}
}
},
"nested.notindexed": {
"$binary": {
"base64": "27J6DZqcjkRzZ3lWEsxH7CsQHr4CZirrGmuPS8ZkRO0=",
"subType": "00"
}
},
"nested.encrypted": {
"$binary": {
"base64": "SWO8WEoZ2r2Kx/muQKb7+COizy85nIIUFiHh4K9kcvA=",
"subType": "00"
}
},
"encrypted": {
"$binary": {
"base64": "noN+05JsuO1oDg59yypIGj45i+eFH6HOTXOPpeZ//Mk=",
"subType": "00"
}
}
},
"nested.notindexed": {
"$binary": {
"base64": "27J6DZqcjkRzZ3lWEsxH7CsQHr4CZirrGmuPS8ZkRO0=",
"subType": "00"
}
},
"nested.encrypted": {
"$binary": {
"base64": "SWO8WEoZ2r2Kx/muQKb7+COizy85nIIUFiHh4K9kcvA=",
"subType": "00"
}
},
"encrypted": {
"$binary": {
"base64": "noN+05JsuO1oDg59yypIGj45i+eFH6HOTXOPpeZ//Mk=",
"subType": "00"
}
}
}
}
}
3 changes: 1 addition & 2 deletions test/data/dollardb/omitted/cmd-to-mongocryptd.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"schema": {
"db.test": {
"escCollection": "esc",
"eccCollection": "ecc",
"ecocCollection": "ecoc",
"fields": [
{
Expand All @@ -31,4 +30,4 @@
}
}
}
}
}
3 changes: 1 addition & 2 deletions test/data/dollardb/omitted/collinfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"options": {
"encryptedFields": {
"escCollection": "esc",
"eccCollection": "ecc",
"ecocCollection": "ecoc",
"fields": [
{
Expand All @@ -24,4 +23,4 @@
]
}
}
}
}
5 changes: 2 additions & 3 deletions test/data/dollardb/omitted/encrypted-payload.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"filter": {
"value": {
"$binary": {
"base64": "BbEAAAAFZAAgAAAAAE8KGPgq7h3n9nH5lfHcia8wtOTLwGkZNLBesb6PULqbBXMAIAAAAACq0558QyD3c3jkR5k0Zc9UpQK8ByhXhtn2d1xVQnuJ3AVjACAAAAAA1003zUWGwD4zVZ0KeihnZOthS3V6CEHUfnJZcIYHefIFZQAgAAAAAOuac/eRLYakKX6B0vZ1r3QodOQFfjqJD+xlGiPu4/PsEmNtAAAAAAAAAAAAAA==",
"base64": "DIkAAAAFZAAgAAAAAE8KGPgq7h3n9nH5lfHcia8wtOTLwGkZNLBesb6PULqbBXMAIAAAAACq0558QyD3c3jkR5k0Zc9UpQK8ByhXhtn2d1xVQnuJ3AVsACAAAAAAlO36MaVLVRDFW6xrI+0UTkyQdFfSCEBPkZg8sFzuTJYSY20AAAAAAAAAAAAA",
"subType": "06"
}
}
Expand All @@ -13,7 +13,6 @@
"schema": {
"db.test": {
"escCollection": "esc",
"eccCollection": "ecc",
"ecocCollection": "ecoc",
"fields": [
{
Expand All @@ -36,4 +35,4 @@
}
}
}
}
}
3 changes: 1 addition & 2 deletions test/data/dollardb/omitted/mongocryptd-reply.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"schema": {
"db.test": {
"escCollection": "esc",
"eccCollection": "ecc",
"ecocCollection": "ecoc",
"fields": [
{
Expand All @@ -42,4 +41,4 @@
}
},
"hasEncryptedPlaceholders": true
}
}
Loading
Loading