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

Make it possible to add password protection to expose-metrics-as-json #20

Open
dtanzer opened this issue Sep 26, 2013 · 1 comment
Open

Comments

@dtanzer
Copy link

dtanzer commented Sep 26, 2013

The documentation for the ring extras says "WARNING: this URL will not be protected by a username or password in any way (yet), so if you have sensitive metrics you might want to think twice about using it (or protect it yourself)."

IMHO, the easiest way for adding password protection myself would be to add a route to composure that reads like

(GET "/metrics" [] (with-admin-privileges metrics-json))

instead of expose-metrics-as-json (where with-admin-privileges would ensure protection). But for this, "metrics-json" from the ring extras would have to be public. Can you make this method public so I can define the routes myself? Or did I misunderstand / miss something here?

@michaelklishin
Copy link
Collaborator

This has gotten easier in 2.1.0: metrics.ring.expose/serve-metrics can be wrapped and used as a route function easily now. I'll leave this issue open because we may end up adding built-in support
for basic HTTP authentication. If not, this stuff needs to be documented.

@michaelklishin michaelklishin removed this from the 2.2.0 milestone Sep 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants