Skip to content
This repository has been archived by the owner on Aug 27, 2020. It is now read-only.

Enable MongoDB port/login/password/etc. to be configured in config.json #74

Open
tubededentifrice opened this issue Mar 28, 2015 · 2 comments

Comments

@tubededentifrice
Copy link

Enable MongoDB port/login/password/etc. to be configured in config.json so it's possible to use an external service like https://www.compose.io or host the MongoDB database on another server (auth is a must have, people can't rely on source IP for security), possibly with sharding enabled for example.

@stephen304
Copy link
Owner

This is definitely necessary. I'm not sure when I'll be able to implement this, but I'll keep this issue updated.

@alexandre-p
Copy link

I haven't taken the time to test, but I believe it is already possible.

The mongo parameter in Bitcannon's config file is directly used in the Mongo connector (mgo).
The connector accepts any mongo connection string.
So 127.0.0.1 works (for a local database, on the default port, with no authentification), but a connection string like mongodb://my_username:[email protected]:7777 should work if you want to use authentication and 7777 as the port.

If you want to work with a mongo replica set, you can give multiple hosts in a connection string like this : mongodb://host1:port1,host2:port2

The full documentation can be found here.

For the authentication part, note that by default, even if you have users, the default MongoDB setting is to allow anonymous connections, you have to force it in the config file (with auth=true I believe).

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

No branches or pull requests

3 participants