Skip to content
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

Mongodb Authentication #977

Open
jiahaochua opened this issue Jul 24, 2018 · 2 comments
Open

Mongodb Authentication #977

jiahaochua opened this issue Jul 24, 2018 · 2 comments

Comments

@jiahaochua
Copy link

Hi,

Realized that I posted the previous issue to console by mistake, when its actually an issue for Core. Link to previous issue: jembi/openhim-console#479

Thanks for the clarification, the connection string appears to work, however I get the following warning when starting openhim core:

Db.prototype.authenticate method will no longer be available in the next major release 3.x as MongoDB 3.6 will only allow auth against users in the admin db and will no longer allow multiple credentials on a socket. Please authenticate using MongoClient.connect with auth credentials.

Could this potentailly cause issues in the future? For your reference I am running mongodb 3.4.

In a different but related note, has openhim core been tested with mongodb versions 3.6 and 4.0? My attempts to run openhim-core with mongodb 4.0 gives the following error:

2018-07-24T17:12:50.195Z - error: [worker1]  message=Unknown modifier: $pushAll, name=MongoError, stack=MongoError: Unknown modifier: $pushAll
    at Function.MongoError.create (/usr/lib/node_modules/openhim-core/node_modules/mongoose/node_modules/mongodb-core/lib/error.js:31:11)
    at toError (/usr/lib/node_modules/openhim-core/node_modules/mongoose/node_modules/mongodb/lib/utils.js:139:22)
    at /usr/lib/node_modules/openhim-core/node_modules/mongoose/node_modules/mongodb/lib/collection.js:1059:67
    at /usr/lib/node_modules/openhim-core/node_modules/mongoose/node_modules/mongodb-core/lib/connection/pool.js:469:18
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9), driver=true, index=0, code=9, errmsg=Unknown modifier: $pushAll

A search online suggests that this pushAll has been deprecated as of Mongodb 3.6, as mentioned here: https://stackoverflow.com/questions/48607918/mongoerror-unknown-modifier-pushall-in-node-js

As a result I am running Mongodb 3.4, is this a known issue and is there a planned fix?

Thanks,
Jiahao

@rcrichton
Copy link
Member

Ah, that is interesting. Looks like we can't rely on the url to set auth in the future. Thanks for pointing this out, we will work to get change this for the future.

Right now the mongo 3.4 is the correct version that work with the OpenHIM. We are aware of the $pushAll error. This will likely be updated to work with mongo 3.6 in the future.

@jiahaochua
Copy link
Author

It's great to hear that you're actively still fixing issues and improving OpenHIM. Thanks for the response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants