[DRIVERS-2441] Error if RewrapManyDataKey is called with masterKey and without provider Created: 14/Sep/22 Updated: 23/Jun/23 Resolved: 23/Jun/23 |
|
| Status: | Closed |
| Project: | Drivers |
| Component/s: | Client Side Encryption |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kevin Albertson | Assignee: | Kevin Albertson |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Driver Changes: | Needed | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Quarter: | FY24Q2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Downstream Changes Summary: | 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. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Engineering Lead: | |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Product Manager: | |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Program Manager: | |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Driver Compliance: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
Summary
MotivationRewrapManyDataKeyOpts is specified as an optional argument to RewrapManyDataKey:
If RewrapManyDataKeyOpts is set, provider is required, and masterKey is optional:
Some driver implementations do not represent RewrapManyDataKeyOpts as a separate type. Instead, the provider and masterKey are both optional arguments to RewrapManyDataKey. For example, in C:
If mongoc_client_encryption_rewrap_many_datakey is called with a master_key but a NULL provider, no error is returned. The expected behavior is to require provider when master_key is set. Who is the affected end user?This impacted Java in How does this affect the end user?Confusion. How likely is it that this problem or use case will occur?Likely. This has impacted users already. If the problem does occur, what are the consequences and how severe are they?Confusion. Is this issue urgent?No. Is this ticket required by a downstream team?No. Is this ticket only for tests?No. |
| Comments |
| Comment by Githook User [ 10/May/23 ] |
|
Author: {'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}Message:
Test "Rewrap returns error if masterKey is set, but provider is not set"
Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com>
Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com> --------- Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com> |