New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow access to current's node's local interface at /_node/_local/<etc> #824

Closed
wohali opened this Issue Sep 18, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@wohali
Member

wohali commented Sep 18, 2017

Right now, to access a given node's local interface, there are two choices:

  1. Port 5986 (which we intend to remove with v3.0 and up)
  2. /_node/<node's Erlang -name>/...

The latter requires knowing the node's full Erlang -name. But this can be challenging to determine, especially in an automated fashion for tools that are intended to be zero-configuration.

A drawback is what you'd receive hitting the proposed endpoint through a load balancer. An alternative I could think of would be to check if the request originated from 127.0.0.1 or ::1, but this could be subverted through a LB installed on the local machine as well.

Expected Behaviour

A client should be able to access /_node/)local/... and have it be the same as /_node/<this node's -name>/... . This allows access to e.g. http://127.0.0.1/_node/)local/_stats as if it were the same as 1.x's http://127.0.0.1:5984/_stats, without introducing a dependency on the to-be-deprecated interface at port 5986.

Current Behaviour

The node-local Erlang name must be known before querying node-specific endpoints.

Context

I am writing an extension for netdata, a zero-config/minimal-config localhost monitoring solution. By providing this endpoint the only configuration necessary for a monitoring tool is an admin:password pair.

Filing this in lieu of #821 since that issue would require re-exposing both /_stats and /_system on port 5984; if we're going to do that, why not just make it more convenient to get to the node-local interface anyway?

/cc @chewbranca @banjiewen

@wohali wohali changed the title from Allow access to current's node's local interface at /_node/local/<etc> to Allow access to current's node's local interface at /_node/_local/<etc> Sep 21, 2017

wohali added a commit that referenced this issue Oct 26, 2017

wohali added a commit that referenced this issue Oct 26, 2017

@wohali wohali closed this in #919 Oct 26, 2017

willholley added a commit to willholley/couchdb that referenced this issue May 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment