strands-project / mongodb_store

MongoDB tools for storing and analysing runs of ROS systems.
BSD 3-Clause "New" or "Revised" License
49 stars 72 forks source link

Allow to bind mongod to host #249

Closed jorgenfb closed 5 years ago

jorgenfb commented 5 years ago

The existing solution bind the mongod server to all interfaces. This exposes the server to the outside. This could be a potensial security issue if someone has access to your network. This change allows you to only bind the server to the host specified by the mongodb_host parameter. The solution was created with a flag defaulting to false to prevent this from being a breaking change.

Specifying the argument bind_to_host will add a bind argument to the executable:

[..., "--bind_ip", self._mongo_host]

Info: The bind_ip argument supports hostnames, ipaddresses and socket paths so using localhost or 127.0.0.1 is valid for binding to localhost only. To bind to all interfaces use 0.0.0.0.

hawesie commented 5 years ago

This looks fine to me. Pinging @marc-hanheide in case you have some quirky use case that this breaks?

hawesie commented 5 years ago

Great stuff, thanks guys.