Skip to content
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

Health/Metrics/Debug endpoints publicly available without auth #13413

Closed
desa opened this issue Apr 15, 2019 · 4 comments
Closed

Health/Metrics/Debug endpoints publicly available without auth #13413

desa opened this issue Apr 15, 2019 · 4 comments
Labels
area/api area/2.x OSS 2.0 related issues and PRs duplicate kind/tech-debt Needs cleanup, will make the developer experience better security

Comments

@desa
Copy link
Contributor

desa commented Apr 15, 2019

Currently all

influxdb/http/handler.go

Lines 20 to 29 in 401ec79

const (
// MetricsPath exposes the prometheus metrics over /metrics.
MetricsPath = "/metrics"
// ReadyPath exposes the readiness of the service over /ready.
ReadyPath = "/ready"
// HealthPath exposes the health of the service over /health.
HealthPath = "/health"
// DebugPath exposes /debug/pprof for go debugging.
DebugPath = "/debug"
)

are exposed publicly and do not require auth. This is likely to expose some amount of private data.

We should either

  1. Add an option to ensure that those endpoints are unexposed
  2. Require authentication to access those endpoints
@desa desa added the security label Apr 15, 2019
@kelwang kelwang added the kind/tech-debt Needs cleanup, will make the developer experience better label Apr 16, 2019
@lafrech
Copy link

lafrech commented Feb 27, 2020

I just stumbled upon this. I wanted to report it and found this issue already open.

I can confirm, except for debug, which returns a 404 error.

@DSpeichert
Copy link

I was just looking through the issues before reporting this as well.
It makes it even "hard" to test out the beta, considering how InfluxDB kinda has to be exposed for Telegraf to reach it, at the same time InfluxDB should be able to scrape itself.

How about adding some sort of ACL for /metrics?
The /ready and /health routes are useful for k8s, obviously, and do not seem to be leaking sensitive information.
Having /metrics locked down to access from 127.0.0.1 would be a good sane default setting.

@danxmoran danxmoran added the area/2.x OSS 2.0 related issues and PRs label Jan 25, 2021
@russorat
Copy link
Contributor

connect #20764

@danxmoran
Copy link
Contributor

Closing this since we've split the work into multiple issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api area/2.x OSS 2.0 related issues and PRs duplicate kind/tech-debt Needs cleanup, will make the developer experience better security
Projects
None yet
Development

No branches or pull requests

6 participants