Skip to content

Commit 4b6f555

Browse files
authored
GODRIVER-1832 add CSFLE internal client (#564) (#581)
1 parent fda5d25 commit 4b6f555

Some content is hidden

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

58 files changed

+364
-752
lines changed

data/client-side-encryption/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ For each KMS provider (``aws``, ``azure``, ``gcp``, and ``local``), referred to
318318

319319
- Expect the return value to be a BSON binary subtype 6, referred to as ``encrypted``.
320320
- Use ``client_encrypted`` to insert ``{ _id: "<provider_name>", "value": <encrypted> }`` into ``db.coll``.
321-
- Use ``client_encrypted`` to run a find querying with ``_id`` of "<provider_name>" and expect ``value`` to be "hello local".
321+
- Use ``client_encrypted`` to run a find querying with ``_id`` of "<provider_name>" and expect ``value`` to be "hello <provider_name>".
322322

323323
#. Call ``client_encryption.encrypt()`` with the value "hello <provider_name>", the algorithm ``AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic``, and the ``key_alt_name`` of ``<provider_name>_altname``.
324324

data/client-side-encryption/aggregate.json

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -150,18 +150,6 @@
150150
"command_name": "listCollections"
151151
}
152152
},
153-
{
154-
"command_started_event": {
155-
"command": {
156-
"listCollections": 1,
157-
"filter": {
158-
"name": "datakeys"
159-
},
160-
"$db": "keyvault"
161-
},
162-
"command_name": "listCollections"
163-
}
164-
},
165153
{
166154
"command_started_event": {
167155
"command": {
@@ -273,18 +261,6 @@
273261
"command_name": "aggregate"
274262
}
275263
},
276-
{
277-
"command_started_event": {
278-
"command": {
279-
"listCollections": 1,
280-
"filter": {
281-
"name": "datakeys"
282-
},
283-
"$db": "keyvault"
284-
},
285-
"command_name": "listCollections"
286-
}
287-
},
288264
{
289265
"command_started_event": {
290266
"command": {

data/client-side-encryption/aggregate.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,6 @@ tests:
3030
filter:
3131
name: *collection_name
3232
command_name: listCollections
33-
- command_started_event:
34-
command:
35-
listCollections: 1
36-
filter:
37-
name: "datakeys"
38-
$db: keyvault
39-
command_name: listCollections
4033
# Then key is fetched from the key vault.
4134
- command_started_event:
4235
command:
@@ -83,13 +76,6 @@ tests:
8376
cursor: {}
8477
command_name: aggregate
8578
# Needs to fetch key when decrypting results
86-
- command_started_event:
87-
command:
88-
listCollections: 1
89-
filter:
90-
name: "datakeys"
91-
$db: keyvault
92-
command_name: listCollections
9379
# Then key is fetched from the key vault.
9480
- command_started_event:
9581
command:

data/client-side-encryption/azureKMS.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -139,18 +139,6 @@
139139
"command_name": "listCollections"
140140
}
141141
},
142-
{
143-
"command_started_event": {
144-
"command": {
145-
"listCollections": 1,
146-
"filter": {
147-
"name": "datakeys"
148-
},
149-
"$db": "keyvault"
150-
},
151-
"command_name": "listCollections"
152-
}
153-
},
154142
{
155143
"command_started_event": {
156144
"command": {

data/client-side-encryption/azureKMS.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,6 @@ tests:
2525
filter:
2626
name: *collection_name
2727
command_name: listCollections
28-
- command_started_event:
29-
command:
30-
listCollections: 1
31-
filter:
32-
name: "datakeys"
33-
$db: keyvault
34-
command_name: listCollections
3528
# Then key is fetched from the key vault.
3629
- command_started_event:
3730
command:

data/client-side-encryption/basic.json

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -144,18 +144,6 @@
144144
"command_name": "listCollections"
145145
}
146146
},
147-
{
148-
"command_started_event": {
149-
"command": {
150-
"listCollections": 1,
151-
"filter": {
152-
"name": "datakeys"
153-
},
154-
"$db": "keyvault"
155-
},
156-
"command_name": "listCollections"
157-
}
158-
},
159147
{
160148
"command_started_event": {
161149
"command": {
@@ -283,18 +271,6 @@
283271
"command_name": "listCollections"
284272
}
285273
},
286-
{
287-
"command_started_event": {
288-
"command": {
289-
"listCollections": 1,
290-
"filter": {
291-
"name": "datakeys"
292-
},
293-
"$db": "keyvault"
294-
},
295-
"command_name": "listCollections"
296-
}
297-
},
298274
{
299275
"command_started_event": {
300276
"command": {

data/client-side-encryption/basic.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,6 @@ tests:
2929
filter:
3030
name: *collection_name
3131
command_name: listCollections
32-
- command_started_event:
33-
command:
34-
listCollections: 1
35-
filter:
36-
name: "datakeys"
37-
$db: keyvault
38-
command_name: listCollections
3932
# Then key is fetched from the key vault.
4033
- command_started_event:
4134
command:
@@ -82,13 +75,6 @@ tests:
8275
filter:
8376
name: *collection_name
8477
command_name: listCollections
85-
- command_started_event:
86-
command:
87-
listCollections: 1
88-
filter:
89-
name: "datakeys"
90-
$db: keyvault
91-
command_name: listCollections
9278
# Then key is fetched from the key vault.
9379
- command_started_event:
9480
command:

data/client-side-encryption/bulk.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -178,18 +178,6 @@
178178
"command_name": "listCollections"
179179
}
180180
},
181-
{
182-
"command_started_event": {
183-
"command": {
184-
"listCollections": 1,
185-
"filter": {
186-
"name": "datakeys"
187-
},
188-
"$db": "keyvault"
189-
},
190-
"command_name": "listCollections"
191-
}
192-
},
193181
{
194182
"command_started_event": {
195183
"command": {

data/client-side-encryption/bulk.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,6 @@ tests:
3939
filter:
4040
name: *collection_name
4141
command_name: listCollections
42-
- command_started_event:
43-
command:
44-
listCollections: 1
45-
filter:
46-
name: "datakeys"
47-
$db: keyvault
48-
command_name: listCollections
4942
# Then key is fetched from the key vault.
5043
- command_started_event:
5144
command:

data/client-side-encryption/count.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -149,18 +149,6 @@
149149
"command_name": "listCollections"
150150
}
151151
},
152-
{
153-
"command_started_event": {
154-
"command": {
155-
"listCollections": 1,
156-
"filter": {
157-
"name": "datakeys"
158-
},
159-
"$db": "keyvault"
160-
},
161-
"command_name": "listCollections"
162-
}
163-
},
164152
{
165153
"command_started_event": {
166154
"command": {

0 commit comments

Comments
 (0)