[SERVER-42066] [FLE] Replacement style update with randomly encrypted field with JSONPointer keyID should be allowed Created: 03/Jul/19  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Davis Haupt (Inactive) Assignee: Backlog - Query Optimization
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Optimization
Backwards Compatibility: Fully Compatible
Participants:
Case:

 Description   

With this schema:

{
        type: "object",
        properties: {
            foo: {
                encrypt: {
                    algorithm: "AEAD_AES_256_CBC_HMAC_SHA_512-Random",
                    keyId: "/key",
                    bsonType: "int"
                }
            }
        }
    }

This update should pass:

{q: {}, u: {foo: NumberInt(6), key: "hello"}}

Since all the information necessary for encrypting the literal is included in the replacement-style update (as it would in an insert).

But instead it fails with code 51093 and error message "A non-static (JSONPointer) keyId is not supported."


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