[CDRIVER-4498] Error if RewrapManyDataKey is called with masterKey and without provider Created: 11/Oct/22  Updated: 28/Oct/23  Resolved: 17/May/23

Status: Closed
Project: C Driver
Component/s: Client Side Encryption
Affects Version/s: None
Fix Version/s: 1.23.5

Type: Bug Priority: Major - P3
Reporter: PM Bot Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split from DRIVERS-2441 Error if RewrapManyDataKey is called ... Closed
Related
is related to PHPC-2148 Error if RewrapManyDataKey is called ... Closed
Quarter: FY24Q2
Upstream Changes Summary:

DRIVERS-2441:
If applicable, implement the "Case 2: RewrapManyDataKeyOpts.provider is not optional" specified in https://github.com/mongodb/specifications/commit/4703757119d96fa1438158ece0a30c2186f47800

If the test does not pass, this may suggest the driver needs to be changed to return an expected error when `RewrapManyDataKeyOpts.provider` is not set and `RewrapManyDataKeyOpts.masterKey` is set.


 Description   

This ticket was split from DRIVERS-2441, please see that ticket for a detailed description.



 Comments   
Comment by Githook User [ 18/May/23 ]

Author:

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

Message: CXX-2599 add prose test and upgrade C test dependency (#965)

  • update C driver test dependency to 98995b5d9e31768ae02be265e3debe43ec35cff8

To include fix of CDRIVER-4498

Comment by Githook User [ 17/May/23 ]

Author:

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

Message: CDRIVER-4498 return error if `masterKey` is set, but `provider` is not set (#1259)

  • add CSE Prose Test 16: Case 2
  • return error if `provider` is not set when `master_key` is set
  • Simplify assertion of provider

Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com>

  • update commented test name to match specification
  • use empty doc for masterKey to match specification
  • use ASSERT_WITH_MSG
  • clarify in docs that current master key is used when provider is NULL

---------

Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com>
Branch: r1.23
https://github.com/mongodb/mongo-c-driver/commit/40f748bc5807b5d7ff40b4d40b2551b66bdc7ed0

Comment by Githook User [ 17/May/23 ]

Author:

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

Message: CDRIVER-4498 return error if `masterKey` is set, but `provider` is not set (#1259)

  • add CSE Prose Test 16: Case 2
  • return error if `provider` is not set when `master_key` is set
  • Simplify assertion of provider

Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com>

  • update commented test name to match specification
  • use empty doc for masterKey to match specification
  • use ASSERT_WITH_MSG
  • clarify in docs that current master key is used when provider is NULL

---------

Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com>
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/98995b5d9e31768ae02be265e3debe43ec35cff8

Generated at Wed Feb 07 21:21:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.