Prometheus metrics endpoint exposes credentials over plaintext HTTP #94
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The metrics endpoint is currently configured on a dedicated entrypoint on port 8082 with basicauth middleware. Because this entrypoint has no TLS, basic authentication credentials are transmitted in cleartext over HTTP. This is particularly relevant in multi-host setups where metrics are scraped across hosts.
A solution would be to expose the metrics endpoint through a HTTPS router using
manualRoutingwith these snippets:I'm happy to open a PR for this. Two approaches are possible and I'd like input on which direction to take:
Non-breaking: add a new secure metrics configuration alongside the existing one, so current installations are unaffected. Users can opt in to the secure setup.
Breaking: replace the current plaintext configuration with the secure approach. This would require users to update their setup (both Traefik .env and hostname configuration in monitoring-ng scrape config).
I lean toward option 2, given that the current configuration transmits credentials in cleartext. I think defaults should be secure, even if that means a breaking change.
Oh shiet, good catch. I'm happy to see a PR for option 2. I don't quite understand the config implications and also this is then connected to
monitoring-ng? If you can provide links to the specific configuration lines in the recipes, that would help.Thanks for reporting. I would also prefer solution 2, and if we do it right it isn't even that breaking I guess:
some more hints:
@p4u1 did I overlook something?