rancher / catalog-dockerfiles

Dockerfiles for Rancher Catalog containers
Apache License 2.0
131 stars 102 forks source link

Mongo-Cluster running without Password #109

Open appinteractive opened 6 years ago

appinteractive commented 6 years ago

How can I configure a password for my Mongo Cluster? At the default configuration its open to the wild! This sould really not be the default!

14850842 commented 6 years ago

@appinteractive Firstly setup your admin users on your mongo instance. Then upgrade your mongo cluster add --auth to your startup command.

appinteractive commented 6 years ago

Yeah I did it already and it worked. But to be honest that’s should be four fields to add a read write user and an admin user on first startup if not happened oder add a BIG warning to that to be aware of.

I know it’s not your fault that mongo Standard config is unsafe bur we should not letting run other people into it.

Hope you get my point and thanks for your package man! 🙂

14850842 commented 6 years ago

Fully agree with you! Not my package but was setting this up also and found it strange that there was no option to secure the DB.

micw commented 6 years ago

Looks like there's already a pull request for this: https://github.com/rancher/catalog-dockerfiles/pull/86 - but for some reason it's ignored...

markqiu commented 6 years ago

the cluseter has the following error after I add --auth: Error in heartbeat request to 10.42.230.91:27017; Unauthorized: not authorized on admin to execute command { replSetHeartbeat: "rs0", configVersion: 5, from: "guchong-mongo-cluster-1:27017", fromId: 0, term: 2 } Any idea?