Commit 05b6496
authored
fix: allow updating unindexed encrypted fields COMPASS-5809 (#3262)
* chore(data-service): track equality-searchable encrypted fields
In addition to tracking all encrypted fields for a given collection’s
schema sources, also track equality-searchable encrypted fields.
This is helpful for knowing whether a field can be included in
the query part of a Compass CRUD update operation that includes
original values of fields in the query portion of that update.
As part of this, the list of encrypted fields reported by
`knownSchemaForCollection()` and used internally in the encrypted
field tracker is changed from a simple array of strings to a
pair of field path lists, one for all encrypted and one for
equality-searchable encrypted fields in the schema. Using
field paths instead of `.`-joined strings has no direct effect
here, but aligns this part of Compass with the recent changes
to nested field editing/dots and dollars support.
* fix(compass-crud): exclude unindexed encrypted fields in update query COMPASS-5809
When updating unindexed encrypted fields, exclude them from the
find part of the update operation, since they are by definition
not queryable.
This modifies the HadronDocument query building methods to take
options arguments instead of key lists, and updates these options
to be passed as field path lists rather than a plain array of strings
(where `.` was ambiguous between literal field names and nested
fields, which was not a problem previously because the field paths
were always coming from the context of shard keys, where `.` is
unambiguous but now is with FLE1 nested fields).1 parent 0896aaf commit 05b6496
File tree
8 files changed
+524
-187
lines changed- packages
- compass-crud/src/stores
- compass-e2e-tests/tests
- data-service/src
- hadron-document
- src
- test
8 files changed
+524
-187
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
456 | 456 | | |
457 | 457 | | |
458 | 458 | | |
459 | | - | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
460 | 465 | | |
461 | 466 | | |
462 | 467 | | |
| |||
513 | 518 | | |
514 | 519 | | |
515 | 520 | | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | 521 | | |
523 | 522 | | |
524 | 523 | | |
525 | 524 | | |
526 | 525 | | |
527 | 526 | | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
528 | 538 | | |
529 | 539 | | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
| 540 | + | |
541 | 541 | | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
546 | 566 | | |
547 | 567 | | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
548 | 573 | | |
549 | 574 | | |
550 | 575 | | |
| |||
734 | 759 | | |
735 | 760 | | |
736 | 761 | | |
737 | | - | |
738 | | - | |
739 | | - | |
740 | | - | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
741 | 776 | | |
742 | 777 | | |
743 | 778 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1367 | 1367 | | |
1368 | 1368 | | |
1369 | 1369 | | |
1370 | | - | |
| 1370 | + | |
1371 | 1371 | | |
1372 | 1372 | | |
1373 | 1373 | | |
| |||
1391 | 1391 | | |
1392 | 1392 | | |
1393 | 1393 | | |
1394 | | - | |
| 1394 | + | |
1395 | 1395 | | |
1396 | 1396 | | |
1397 | 1397 | | |
| |||
1417 | 1417 | | |
1418 | 1418 | | |
1419 | 1419 | | |
1420 | | - | |
| 1420 | + | |
1421 | 1421 | | |
1422 | 1422 | | |
1423 | 1423 | | |
| |||
1442 | 1442 | | |
1443 | 1443 | | |
1444 | 1444 | | |
1445 | | - | |
| 1445 | + | |
1446 | 1446 | | |
1447 | 1447 | | |
1448 | 1448 | | |
| |||
Lines changed: 62 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| 212 | + | |
212 | 213 | | |
213 | 214 | | |
214 | 215 | | |
| |||
233 | 234 | | |
234 | 235 | | |
235 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
236 | 246 | | |
237 | 247 | | |
238 | 248 | | |
| |||
382 | 392 | | |
383 | 393 | | |
384 | 394 | | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
392 | 406 | | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
398 | 412 | | |
399 | | - | |
400 | | - | |
| 413 | + | |
| 414 | + | |
401 | 415 | | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
407 | 421 | | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
412 | 426 | | |
413 | | - | |
414 | | - | |
| 427 | + | |
| 428 | + | |
415 | 429 | | |
416 | | - | |
417 | | - | |
418 | | - | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
419 | 444 | | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
424 | 449 | | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
429 | 455 | | |
430 | 456 | | |
431 | 457 | | |
| |||
0 commit comments