[DRIVERS-2370] Remove ClientEncryption.createKey() in favor of createDataKey() Created: 24/Jun/22  Updated: 06/Apr/23  Resolved: 06/Apr/23

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

Type: Task Priority: Unknown
Reporter: Shane Harvey Assignee: Ezra Chung
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split to CDRIVER-4416 Remove ClientEncryption.createKey() i... Closed
split to CSHARP-4233 Remove ClientEncryption.createKey() i... Closed
split to CXX-2535 Remove ClientEncryption.createKey() i... Closed
split to GODRIVER-2473 Remove ClientEncryption.createKey() i... Closed
split to JAVA-4661 Remove ClientEncryption.createKey() i... Closed
split to MOTOR-987 Remove ClientEncryption.createKey() i... Closed
split to NODE-4342 Remove ClientEncryption.createKey() i... Closed
split to PHPC-2127 Remove ClientEncryption.createKey() i... Closed
split to PYTHON-3317 Remove ClientEncryption.createKey() i... Closed
split to RUBY-3039 Remove ClientEncryption.createKey() i... Closed
split to RUST-1377 Remove ClientEncryption.createKey() i... Closed
Related
related to DRIVERS-1951 Key Management API Closed
related to DRIVERS-2372 Add createKey to ClientEncryption as ... Closed
Epic Link: Key Management API
Driver Changes: Needed
Quarter: FY23Q2
Downstream Changes Summary:
  • Drivers that have already implemented the new ClientEncryption.createKey() function (as an alias for the existing ClientEncryption.createDataKey() function) must remove the ClientEncryption.createKey() function. Drivers that have not yet implemented the function should not implement it.
  • Sync CSE unified spec tests to 6a015f59.
Driver Compliance:
Key Status/Resolution FixVersion
CDRIVER-4416 Fixed 1.22.0
CXX-2535 Done 3.8.0
CSHARP-4233 Fixed 2.17.0
GODRIVER-2473 Done 1.10.0
JAVA-4661 Done
NODE-4342 Done mongodb-client-encryption-2.2.0
MOTOR-987 Duplicate
PYTHON-3317 Duplicate
PHPC-2127 Works as Designed
RUBY-3039 Fixed 2.18.0
RUST-1377 Duplicate
SWIFT-1591 Duplicate

 Description   

Summary

DRIVERS-1951 introduces a duplicate method for creating a data key called ClientEncryption.createKey. The rationale for adding createKey is written in the spec:

createDataKey existed before createKey, but createKey was added for parity with the mongosh interface. createDataKey remains for backwards compatibility.

This rationale seems weak at best. It would make more sense for mongosh to add createDataKey to conform with existing driver apis rather than creating a duplicate method in 10+ langauges. Adding createKey will lead to confusing documentation for users.

kenneth.white@mongodb.com also says there's another reason to prefer createDataKey:

the specificity of createDataKey() could be highly desirable down the road when there are potentially other types of keys/key functions that are introduced

Motivation

Who is the affected end user?

Devs.

How does this affect the end user?

They may be confused at having to choose create_key or create_data_key when there doesn't need to be a choice.



 Comments   
Comment by Githook User [ 27/Jun/22 ]

Author:

{'name': 'Ezra Chung', 'email': '88335979+eramongodb@users.noreply.github.com', 'username': 'eramongodb'}

Message: DRIVERS-2370 Remove createKey in favor of createDataKey (#1265)

  • Remove createKey in favor of createDataKey
Generated at Thu Feb 08 08:25:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.