vkarpov15 / run-rs

Zero-config MongoDB runner. Starts a replica set with no non-Node dependencies, not even MongoDB.
Apache License 2.0
265 stars 36 forks source link

Auth flag #19

Open Christilut opened 5 years ago

Christilut commented 5 years ago

So my development MongoDB is exposed because it is on a Lightsail VPS and I'd like to secure it with the --auth flag. I tried adding it myself, seemed like a small feature but I'm getting some errors in the underlying topology manager when adding the auth flag.

vkarpov15 commented 5 years ago

It's something we're planning on adding, but hasn't really been a priority. Out of curiosity, why is it a priority for you to secure a dev DB? Not saying you're wrong, just curious to hear your perspective

Christilut commented 5 years ago

Well I want to load real data in there and instead of putting effort into anonymizing the data I'd rather secure it. There's bots out there that just go after every IP address and test every default port, especially mongo since the default mongo installations have auth disabled. I changed my ports of course but IP whitelisting is proving difficult because my server is on heroku which uses dynamic IP's.

Christilut commented 5 years ago

But honestly, I had runrs running for a few days and it worked fine but lately I've been getting strange errors and the primary clusters seems to go down repeatedly after 12+ hours of uptime. After messing with it (and other ways of getting a replicaset with auth running) I decided it costs me too much time to get it working and that an M10 instance on Atlas is maybe the best option after all.

vkarpov15 commented 5 years ago

It sounds like your case is not what run-rs is designed for. Our goal is to make local dev and testing as easy as possible. As soon as you start worrying about uptime and securing customer data, you should look into MongoDB Atlas. I'll keep this open to track adding auth support though, that will be useful.

Christilut commented 5 years ago

Yeah you're right. I was kind of forced to do something like this because of this issue

vkarpov15 commented 5 years ago

Thanks for the heads up, I've never seen that Atlas issue before. I opened up a Mongoose issue to look into it.

ashisherc commented 4 years ago

would love to have auth flag, when running a dev cluster on a cloud VM

rattrayalex commented 1 year ago

It looks like Prisma requires auth for local dev: https://www.prisma.io/docs/concepts/database-connectors/mongodb

lack of this flag seems to make this project unusable for that…