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

Basic Auth for Upstream #95

Open
jzelinskie opened this issue Nov 11, 2021 · 3 comments
Open

Basic Auth for Upstream #95

jzelinskie opened this issue Nov 11, 2021 · 3 comments
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.

Comments

@jzelinskie
Copy link
Contributor

I'm not sure if things will just work out of the box if I use the https://user:[email protected] format for the upstream URL. If it does, it should get documented in the README because popular platforms like Grafana Cloud secure their Prometheus with this strategy. If this does not work, it's going to have to be explicitly added upstream, which I don't mind implementing with some direction from the maintainers.

@simonpasquier
Copy link
Contributor

I did a quick check and http://user:[email protected] doesn't work (which looking at httputil.NewSingleHostReverseProxy is logical). I think that your request makes sense.
Maybe users should be able to configure additional headers that would be injected in the incoming request?

@simonpasquier simonpasquier added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. labels Jun 15, 2023
@simonpasquier
Copy link
Contributor

This is kind of related to #136 which asks for TLS transport configuration. We might be able to rely on https://pkg.go.dev/github.com/prometheus/[email protected]/config primitives to avoid reinventing the wheel.

@joedborg
Copy link

Unsure whether or not this is in the purview of this issue, but it would be good to be able to set an upstream secret in order to specify either a user:pass or a token that's added to the upstream header. I think this is much nicer than having exposed user:pass in the URL and means we could inject a token into the header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants