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

Feature request: add support for Digest authentication for scrape targets #352

Open
Tailzip opened this issue Dec 25, 2021 · 7 comments
Open

Comments

@Tailzip
Copy link

Tailzip commented Dec 25, 2021

Proposal

Add support for Digest authentification (in addition to already existing Basic authentication) for scrape targets.

@Tailzip Tailzip changed the title Dec 25, 2021
@LeviHarrison LeviHarrison transferred this issue from prometheus/prometheus Dec 25, 2021
@LeviHarrison
Copy link
Member

Transferring to the appropriate repo.

@LeviHarrison
Copy link
Member

I'm not familiar with Digest authentication, but given that it's not included in the Go standard http library, I think it might be too niche to support.

cc @roidelapluie

@roidelapluie
Copy link
Member

Indeed. Digest requires an extra roundtrip and does not bring added value. If you want to secure the authorization please use basic auth with tls.

@muety
Copy link

muety commented Dec 14, 2023

Would love to have digest auth support, because wanting to scrape targets that only support such.

muety added a commit to muety/common that referenced this issue Dec 14, 2023
muety added a commit to muety/common that referenced this issue Dec 14, 2023
muety added a commit to muety/common that referenced this issue Jan 1, 2024
@anarcat
Copy link

anarcat commented Sep 13, 2024

i've found myself in this situation that i needed http digest auth for prometheus, then re-checked what htdigest auth is and, oh dear, that thing is just plain horrible.

the server keeps a copy of the user:realm:password MD5 hash on the server and that is basically what's used by the client to authenticate as a secret. The server sends a nonce, but that's it: the client replies with the MD5(MD5(username:realm:password):nonce:MD5(method:digestURI)) hash, which can be easily replayed by someone who has a copy of the server side password store.

essentially, those are plain-text passwords, it's bonkers.

i actually discourage the Prometheus folks from implementing this, maybe it will give people good ideas if they see Prom does not implement this.

the only universe where this makes sense is in plain HTTP where the wire is constantly surveilled. then there is an advantage because only the latter hash travels over the wire. but those days are long gone...

@muety
Copy link

muety commented Sep 13, 2024

I agree that if Prometheus was a web framework or something, it probably should intentionally not support digest auth to prevent people from implementing a digest auth-based login in the first place.

However, since Prometheus is a monitoring system and people use it to run against already existing systems, which they often times can't control, I think Prometheus should offer as many options as possible (following Postel's Law in some sense).

In my particular use case, I want to monitor a system that only support digest auth. But I can't use Prometheus to so so, unless somebody eventually merges #553.

@anarcat
Copy link

anarcat commented Sep 13, 2024 via email

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

5 participants