Prometheus metrics endpoint exposes credentials over plaintext HTTP #94
Closed
opened 2026-03-13 12:28:58 +00:00 by dannygroenewegen
·
3 comments
No Branch/Tag Specified
master
renovate/ghcr.io-techarohq-anubis-1.x
codeowners
rate-limits
access-logs-docs
dont-generate-wildcard-certs
MAINTENANCE
forwarded-headers
adding-matrix-room
pgsql-port-open
anubis-metrics
trust-forward-header
large-uploads
anubis-log-level
compose.matrix
garage
cve_patch
chore-5.0.0+v3.6.10
feat-release-notes-next
add-onion-support
remove-default-timeout
feat-pull-request-template
improve-docs
anubis
sixsmith-v3-update-only
feature/irc
revert-logmaxAge
qbit
feature/v3
error-pages-again
metrics
basic-auth
error-messages-attempt
error-pages-attempt
minecraft
forward-auth-2
error-pages
rejig-compose-vars
self-signed
6.5.0+v3.7.16
6.4.0+v3.7.14
6.3.0+v3.7.13
6.2.0+v3.7.12
6.1.0+v3.7.10
6.0.0+v3.7.7
5.1.1+v3.6.15
5.1.0+v3.6.11
5.0.0+v3.6.10
4.0.0+v3.6.10
3.10.0+v3.6.7
3.9.0+v3.6.5
3.8.0+v3.6.5
3.7.0+v3.6.2
3.6.3+v3.4.5
3.6.2+v3.4.5
3.6.1+v3.4.5
3.6.0+v3.4.5
3.5.0+v3.4.5
3.4.2+v3.4.5
3.4.1+v3.4.5
3.4.0+v3.4.4
3.3.0+v2.11.26
3.2.0+v2.11.25
3.1.1+v2.11.25
3.1.0+v2.11.24
3.0.0+v2.11.22
2.10.0+v2.11.22
2.9.1+v2.11.14
3.1.0+v2.11.14
2.9.0+v2.11.14
2.8.0+v2.11.10
2.7.0+v2.11.8
3.0.0+v3.0.0
2.6.3+v2.11.2
2.6.2+v2.11.1
2.6.1+v2.11.0
2.6.0+v2.11.0
2.5.0+v2.11.0
2.4.3+v2.10.5
2.1.0+v2.9.9
2.4.2+v2.10.4
2.4.1+v2.10.3
2.4.0+v2.10.1
2.3.1+v2.10.2
2.3.0+v2.10.2
2.2.0+v2.10.2
2.2.0+v2.10.1
2.0.4+v2.9.6
2.0.3+v2.9.6
2.0.2+v2.9.5
2.0.0+v2.9.1
1.1.1+v2.8.1
1.1.0+v2.8.0
1.0.1+v2.5.6
1.0.0+v2.5.2
No labels
Milestone
No items
No Milestone
Assignees
3wordchant
aadil (Aadil Ayub)
abra-bot (Abra Bot)
ammaratef45
amras (Sarma)
BornDeleuze (Born Deleuze)
Brooke
carla
cas (Cassowary)
coopcloud
dannygroenewegen (Danny Groenewegen)
decentral1se (d1)
devydave
fauno (fauno)
hex (Josh Dukes)
javielico (Javielico)
jjsfunhouse
kawaiipunk (KawaiiPunk)
knoflook
moosemower
moritz
notplants
oxaliq (sorrel)
p4u1 (p4u1)
renovate-bot (Comrade Renovate Bot)
simon
stevensting (stevensting)
trav (Trav Fryer)
yksflip
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: coop-cloud/traefik#94
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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?
@decentral1se I made #95 for the changes in Traefik recipe and coop-cloud/monitoring-ng#17 for the changed in monitoring-ng
@stevensting See coop-cloud/monitoring-ng#17 for the changes in monitoring-ng. How do you think we can prevent stuff from breaking? The PR updates the scrape-config example and abra.sh function for adding new domains to the scrape config. But existing installs will have example.org:8082 in the container at one or more /prometheus/scrape_configs/example.org.yml files. Those are not updated with a new recipe version and need manual updating, right?