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

feat(httpd): Add option to authenticate debug/pprof and ping endpoints #15222

Merged
merged 1 commit into from
Sep 21, 2019

Conversation

gunnaraasen
Copy link
Member

@gunnaraasen gunnaraasen commented Sep 20, 2019

Fixes #10167

Adds pprof-auth-enabled and ping-auth-enabled configuration options which can enable authentication on all /debug and /ping endpoints. This also covers the prometheus /metrics and deprecated /status endpoints.

With these additions, all InfluxDB endpoints will require authentication with the following configuration:

[http]
  auth-enabled = true
  pprof-auth-enabled = true
  ping-auth-enabled = true

Note that go tool pprof does not support authentication so it will not work when pprof-auth-enabled is enabled.

services/httpd/handler.go Show resolved Hide resolved
services/httpd/handler.go Show resolved Hide resolved
services/httpd/handler.go Show resolved Hide resolved
@gunnaraasen
Copy link
Member Author

I've updated the example config with a note about the auth-enabled and pprof-enabled dependent settings. Will merge once tests pass.

@jacobmarble
Copy link
Member

jacobmarble commented Sep 20, 2019 via email

@gunnaraasen
Copy link
Member Author

Yup, a profile would need to be pulled with curl, for example:

curl -o profiles.tar.gz -u username:password "http://localhost:8086/debug/pprof/all?cpu=true"

@dontsovcmc
Copy link

dontsovcmc commented Dec 23, 2019

Wow! I think, that there is an error, but found that init-influxdb.sh doesn’t work without -e INFLUXDB_HTTP_AUTH_ENABLED=true
influxdata/influxdata-docker#281 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants