[SERVER-68065] Cannot update unindexed field in QE Created: 14/Jul/22  Updated: 29/Oct/23  Resolved: 22/Aug/22

Status: Closed
Project: Core Server
Component/s: Queryable Encryption
Affects Version/s: 6.0.0-rc13
Fix Version/s: 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Anna Henningsen Assignee: Shreyas Kalyan
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

db = Mongo('mongodb://localhost/', {  kmsProviders: { local: { key: 'A'.repeat(128) } },  keyVaultNamespace: 'encryption.__keyVault'}).getDB('testdb')
keyId = db.getMongo().getKeyVault().createKey('local')
db.createCollection('qe_unindexed', {
  encryptedFields: { fields: [ { keyId, path: 'field', bsonType: 'string' } ] }
})
 
db.qe_unindexed.insertOne({field: 'foo'})
// The following lines fail with:
// MongoServerError: Found indexed encrypted fields but could not find __safeContent__ (code: 6371506)
db.qe_unindexed.findOneAndUpdate({}, {$set:{field:'bar'}})
db.qe_unindexed.update({}, {$set:{field:'bar'}})

Sprint: Security 2022-08-08, Security 2022-08-22, Security 2022-09-05
Participants:

 Description   

In Queryable Encryption, unindexed fields cannot be updated. Updating fails with error code 6371506.



 Comments   
Comment by Githook User [ 19/Aug/22 ]

Author:

{'name': 'Shreyas Kalyan', 'email': 'shreyas.kalyan@mongodb.com', 'username': 'shreyaskal'}

Message: Revert "SERVER-68065 Cannot update unindexed field in QE"

This reverts commit 9dfda2a2223724e5079da2df97775ce446481a0b.
Branch: master
https://github.com/mongodb/mongo/commit/3638a0179809ab80edb7aaaaf189a17ffb8bd611

Comment by Githook User [ 19/Aug/22 ]

Author:

{'name': 'Shreyas Kalyan', 'email': 'shreyas.kalyan@mongodb.com', 'username': 'shreyaskal'}

Message: SERVER-68065 Cannot update unindexed field in QE
Branch: master
https://github.com/mongodb/mongo/commit/9dfda2a2223724e5079da2df97775ce446481a0b

Comment by Githook User [ 19/Aug/22 ]

Author:

{'name': 'Shreyas Kalyan', 'email': 'shreyas.kalyan@mongodb.com', 'username': 'shreyaskal'}

Message: SERVER-68065 Cannot update unindexed field in QE
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/b5779a06992293984822040e36fc11dfb68365bb

Generated at Thu Feb 08 06:09:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.