-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Component/s: Client Side Encryption
-
None
-
Needed
-
Summary
- Error if RewrapManyDataKey is called with masterKey and without provider.
- Add a prose or specification test for the error check.
Motivation
RewrapManyDataKeyOpts is specified as an optional argument to RewrapManyDataKey:
rewrapManyDataKey(filter: Document, opts: RewrapManyDataKeyOpts | null): RewrapManyDataKeyResult;
If RewrapManyDataKeyOpts is set, provider is required, and masterKey is optional:
class RewrapManyDataKeyOpts { provider: String masterKey: Optional<Document> }
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:
MONGOC_EXPORT (bool) mongoc_client_encryption_rewrap_many_datakey ( mongoc_client_encryption_t *client_encryption, const bson_t *filter, const char *provider, const bson_t *master_key, mongoc_client_encryption_rewrap_many_datakey_result_t *result, bson_error_t *error);
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 JAVA-4717. It may impact any user of RewrapManyDataKey and cause confusion.
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.
- is related to
-
JAVA-4717 rewrapManyDataKey doesn't throw an error if missing the provider
- Closed
- split to
-
CDRIVER-4498 Error if RewrapManyDataKey is called with masterKey and without provider
- Closed
-
CSHARP-4357 Error if RewrapManyDataKey is called with masterKey and without provider
- Closed
-
CXX-2599 Error if RewrapManyDataKey is called with masterKey and without provider
- Closed
-
GODRIVER-2584 Error if RewrapManyDataKey is called with masterKey and without provider
- Closed
-
MOTOR-1048 Error if RewrapManyDataKey is called with masterKey and without provider
- Closed
-
NODE-4708 Error if RewrapManyDataKey is called with masterKey and without provider
- Closed
-
PHPC-2148 Error if RewrapManyDataKey is called with masterKey and without provider
- Closed
-
PYTHON-3469 Error if RewrapManyDataKey is called with masterKey and without provider
- Closed
-
RUBY-3156 Error if RewrapManyDataKey is called with masterKey and without provider
- Closed
-
RUST-1506 Error if RewrapManyDataKey is called with masterKey and without provider
- Closed
-
JAVA-4766 Test that exception is thrown if RewrapManyDataKey is called with masterKey and without provider
- Closed