Skip to content

Commit d3ee417

Browse files
authored
CSHARP-5257: Port QE Range protocol to 3.0 (#1470)
1 parent 5e1f3fd commit d3ee417

File tree

110 files changed

+59546
-59008
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+59546
-59008
lines changed
Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,36 @@
11
{
2-
"fields": [
3-
{
4-
"keyId": {
5-
"$binary": {
6-
"base64": "EjRWeBI0mHYSNBI0VniQEg==",
7-
"subType": "04"
8-
}
2+
"fields": [
3+
{
4+
"keyId": {
5+
"$binary": {
6+
"base64": "EjRWeBI0mHYSNBI0VniQEg==",
7+
"subType": "04"
8+
}
9+
},
10+
"path": "encryptedDate",
11+
"bsonType": "date",
12+
"queries": {
13+
"queryType": "range",
14+
"contention": {
15+
"$numberLong": "0"
916
},
10-
"path": "encryptedDate",
11-
"bsonType": "date",
12-
"queries": {
13-
"queryType": "rangePreview",
14-
"sparsity": {
15-
"$numberLong": "1"
16-
},
17-
"min": {
18-
"$date": {
19-
"$numberLong": "0"
20-
}
21-
},
22-
"max": {
23-
"$date": {
24-
"$numberLong": "200"
17+
"trimFactor": {
18+
"$numberInt": "1"
19+
},
20+
"sparsity": {
21+
"$numberLong": "1"
22+
},
23+
"min": {
24+
"$date": {
25+
"$numberLong": "0"
2526
}
27+
},
28+
"max": {
29+
"$date": {
30+
"$numberLong": "200"
2631
}
2732
}
2833
}
29-
]
30-
}
34+
}
35+
]
36+
}
Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
11
{
2-
"fields": [
3-
{
4-
"keyId": {
5-
"$binary": {
6-
"base64": "EjRWeBI0mHYSNBI0VniQEg==",
7-
"subType": "04"
8-
}
2+
"fields": [
3+
{
4+
"keyId": {
5+
"$binary": {
6+
"base64": "EjRWeBI0mHYSNBI0VniQEg==",
7+
"subType": "04"
8+
}
9+
},
10+
"path": "encryptedDecimalNoPrecision",
11+
"bsonType": "decimal",
12+
"queries": {
13+
"queryType": "range",
14+
"contention": {
15+
"$numberLong": "0"
16+
},
17+
"trimFactor": {
18+
"$numberInt": "1"
919
},
10-
"path": "encryptedDecimalNoPrecision",
11-
"bsonType": "decimal",
12-
"queries": {
13-
"queryType": "rangePreview",
14-
"sparsity": {
15-
"$numberInt": "1"
16-
}
20+
"sparsity": {
21+
"$numberLong": "1"
1722
}
1823
}
19-
]
20-
}
21-
24+
}
25+
]
26+
}

specifications/client-side-encryption/prose-tests/etc/data/range-encryptedFields-DecimalPrecision.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,16 @@
1010
"path": "encryptedDecimalPrecision",
1111
"bsonType": "decimal",
1212
"queries": {
13-
"queryType": "rangePreview",
14-
"sparsity": {
13+
"queryType": "range",
14+
"contention": {
15+
"$numberLong": "0"
16+
},
17+
"trimFactor": {
1518
"$numberInt": "1"
1619
},
20+
"sparsity": {
21+
"$numberLong": "1"
22+
},
1723
"min": {
1824
"$numberDecimal": "0.0"
1925
},
@@ -26,4 +32,4 @@
2632
}
2733
}
2834
]
29-
}
35+
}
Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
11
{
2-
"fields": [
3-
{
4-
"keyId": {
5-
"$binary": {
6-
"base64": "EjRWeBI0mHYSNBI0VniQEg==",
7-
"subType": "04"
8-
}
2+
"fields": [
3+
{
4+
"keyId": {
5+
"$binary": {
6+
"base64": "EjRWeBI0mHYSNBI0VniQEg==",
7+
"subType": "04"
8+
}
9+
},
10+
"path": "encryptedDoubleNoPrecision",
11+
"bsonType": "double",
12+
"queries": {
13+
"queryType": "range",
14+
"contention": {
15+
"$numberLong": "0"
16+
},
17+
"trimFactor": {
18+
"$numberInt": "1"
919
},
10-
"path": "encryptedDoubleNoPrecision",
11-
"bsonType": "double",
12-
"queries": {
13-
"queryType": "rangePreview",
14-
"sparsity": {
15-
"$numberLong": "1"
16-
}
20+
"sparsity": {
21+
"$numberLong": "1"
1722
}
1823
}
19-
]
20-
}
21-
24+
}
25+
]
26+
}
Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,35 @@
11
{
2-
"fields": [
3-
{
4-
"keyId": {
5-
"$binary": {
6-
"base64": "EjRWeBI0mHYSNBI0VniQEg==",
7-
"subType": "04"
8-
}
2+
"fields": [
3+
{
4+
"keyId": {
5+
"$binary": {
6+
"base64": "EjRWeBI0mHYSNBI0VniQEg==",
7+
"subType": "04"
8+
}
9+
},
10+
"path": "encryptedDoublePrecision",
11+
"bsonType": "double",
12+
"queries": {
13+
"queryType": "range",
14+
"contention": {
15+
"$numberLong": "0"
16+
},
17+
"trimFactor": {
18+
"$numberInt": "1"
19+
},
20+
"sparsity": {
21+
"$numberLong": "1"
22+
},
23+
"min": {
24+
"$numberDouble": "0.0"
25+
},
26+
"max": {
27+
"$numberDouble": "200.0"
928
},
10-
"path": "encryptedDoublePrecision",
11-
"bsonType": "double",
12-
"queries": {
13-
"queryType": "rangePreview",
14-
"sparsity": {
15-
"$numberLong": "1"
16-
},
17-
"min": {
18-
"$numberDouble": "0.0"
19-
},
20-
"max": {
21-
"$numberDouble": "200.0"
22-
},
23-
"precision": {
24-
"$numberInt": "2"
25-
}
29+
"precision": {
30+
"$numberInt": "2"
2631
}
2732
}
28-
]
29-
}
30-
33+
}
34+
]
35+
}
Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
11
{
2-
"fields": [
3-
{
4-
"keyId": {
5-
"$binary": {
6-
"base64": "EjRWeBI0mHYSNBI0VniQEg==",
7-
"subType": "04"
8-
}
2+
"fields": [
3+
{
4+
"keyId": {
5+
"$binary": {
6+
"base64": "EjRWeBI0mHYSNBI0VniQEg==",
7+
"subType": "04"
8+
}
9+
},
10+
"path": "encryptedInt",
11+
"bsonType": "int",
12+
"queries": {
13+
"queryType": "range",
14+
"contention": {
15+
"$numberLong": "0"
16+
},
17+
"trimFactor": {
18+
"$numberInt": "1"
19+
},
20+
"sparsity": {
21+
"$numberLong": "1"
22+
},
23+
"min": {
24+
"$numberInt": "0"
925
},
10-
"path": "encryptedInt",
11-
"bsonType": "int",
12-
"queries": {
13-
"queryType": "rangePreview",
14-
"sparsity": {
15-
"$numberLong": "1"
16-
},
17-
"min": {
18-
"$numberInt": "0"
19-
},
20-
"max": {
21-
"$numberInt": "200"
22-
}
26+
"max": {
27+
"$numberInt": "200"
2328
}
2429
}
25-
]
26-
}
27-
30+
}
31+
]
32+
}
Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
11
{
2-
"fields": [
3-
{
4-
"keyId": {
5-
"$binary": {
6-
"base64": "EjRWeBI0mHYSNBI0VniQEg==",
7-
"subType": "04"
8-
}
2+
"fields": [
3+
{
4+
"keyId": {
5+
"$binary": {
6+
"base64": "EjRWeBI0mHYSNBI0VniQEg==",
7+
"subType": "04"
8+
}
9+
},
10+
"path": "encryptedLong",
11+
"bsonType": "long",
12+
"queries": {
13+
"queryType": "range",
14+
"contention": {
15+
"$numberLong": "0"
16+
},
17+
"trimFactor": {
18+
"$numberInt": "1"
19+
},
20+
"sparsity": {
21+
"$numberLong": "1"
22+
},
23+
"min": {
24+
"$numberLong": "0"
925
},
10-
"path": "encryptedLong",
11-
"bsonType": "long",
12-
"queries": {
13-
"queryType": "rangePreview",
14-
"sparsity": {
15-
"$numberLong": "1"
16-
},
17-
"min": {
18-
"$numberLong": "0"
19-
},
20-
"max": {
21-
"$numberLong": "200"
22-
}
26+
"max": {
27+
"$numberLong": "200"
2328
}
2429
}
25-
]
26-
}
27-
30+
}
31+
]
32+
}

specifications/client-side-encryption/tests/legacy/fle2v2-Compact.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@
130130
"command": {
131131
"compactStructuredEncryptionData": "default"
132132
}
133+
},
134+
"result": {
135+
"ok": 1
133136
}
134137
}
135138
],

specifications/client-side-encryption/tests/legacy/fle2v2-Compact.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Requires libmongocrypt 1.8.0.
1+
# Requires libmongocrypt 1.8.0. libmongocrypt 1.10.0 has a bug (MONGOCRYPT-699) that may cause this test to fail on server version 7.
22
runOn:
33
- minServerVersion: "7.0.0"
44
# Skip QEv2 (also referred to as FLE2v2) tests on Serverless. Unskip once Serverless enables the QEv2 protocol.
@@ -22,6 +22,8 @@ tests:
2222
arguments:
2323
command:
2424
compactStructuredEncryptionData: *collection_name
25+
result:
26+
ok: 1
2527
expectations:
2628
- command_started_event:
2729
command:

0 commit comments

Comments
 (0)