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

HTTP basic auth #343

Closed
nanowish opened this issue Nov 15, 2016 · 14 comments
Closed

HTTP basic auth #343

nanowish opened this issue Nov 15, 2016 · 14 comments

Comments

@nanowish
Copy link

nanowish commented Nov 15, 2016

Hi ,

in reference to #100 and #160

why removing basic auth from exporters ? whereas exporters binding in port and exposes they metrics, a minimal auth or any controlled access method to metrics its needed. At least basic auth must be in all exporters to easily control metrics access. I can"t imagine installing nginx or other proxy in all servers who only needs node_exporter, seems totally overkill. Or am I missing something?

@SuperQ
Copy link
Member

SuperQ commented Nov 15, 2016

Using basic auth would necessitate SSL setup to provide any sane safety. We don't have the bandwidth to support SSL in all exporters at this time.

This is something I would like to see change, but it is not something the community can agree on right now.

"Most" Prometheus setups are not exposed to the Internet, and there should be no user PII exposed by the node_expoerter.

@SuperQ SuperQ closed this as completed Nov 15, 2016
@wanrui
Copy link

wanrui commented Jan 2, 2019

mark

@discordianfish
Copy link
Member

TLS support is being revisited btw, see #1198

@PRIHLOP
Copy link

PRIHLOP commented Jan 28, 2020

Now TLS is supported, please revert back basic auth.

@discordianfish
Copy link
Member

@SuperQ Thoughts? I'm conflicted. I'd rather require client certs than using basic auth these days I think.

@SuperQ
Copy link
Member

SuperQ commented Feb 13, 2020

We agreed in the same dev summit about TLS that basic auth and/or bearer tokens was something we were OK with. I'm not personally invested in implementing it, but we should open a new basic auth design issue.

My idea for how to implement this involved being able to support Apache-style htpasswd files with some kind of ability to reload or watch them. I'd like to get the "how to inject the secrets" figured out.

@brian-brazil
Copy link
Contributor

We didn't say we'd support bearer tokens, only TLS and basic auth.

@discordianfish
Copy link
Member

@SuperQ Well I would have re-open this one but if you prefer a new one, please open one.

@m-yosefpor
Copy link

@discordianfish I couldn't find the new issue about basic auth, nor this issue is re-opened. If there is an open issue about the basic auth implementation, please mention that here.

@obitech
Copy link

obitech commented Apr 1, 2020

The new tls_config allows to set basic client auth:

tlsConfig :
  # Certificate and key files for server to use to authenticate to client
  tlsCertPath : <filename>
  tlsKeyPath : <filename>

  # Server policy for client authentication. Maps to ClientAuth Policies
  # For more detail on clientAuth options: [ClientAuthType](https://golang.org/pkg/crypto/tls/#ClientAuthType)
  [ clientAuth : <string> | default = "NoClientCert" ]

  # CA certificate for client certificate authentication to the server
  [ clientCAs : <filename> ]

@m-yosefpor
Copy link

The new tls_config allows to set basic client auth:

tlsConfig :
  # Certificate and key files for server to use to authenticate to client
  tlsCertPath : <filename>
  tlsKeyPath : <filename>

  # Server policy for client authentication. Maps to ClientAuth Policies
  # For more detail on clientAuth options: [ClientAuthType](https://golang.org/pkg/crypto/tls/#ClientAuthType)
  [ clientAuth : <string> | default = "NoClientCert" ]

  # CA certificate for client certificate authentication to the server
  [ clientCAs : <filename> ]

Actually, I meant a user/pass authentication method (for simpler usage), but thanks anyway, I used self-signed client cert for auth.

@copocaneta
Copy link

There is this "basic_auth_users" at the HTTPS package README (https://github.com/prometheus/node_exporter/blob/master/https/README.md)

Where and how do I supply these credentials on the prometheus server side when adding a node exporter that uses basic_auth_users?

@m-yosefpor
Copy link

Cool so it is fixed with #1683
@copocaneta You can find that in prometheus docs https://prometheus.io/docs/prometheus/latest/configuration/configuration/

@copocaneta
Copy link

Thank you very much @m-yosefpor

tamcore pushed a commit to gitgrave/node_exporter that referenced this issue Oct 22, 2024
According to the table in https://xfs.org/index.php/Runtime_Stats, the first number of `rw` stats is write and the second is read. I noticed Prometheus seemed to be reporting the opposite of what I expected.

Signed-off-by: William Starling <william@bugsnag.com>
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

No branches or pull requests

9 participants