Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-3605

bypassAutoEncryption: true not working!

    • 2
    • Not Needed

      What problem are you facing?

      I'm trying to configure CSFLE on the community edition MongoDB server with nodeJs and node-mongodb-native driver. From the documents, I gather that explicit encryption with automatic decryption is possible in the community edition and it doesn't require the mongocryptd process if we pass the 
      bypassAutoEncryption: true option in autoEncryption Object.
      But while doing so, the MongoDB client throws an expectation and exits.

      'MongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27020'

      Note: **I am able to use/configure explicit encryption with automatic decryption on Mongo shell.

      What driver and relevant dependency versions are you using?

      nodeJs: v14.15.1
      mongodb-client-encryption: v1.2.6
      mongodb: v4.1.1
      MongoDB server(community edition): 4.4.8
      _MongoDB shell: v4.4.8_
       
      OS: Tried on
      macOS(silicon): 11.2.3
      AmazonLinux2
       
      As of now, I'm using the local key store for the master key

      Steps to reproduce?

       
      ```
      const secureClient = new MongoClient('mongodb://xxxxx:xxxx@xxxxxx:27017/xxxxxx', {
      useNewUrlParser: true,
      useUnifiedTopology: true,
      autoEncryption: {
      bypassAutoEncryption: true,
      keyVaultNamespace,
      kmsProviders,
      extraOptions:

      { mongocryptdBypassSpawn: true, }

      ,
      }
      });
      ```

       

      ```
      const connect = async () => {
      try

      { const encryptedClient=await secureClient.connect(); console.log('LOG: ', encryptedClient) }

      catch (err)

      { console.error('ERROR: ', err); }

      };

      connect();
      ```

        1. connection-1.png
          connection-1.png
          298 kB
        2. error.png
          error.png
          434 kB

            Assignee:
            daria.pardue@mongodb.com Daria Pardue
            Reporter:
            nipun@oriserve.com Nipun Jain
            Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: