Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Adding User on fresh MongoDB > 4.0 instances broken #227

@bitmeal

Description

@bitmeal

The Problem occurs when connecting to a fresh instance of MongoDB version > 4.0:
MongoDB version > 4.0 requires server-side password digestion by default, which ist not supported by addUser in the 2.2 branch of the mongodb driver. The node-mongo-native team rejects commits to the 2.2 branch to fix this problem - see: mongodb/node-mongodb-native#1852 - it as to be solved elswhere in consequence. Options are upgrading to a newer mongodb driver, greater v3.0.11 (first version supporting automatic digestion handling in addUser mongodb/node-mongodb-native@1df6ab0) or for the time being i have attached a diff-patch (as .txt due to file-type restrictions) for patching v2.2.x drivers /lib/db.js to support automatic digestion handling: dbjs_path_base2_2_36.txt (tested and working for 2.2.x releases). Possible option to circumvent this is of course using the 2.2 branch from the repository I filed the pull request with https://github.com/bitmeal/node-mongodb-native/tree/2.2 as the mongodb module in package.json.

The Problem does not occur when you are using a (even fresh) MongoDB instance on a system that had a previous version of MongoDB (<4.0) installed. The previous install does not require user added data (DBs, tables, actual documents created users) but only a fresh install and uninstall.

Referencing #219 for completeness, as I did not see it when posting. This issue (here) goes into more detail describing the underlying error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions