[DRIVERS-2604] Queryable Encryption prose and spec tests can share the same encryptedFields JSON files Created: 12/Apr/23  Updated: 21/Aug/23

Status: Implementing
Project: Drivers
Component/s: Client Side Encryption
Fix Version/s: None

Type: Task Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Kevin Albertson
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split to CSHARP-4612 Queryable Encryption prose and spec t... Backlog
split to CXX-2674 Queryable Encryption prose and spec t... Backlog
split to CDRIVER-4613 Queryable Encryption prose and spec t... Closed
split to GODRIVER-2808 Queryable Encryption prose and spec t... Closed
split to MOTOR-1118 Queryable Encryption prose and spec t... Closed
split to NODE-5195 Queryable Encryption prose and spec t... Closed
split to PHPLIB-1110 Queryable Encryption prose and spec t... Closed
split to PYTHON-3666 Queryable Encryption prose and spec t... Closed
split to RUBY-3239 Queryable Encryption prose and spec t... Closed
split to RUST-1629 Queryable Encryption prose and spec t... Closed
split to JAVA-4934 Queryable Encryption prose and spec t... Closed
Related
is related to DRIVERS-2286 Support for Range Indexes Closed
is related to DRIVERS-2505 Add Explicit Encryption with Range Index Closed
Driver Changes: Needed
Downstream Changes Summary:

resync range-... and fle2v2-... files to https://github.com/mongodb/specifications/commit/c4f3fabe9047e5e7a87877d642fa0d885a47351c

There is no expected test coverage or behavior change. Consider closing the language ticket as "Won't Do" and resyncing test files as part of a future change.

Engineering Lead: Kevin Albertson Kevin Albertson
Start date:
Driver Compliance:
Key Status/Resolution FixVersion
CDRIVER-4613 Fixed 1.24.0
CXX-2674 Backlog
CSHARP-4612 Backlog
GODRIVER-2808 Won't Do
JAVA-4934 Fixed 4.10.0
NODE-5195 Fixed 5.5.0
MOTOR-1118 Won't Do
PYTHON-3666 Duplicate 4.4
PHPLIB-1110 Fixed 1.16.0
RUBY-3239 Won't Do
RUST-1629 Fixed 2.6.0

 Description   

Summary

CSFLE prose test 22 uses range-encryptedFields-<type>.json files (added in DRIVERS-2505), which are very similar to the encryptedFields-Range-<type>.json files used by the templates that generate legacy spec tests (added in DRIVERS-2286).

There appear to be two notable differences:

  • The range-encryptedFields-<type>.json files also specify zero for field.queries.contention, which is the default value and may be irrelevant.
  • The field names for encryptedDouble / encryptedDecimal in encryptedFields-Range-<type>.json are encryptedDoubleNoPrecision / encryptedDecimalNoPrecision in range-encryptedFields-<type>.json.

It should be feasible to resolve these differences and have the prose and spec tests use the same set of JSON files.

See this GitHub review comment for additional context.

Motivation

Is this issue urgent?

No.

Is this ticket required by a downstream team?

No.

Is this ticket only for tests?

Yes.



 Comments   
Comment by Githook User [ 24/Apr/23 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: DRIVERS-2604 deduplicate encrypted fields files (#1400)

  • format range-encryptedFields-*
  • add contention to range-encryptedFields

If contention is not present, the server will provide a default value.
The default value will be included in the `command_started_event`.
Adding `contention` to the `range-encryptedFields-*` files enable the same YAML to be used for `encrypted_fields` and the `command_started_event` in specification tests.

  • replace references of encryptedFields-Range-* to range-encryptedFields-*
  • rename references of encryptedDecimal to encryptedDecimalNoPrecision
  • rename encryptedDouble to encryptedDoubleNoPrecision
  • use numberLong consistently for sparsity

Server accepts either. Use numberLong for consistency.

  • remove encryptedFields-Range-* files
Comment by Kevin Albertson [ 12/Apr/23 ]

In review here: https://github.com/mongodb/specifications/pull/1400

Generated at Thu Feb 08 08:25:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.