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

Cannot update unindexed field in QE

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • Affects Version/s: 6.0.0-rc13
    • Component/s: 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

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

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

              Created:
              Updated:
              Resolved: