-
Notifications
You must be signed in to change notification settings - Fork 4
Mongo 4 no roles check #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
113b3ba
1b4c0e6
af2acfc
dee66fd
0a2eaf8
61356ce
d64005d
140ff99
daa4ce3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -42,6 +42,7 @@ config.mongodb.connectOptions = { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| serverSelectionTimeoutMS: 30000, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // promotes binary BSON values to native Node.js buffers | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| promoteBuffers: true, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| forceServerObjectId: true, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // it is recommended to set either ssl or tls to true in production | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // ssl: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // tls: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -56,12 +57,11 @@ config.mongodb.writeOptions = { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| w: 'majority', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| j: true, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| forceServerObjectId: true, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| config.mongodb.requirements = {}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // server version requirement with server-style string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| config.mongodb.requirements.serverVersion = '>=4.2'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| config.mongodb.requirements.serverVersion = '>=4.4'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is 4.4 a requirement? We do still have some clusters on Atlas that are 4.2.x.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok so You can see the two checks here: Lines 152 to 180 in daa4ce3
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // this is used by _createUser to add a user as an admin to a collection | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // config.mongodb.collection = 'admin-collection'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't a different version being required by code changes elsewhere in this PR?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The driver only goes down to 3.6 now: https://www.mongodb.com/docs/drivers/node/current/compatibility/#mongodb-compatibility
So 3.6 is the hard limit on server version.
You can see the 2 checks are here:
bedrock-mongodb/lib/authn.js
Lines 152 to 180 in daa4ce3