enioka-Haute-Couture / jqm

An asynchronous job manager
Apache License 2.0
95 stars 24 forks source link

Binding a Node to DNS: add CLI option to set DNS for a new Node #334

Open mtykhenko opened 5 years ago

mtykhenko commented 5 years ago

Background For security reasons, it would be nice to have a real possibility to bind JQM node to a "localhost"

Not implemented feature As per documentation 7.7.1.2. Node parameters DNS is one of the parameters which can be altered via CLI options. Right now an implementation does not look to provide this possibility.

Bug / Unclear behavior According to a code com.enioka.jqm.model.Node "localhost" supposed to be a default DNS in case if it's not specified. But while enabling web service interfaces it's set up to "0.0.0.0" com.enioka.jqm.jdbc.DbImplBase queries.put("node_update_all_enable_ws", "UPDATE __T__NODE SET LOAD_API_SIMPLE=true, LOAD_API_CLIENT=true, LOAD_API_ADMIN=true, DNS='0.0.0.0'"); queries.put("node_update_enable_ws_by_id", "UPDATE __T__NODE SET LOAD_API_SIMPLE=true, LOAD_API_CLIENT=true, LOAD_API_ADMIN=true, DNS='0.0.0.0' WHERE ID=?"); Looks like: even if custom value would be specified it would be overwritten later when web interfaces got enabled

marcanpilami commented 5 years ago

Hi. You are right that the binding is set to all interfaces when using the CLI to enable the web GUI. You can however afterward go to said GUI and change it to localhost, then restart the node. Not ideal as you have to be briefly exposed, but it should do the trick. There is no public way to import a configuration beforehand, right now, this is scheduled for v3.