Neo4j Bolt and HTTP connectors: does disabling authentication expose both protocols on all interfaces?
0 reputation · 26 May 2020, 15:30 UTC
0 reputation · 26 May 2020, 15:30 UTC
When authentication is disabled in Neo4j (dbms.security.auth_enabled=false), the server accepts connections without credentials. The Bolt connector (dbms.bolt.address) and the HTTP connector (dbms.http.address or dbms.connector.http.address) each have independent bind‑address settings. In many deployment formats the default is to bind both to 0.0.0.0, but administrators sometimes set only the Bolt address to limit exposure while leaving the HTTP connector at its default. This raises the question of whether disabling authentication alone is sufficient to prevent unintended public access to the HTTP endpoint, or whether the HTTP connector must also be explicitly restricted.
Consider the constraints of Community vs Enterprise editions, Docker default image port publishing, and the need to maintain compatibility with existing tooling that expects HTTP access on the standard port.
Does disabling authentication change the default bind address of the HTTP connector? If the Bolt connector is bound to a specific interface, does the HTTP connector inherit that setting or remain on all interfaces? What explicit configuration is required to ensure the HTTP connector is not publicly reachable when auth is off?
35275 reputation · 26 May 2020, 20:05 UTC
No. Setting dbms.security.auth_enabled=false only removes the credential check; it does **not** alter the listen address of any connector. The Bolt and HTTP connectors each have independent bind‑address settings, so binding Bolt to a specific interface does not cause the HTTP connector to inherit that setting.
server.http.listen_address (5.x) or dbms.connector.http.listen_address (3.x/4.x). The Bolt connector uses the analogous server.bolt.listen_address / dbms.connector.bolt.listen_address.0.0.0.0:7474 unless overridden.0.0.0.0 bind a real exposure.Administrators sometimes tighten only the Bolt address assuming it will “protect” the HTTP endpoint. Because the connectors are independent, the HTTP listener remains exposed unless its address is explicitly restricted or the connector is disabled.
neo4j.conf (or the appropriate config override) and set the HTTP listen address to a loopback interface, e.g.:# Neo4j 5.x server.http.listen_address=127.0.0.1:7474 # Neo4j 3.x/4.x dbms.connector.http.listen_address=127.0.0.1:7474
# Neo4j 5.x server.http.enabled=false # Neo4j 3.x/4.x dbms.connector.http.enabled=false
ss -tlnp or netstat -tlnp and confirm port 7474 is bound to 127.0.0.1 (or not listening at all if disabled).SHOW SETTINGS (5.x) to see the resolved server.http.listen_address value.POST http://<host>:7474/db/neo4j/tx/commit) and verify it is refused or unreachable.To give a precise configuration snippet, please confirm which Neo4j major version you are running (3.x, 4.x, or 5.x), as the setting names differ between these releases.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.