Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-68065

Cannot update unindexed field in QE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 6.0.0-rc13
    • 6.1.0-rc0
    • Queryable Encryption
    • None
    • Fully Compatible
    • ALL
    • Hide

      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'}})
      

      Show
      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'}})
    • Security 2022-08-08, Security 2022-08-22, Security 2022-09-05

    Description

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

      Attachments

        Activity

          People

            shreyas.kalyan@mongodb.com Shreyas Kalyan
            anna.henningsen@mongodb.com Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: